diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8d532ea4f..c3eb58150 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,6 +15,8 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + with: + token: ${{ secrets.github_token }} - name: Get dependencies run: | diff --git a/.gitignore b/.gitignore index e8323249a..cb197658d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ *.dll *.so *.dylib +.idea + +**/.openapi-generator # Test binary, built with `go test -c` *.test diff --git a/README.md b/README.md index deb7e7cb5..4f55dd5ce 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,76 @@ func main() { } ``` +### Send a text message + +```go +package main +import ( + "fmt" + openapi "github.com/twilio/twilio-go/rest/api/v2010" + "github.com/twilio/twilio-go/twilio" + "os" +) +func main() { + accountSid := os.Getenv("TWILIO_ACCOUNT_SID") + authToken := os.Getenv("TWILIO_AUTH_TOKEN") + client := twilio.NewClient(accountSid, authToken) + + from := "9999999999" + to := "4444444444" + text := "Hello there" + + params := &openapi.CreateMessageParams{} + params.To = &to + params.From = &from + params.Body = &text + + + resp, err := client.ApiV2010.CreateMessage(accountSid, params) + if err != nil { + fmt.Println(err.Error()) + err = nil + } else { + fmt.Println(resp) + } +} +``` + +### Make a call + +``` go +package main + +import ( + "fmt" + openapi "github.com/twilio/twilio-go/rest/api/v2010" + "github.com/twilio/twilio-go/twilio" + "os" +) +func main() { + accountSid := os.Getenv("TWILIO_ACCOUNT_SID") + authToken := os.Getenv("TWILIO_AUTH_TOKEN") + client := twilio.NewClient(accountSid, authToken) + + from := "9999999999" + to := "4444444444" + callurl := "http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient" + + params := &openapi.CreateCallParams{} + params.To = &to + params.From = &from + params.Url = &callurl + + resp, err := client.ApiV2010.CreateCall(accountSid, params) + if err != nil { + fmt.Println(err.Error()) + err = nil + } else { + fmt.Println(resp) + } +} +``` + ### Handling Exceptions ```go package main diff --git a/studio/v2/.openapi-generator-ignore b/rest/accounts/v1/.openapi-generator-ignore similarity index 100% rename from studio/v2/.openapi-generator-ignore rename to rest/accounts/v1/.openapi-generator-ignore diff --git a/rest/accounts/v1/README.md b/rest/accounts/v1/README.md new file mode 100644 index 000000000..2fdd63304 --- /dev/null +++ b/rest/accounts/v1/README.md @@ -0,0 +1,86 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateCredentialAws**](docs/DefaultApi.md#createcredentialaws) | **Post** /v1/Credentials/AWS | +*DefaultApi* | [**CreateCredentialPublicKey**](docs/DefaultApi.md#createcredentialpublickey) | **Post** /v1/Credentials/PublicKeys | +*DefaultApi* | [**CreateSecondaryAuthToken**](docs/DefaultApi.md#createsecondaryauthtoken) | **Post** /v1/AuthTokens/Secondary | +*DefaultApi* | [**DeleteCredentialAws**](docs/DefaultApi.md#deletecredentialaws) | **Delete** /v1/Credentials/AWS/{Sid} | +*DefaultApi* | [**DeleteCredentialPublicKey**](docs/DefaultApi.md#deletecredentialpublickey) | **Delete** /v1/Credentials/PublicKeys/{Sid} | +*DefaultApi* | [**DeleteSecondaryAuthToken**](docs/DefaultApi.md#deletesecondaryauthtoken) | **Delete** /v1/AuthTokens/Secondary | +*DefaultApi* | [**FetchCredentialAws**](docs/DefaultApi.md#fetchcredentialaws) | **Get** /v1/Credentials/AWS/{Sid} | +*DefaultApi* | [**FetchCredentialPublicKey**](docs/DefaultApi.md#fetchcredentialpublickey) | **Get** /v1/Credentials/PublicKeys/{Sid} | +*DefaultApi* | [**ListCredentialAws**](docs/DefaultApi.md#listcredentialaws) | **Get** /v1/Credentials/AWS | +*DefaultApi* | [**ListCredentialPublicKey**](docs/DefaultApi.md#listcredentialpublickey) | **Get** /v1/Credentials/PublicKeys | +*DefaultApi* | [**UpdateAuthTokenPromotion**](docs/DefaultApi.md#updateauthtokenpromotion) | **Post** /v1/AuthTokens/Promote | +*DefaultApi* | [**UpdateCredentialAws**](docs/DefaultApi.md#updatecredentialaws) | **Post** /v1/Credentials/AWS/{Sid} | +*DefaultApi* | [**UpdateCredentialPublicKey**](docs/DefaultApi.md#updatecredentialpublickey) | **Post** /v1/Credentials/PublicKeys/{Sid} | + + +## Documentation For Models + + - [AccountsV1AuthTokenPromotion](docs/AccountsV1AuthTokenPromotion.md) + - [AccountsV1CredentialCredentialAws](docs/AccountsV1CredentialCredentialAws.md) + - [AccountsV1CredentialCredentialPublicKey](docs/AccountsV1CredentialCredentialPublicKey.md) + - [AccountsV1SecondaryAuthToken](docs/AccountsV1SecondaryAuthToken.md) + - [CreateCredentialAwsRequest](docs/CreateCredentialAwsRequest.md) + - [CreateCredentialPublicKeyRequest](docs/CreateCredentialPublicKeyRequest.md) + - [ListCredentialAwsResponse](docs/ListCredentialAwsResponse.md) + - [ListCredentialAwsResponseMeta](docs/ListCredentialAwsResponseMeta.md) + - [ListCredentialPublicKeyResponse](docs/ListCredentialPublicKeyResponse.md) + - [UpdateCredentialAwsRequest](docs/UpdateCredentialAwsRequest.md) + - [UpdateCredentialPublicKeyRequest](docs/UpdateCredentialPublicKeyRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/accounts/v1/api_default.go b/rest/accounts/v1/api_default.go new file mode 100644 index 000000000..4a779f1aa --- /dev/null +++ b/rest/accounts/v1/api_default.go @@ -0,0 +1,476 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://accounts.twilio.com"), + } +} +// CreateCredentialAwsParams Optional parameters for the method 'CreateCredentialAws' +type CreateCredentialAwsParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + Credentials *string `json:"Credentials,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateCredentialAws Method for CreateCredentialAws +Create a new AWS Credential + * @param optional nil or *CreateCredentialAwsOpts - Optional Parameters: + * @param "AccountSid" (string) - The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. + * @param "Credentials" (string) - A string that contains the AWS access credentials in the format `:`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return AccountsV1CredentialCredentialAws +*/ +func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { + path := "/v1/Credentials/AWS" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.Credentials != nil { + data.Set("Credentials", *params.Credentials) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey' +type CreateCredentialPublicKeyParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PublicKey *string `json:"PublicKey,omitempty"` +} + +/* +CreateCredentialPublicKey Method for CreateCredentialPublicKey +Create a new Public Key Credential + * @param optional nil or *CreateCredentialPublicKeyOpts - Optional Parameters: + * @param "AccountSid" (string) - The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "PublicKey" (string) - A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` +@return AccountsV1CredentialCredentialPublicKey +*/ +func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { + path := "/v1/Credentials/PublicKeys" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PublicKey != nil { + data.Set("PublicKey", *params.PublicKey) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +CreateSecondaryAuthToken Method for CreateSecondaryAuthToken +Create a new secondary Auth Token +@return AccountsV1SecondaryAuthToken +*/ +func (c *DefaultApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error) { + path := "/v1/AuthTokens/Secondary" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1SecondaryAuthToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteCredentialAws Method for DeleteCredentialAws +Delete a Credential from your account + * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to delete. +*/ +func (c *DefaultApiService) DeleteCredentialAws(Sid string) (error) { + path := "/v1/Credentials/AWS/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredentialPublicKey Method for DeleteCredentialPublicKey +Delete a Credential from your account + * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete. +*/ +func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) (error) { + path := "/v1/Credentials/PublicKeys/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken +Delete the secondary Auth Token from your account +*/ +func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) { + path := "/v1/AuthTokens/Secondary" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchCredentialAws Method for FetchCredentialAws +Fetch the AWS credentials specified by the provided Credential Sid + * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to fetch. +@return AccountsV1CredentialCredentialAws +*/ +func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialCredentialAws, error) { + path := "/v1/Credentials/AWS/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredentialPublicKey Method for FetchCredentialPublicKey +Fetch the public key specified by the provided Credential Sid + * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to fetch. +@return AccountsV1CredentialCredentialPublicKey +*/ +func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1CredentialCredentialPublicKey, error) { + path := "/v1/Credentials/PublicKeys/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws' +type ListCredentialAwsParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredentialAws Method for ListCredentialAws +Retrieves a collection of AWS Credentials belonging to the account used to make the request + * @param optional nil or *ListCredentialAwsOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialAwsResponse +*/ +func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (*ListCredentialAwsResponse, error) { + path := "/v1/Credentials/AWS" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialAwsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey' +type ListCredentialPublicKeyParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredentialPublicKey Method for ListCredentialPublicKey +Retrieves a collection of Public Key Credentials belonging to the account used to make the request + * @param optional nil or *ListCredentialPublicKeyOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialPublicKeyResponse +*/ +func (c *DefaultApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) (*ListCredentialPublicKeyResponse, error) { + path := "/v1/Credentials/PublicKeys" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialPublicKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +UpdateAuthTokenPromotion Method for UpdateAuthTokenPromotion +Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error. +@return AccountsV1AuthTokenPromotion +*/ +func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error) { + path := "/v1/AuthTokens/Promote" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1AuthTokenPromotion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws' +type UpdateCredentialAwsParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateCredentialAws Method for UpdateCredentialAws +Modify the properties of a given Account + * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to update. + * @param optional nil or *UpdateCredentialAwsOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return AccountsV1CredentialCredentialAws +*/ +func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { + path := "/v1/Credentials/AWS/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialAws{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey' +type UpdateCredentialPublicKeyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateCredentialPublicKey Method for UpdateCredentialPublicKey +Modify the properties of a given Account + * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to update. + * @param optional nil or *UpdateCredentialPublicKeyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return AccountsV1CredentialCredentialPublicKey +*/ +func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { + path := "/v1/Credentials/PublicKeys/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AccountsV1CredentialCredentialPublicKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md b/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md new file mode 100644 index 000000000..e96444fa6 --- /dev/null +++ b/rest/accounts/v1/docs/AccountsV1AuthTokenPromotion.md @@ -0,0 +1,15 @@ +# AccountsV1AuthTokenPromotion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AuthToken** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md b/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md new file mode 100644 index 000000000..bfe69bfcf --- /dev/null +++ b/rest/accounts/v1/docs/AccountsV1CredentialCredentialAws.md @@ -0,0 +1,16 @@ +# AccountsV1CredentialCredentialAws + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md b/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md new file mode 100644 index 000000000..6a8764e6c --- /dev/null +++ b/rest/accounts/v1/docs/AccountsV1CredentialCredentialPublicKey.md @@ -0,0 +1,16 @@ +# AccountsV1CredentialCredentialPublicKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md b/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md new file mode 100644 index 000000000..7635dfb7b --- /dev/null +++ b/rest/accounts/v1/docs/AccountsV1SecondaryAuthToken.md @@ -0,0 +1,15 @@ +# AccountsV1SecondaryAuthToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**SecondaryAuthToken** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/CreateCredentialAwsRequest.md b/rest/accounts/v1/docs/CreateCredentialAwsRequest.md new file mode 100644 index 000000000..6882cc2ee --- /dev/null +++ b/rest/accounts/v1/docs/CreateCredentialAwsRequest.md @@ -0,0 +1,13 @@ +# CreateCredentialAwsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. | [optional] +**Credentials** | **string** | A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` | +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/CreateCredentialPublicKeyRequest.md b/rest/accounts/v1/docs/CreateCredentialPublicKeyRequest.md new file mode 100644 index 000000000..ee1b1c6a6 --- /dev/null +++ b/rest/accounts/v1/docs/CreateCredentialPublicKeyRequest.md @@ -0,0 +1,13 @@ +# CreateCredentialPublicKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**PublicKey** | **string** | A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/DefaultApi.md b/rest/accounts/v1/docs/DefaultApi.md new file mode 100644 index 000000000..6c90ff4f9 --- /dev/null +++ b/rest/accounts/v1/docs/DefaultApi.md @@ -0,0 +1,513 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCredentialAws**](DefaultApi.md#CreateCredentialAws) | **Post** /v1/Credentials/AWS | +[**CreateCredentialPublicKey**](DefaultApi.md#CreateCredentialPublicKey) | **Post** /v1/Credentials/PublicKeys | +[**CreateSecondaryAuthToken**](DefaultApi.md#CreateSecondaryAuthToken) | **Post** /v1/AuthTokens/Secondary | +[**DeleteCredentialAws**](DefaultApi.md#DeleteCredentialAws) | **Delete** /v1/Credentials/AWS/{Sid} | +[**DeleteCredentialPublicKey**](DefaultApi.md#DeleteCredentialPublicKey) | **Delete** /v1/Credentials/PublicKeys/{Sid} | +[**DeleteSecondaryAuthToken**](DefaultApi.md#DeleteSecondaryAuthToken) | **Delete** /v1/AuthTokens/Secondary | +[**FetchCredentialAws**](DefaultApi.md#FetchCredentialAws) | **Get** /v1/Credentials/AWS/{Sid} | +[**FetchCredentialPublicKey**](DefaultApi.md#FetchCredentialPublicKey) | **Get** /v1/Credentials/PublicKeys/{Sid} | +[**ListCredentialAws**](DefaultApi.md#ListCredentialAws) | **Get** /v1/Credentials/AWS | +[**ListCredentialPublicKey**](DefaultApi.md#ListCredentialPublicKey) | **Get** /v1/Credentials/PublicKeys | +[**UpdateAuthTokenPromotion**](DefaultApi.md#UpdateAuthTokenPromotion) | **Post** /v1/AuthTokens/Promote | +[**UpdateCredentialAws**](DefaultApi.md#UpdateCredentialAws) | **Post** /v1/Credentials/AWS/{Sid} | +[**UpdateCredentialPublicKey**](DefaultApi.md#UpdateCredentialPublicKey) | **Post** /v1/Credentials/PublicKeys/{Sid} | + + + +## CreateCredentialAws + +> AccountsV1CredentialCredentialAws CreateCredentialAws(ctx, optional) + + + +Create a new AWS Credential + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialAwsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialAwsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AccountSid** | **optional.String**| The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. | + **Credentials** | **optional.String**| A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredentialPublicKey + +> AccountsV1CredentialCredentialPublicKey CreateCredentialPublicKey(ctx, optional) + + + +Create a new Public Key Credential + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialPublicKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialPublicKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AccountSid** | **optional.String**| The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **PublicKey** | **optional.String**| A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` | + +### Return type + +[**AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSecondaryAuthToken + +> AccountsV1SecondaryAuthToken CreateSecondaryAuthToken(ctx, ) + + + +Create a new secondary Auth Token + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AccountsV1SecondaryAuthToken**](accounts.v1.secondary_auth_token.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredentialAws + +> DeleteCredentialAws(ctx, Sid) + + + +Delete a Credential from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the AWS resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredentialPublicKey + +> DeleteCredentialPublicKey(ctx, Sid) + + + +Delete a Credential from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PublicKey resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSecondaryAuthToken + +> DeleteSecondaryAuthToken(ctx, ) + + + +Delete the secondary Auth Token from your account + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredentialAws + +> AccountsV1CredentialCredentialAws FetchCredentialAws(ctx, Sid) + + + +Fetch the AWS credentials specified by the provided Credential Sid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the AWS resource to fetch. | + +### Return type + +[**AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredentialPublicKey + +> AccountsV1CredentialCredentialPublicKey FetchCredentialPublicKey(ctx, Sid) + + + +Fetch the public key specified by the provided Credential Sid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PublicKey resource to fetch. | + +### Return type + +[**AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredentialAws + +> ListCredentialAwsResponse ListCredentialAws(ctx, optional) + + + +Retrieves a collection of AWS Credentials belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialAwsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialAwsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialAwsResponse**](ListCredentialAwsResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredentialPublicKey + +> ListCredentialPublicKeyResponse ListCredentialPublicKey(ctx, optional) + + + +Retrieves a collection of Public Key Credentials belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialPublicKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialPublicKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialPublicKeyResponse**](ListCredentialPublicKeyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAuthTokenPromotion + +> AccountsV1AuthTokenPromotion UpdateAuthTokenPromotion(ctx, ) + + + +Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error. + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AccountsV1AuthTokenPromotion**](accounts.v1.auth_token_promotion.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredentialAws + +> AccountsV1CredentialCredentialAws UpdateCredentialAws(ctx, Sid, optional) + + + +Modify the properties of a given Account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the AWS resource to update. | + **optional** | ***UpdateCredentialAwsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialAwsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredentialPublicKey + +> AccountsV1CredentialCredentialPublicKey UpdateCredentialPublicKey(ctx, Sid, optional) + + + +Modify the properties of a given Account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PublicKey resource to update. | + **optional** | ***UpdateCredentialPublicKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialPublicKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/accounts/v1/docs/ListCredentialAwsResponse.md b/rest/accounts/v1/docs/ListCredentialAwsResponse.md new file mode 100644 index 000000000..c86e84f00 --- /dev/null +++ b/rest/accounts/v1/docs/ListCredentialAwsResponse.md @@ -0,0 +1,12 @@ +# ListCredentialAwsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]AccountsV1CredentialCredentialAws**](accounts.v1.credential.credential_aws.md) | | [optional] +**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md b/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md new file mode 100644 index 000000000..5a48b0de0 --- /dev/null +++ b/rest/accounts/v1/docs/ListCredentialAwsResponseMeta.md @@ -0,0 +1,17 @@ +# ListCredentialAwsResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md b/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md new file mode 100644 index 000000000..bd5568fc8 --- /dev/null +++ b/rest/accounts/v1/docs/ListCredentialPublicKeyResponse.md @@ -0,0 +1,12 @@ +# ListCredentialPublicKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]AccountsV1CredentialCredentialPublicKey**](accounts.v1.credential.credential_public_key.md) | | [optional] +**Meta** | [**ListCredentialAwsResponseMeta**](ListCredentialAwsResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/UpdateCredentialAwsRequest.md b/rest/accounts/v1/docs/UpdateCredentialAwsRequest.md new file mode 100644 index 000000000..32af6a672 --- /dev/null +++ b/rest/accounts/v1/docs/UpdateCredentialAwsRequest.md @@ -0,0 +1,11 @@ +# UpdateCredentialAwsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/docs/UpdateCredentialPublicKeyRequest.md b/rest/accounts/v1/docs/UpdateCredentialPublicKeyRequest.md new file mode 100644 index 000000000..824ec47ea --- /dev/null +++ b/rest/accounts/v1/docs/UpdateCredentialPublicKeyRequest.md @@ -0,0 +1,11 @@ +# UpdateCredentialPublicKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go b/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go new file mode 100644 index 000000000..fe3d9ea5a --- /dev/null +++ b/rest/accounts/v1/model_accounts_v1_auth_token_promotion.go @@ -0,0 +1,22 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion +type AccountsV1AuthTokenPromotion struct { + AccountSid string `json:"AccountSid,omitempty"` + AuthToken string `json:"AuthToken,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go b/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go new file mode 100644 index 000000000..ff112fc19 --- /dev/null +++ b/rest/accounts/v1/model_accounts_v1_credential_credential_aws.go @@ -0,0 +1,23 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AccountsV1CredentialCredentialAws struct for AccountsV1CredentialCredentialAws +type AccountsV1CredentialCredentialAws struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go b/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go new file mode 100644 index 000000000..97e73c1aa --- /dev/null +++ b/rest/accounts/v1/model_accounts_v1_credential_credential_public_key.go @@ -0,0 +1,23 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AccountsV1CredentialCredentialPublicKey struct for AccountsV1CredentialCredentialPublicKey +type AccountsV1CredentialCredentialPublicKey struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go b/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go new file mode 100644 index 000000000..c054c915b --- /dev/null +++ b/rest/accounts/v1/model_accounts_v1_secondary_auth_token.go @@ -0,0 +1,22 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AccountsV1SecondaryAuthToken struct for AccountsV1SecondaryAuthToken +type AccountsV1SecondaryAuthToken struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + SecondaryAuthToken string `json:"SecondaryAuthToken,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/accounts/v1/model_create_credential_aws_request.go b/rest/accounts/v1/model_create_credential_aws_request.go new file mode 100644 index 000000000..c011b2562 --- /dev/null +++ b/rest/accounts/v1/model_create_credential_aws_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialAwsRequest struct for CreateCredentialAwsRequest +type CreateCredentialAwsRequest struct { + // The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. + AccountSid string `json:"AccountSid,omitempty"` + // A string that contains the AWS access credentials in the format `:`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` + Credentials string `json:"Credentials"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/accounts/v1/model_create_credential_public_key_request.go b/rest/accounts/v1/model_create_credential_public_key_request.go new file mode 100644 index 000000000..d5ee493b4 --- /dev/null +++ b/rest/accounts/v1/model_create_credential_public_key_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialPublicKeyRequest struct for CreateCredentialPublicKeyRequest +type CreateCredentialPublicKeyRequest struct { + // The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request + AccountSid string `json:"AccountSid,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` + PublicKey string `json:"PublicKey"` +} diff --git a/rest/accounts/v1/model_list_credential_aws_response.go b/rest/accounts/v1/model_list_credential_aws_response.go new file mode 100644 index 000000000..207358525 --- /dev/null +++ b/rest/accounts/v1/model_list_credential_aws_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialAwsResponse struct for ListCredentialAwsResponse +type ListCredentialAwsResponse struct { + Credentials []AccountsV1CredentialCredentialAws `json:"Credentials,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/accounts/v1/model_list_credential_aws_response_meta.go b/rest/accounts/v1/model_list_credential_aws_response_meta.go new file mode 100644 index 000000000..6374282be --- /dev/null +++ b/rest/accounts/v1/model_list_credential_aws_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta +type ListCredentialAwsResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/accounts/v1/model_list_credential_public_key_response.go b/rest/accounts/v1/model_list_credential_public_key_response.go new file mode 100644 index 000000000..4ad145f71 --- /dev/null +++ b/rest/accounts/v1/model_list_credential_public_key_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialPublicKeyResponse struct for ListCredentialPublicKeyResponse +type ListCredentialPublicKeyResponse struct { + Credentials []AccountsV1CredentialCredentialPublicKey `json:"Credentials,omitempty"` + Meta ListCredentialAwsResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/accounts/v1/model_update_credential_aws_request.go b/rest/accounts/v1/model_update_credential_aws_request.go new file mode 100644 index 000000000..e56bf4830 --- /dev/null +++ b/rest/accounts/v1/model_update_credential_aws_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialAwsRequest struct for UpdateCredentialAwsRequest +type UpdateCredentialAwsRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/accounts/v1/model_update_credential_public_key_request.go b/rest/accounts/v1/model_update_credential_public_key_request.go new file mode 100644 index 000000000..e17948a42 --- /dev/null +++ b/rest/accounts/v1/model_update_credential_public_key_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialPublicKeyRequest struct for UpdateCredentialPublicKeyRequest +type UpdateCredentialPublicKeyRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/accounts/v1/response.go b/rest/accounts/v1/response.go new file mode 100644 index 000000000..dd33f40ba --- /dev/null +++ b/rest/accounts/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Accounts + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/verify/.openapi-generator-ignore b/rest/api/v2010/.openapi-generator-ignore similarity index 100% rename from verify/.openapi-generator-ignore rename to rest/api/v2010/.openapi-generator-ignore diff --git a/rest/api/v2010/README.md b/rest/api/v2010/README.md new file mode 100644 index 000000000..2906d43ec --- /dev/null +++ b/rest/api/v2010/README.md @@ -0,0 +1,443 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAccount**](docs/DefaultApi.md#createaccount) | **Post** /2010-04-01/Accounts.json | +*DefaultApi* | [**CreateAddress**](docs/DefaultApi.md#createaddress) | **Post** /2010-04-01/Accounts/{AccountSid}/Addresses.json | +*DefaultApi* | [**CreateApplication**](docs/DefaultApi.md#createapplication) | **Post** /2010-04-01/Accounts/{AccountSid}/Applications.json | +*DefaultApi* | [**CreateCall**](docs/DefaultApi.md#createcall) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls.json | +*DefaultApi* | [**CreateCallFeedbackSummary**](docs/DefaultApi.md#createcallfeedbacksummary) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json | +*DefaultApi* | [**CreateCallRecording**](docs/DefaultApi.md#createcallrecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json | +*DefaultApi* | [**CreateIncomingPhoneNumber**](docs/DefaultApi.md#createincomingphonenumber) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json | +*DefaultApi* | [**CreateIncomingPhoneNumberAssignedAddOn**](docs/DefaultApi.md#createincomingphonenumberassignedaddon) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json | +*DefaultApi* | [**CreateIncomingPhoneNumberLocal**](docs/DefaultApi.md#createincomingphonenumberlocal) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json | +*DefaultApi* | [**CreateIncomingPhoneNumberMobile**](docs/DefaultApi.md#createincomingphonenumbermobile) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json | +*DefaultApi* | [**CreateIncomingPhoneNumberTollFree**](docs/DefaultApi.md#createincomingphonenumbertollfree) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json | +*DefaultApi* | [**CreateMessage**](docs/DefaultApi.md#createmessage) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages.json | +*DefaultApi* | [**CreateMessageFeedback**](docs/DefaultApi.md#createmessagefeedback) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json | +*DefaultApi* | [**CreateNewKey**](docs/DefaultApi.md#createnewkey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys.json | +*DefaultApi* | [**CreateNewSigningKey**](docs/DefaultApi.md#createnewsigningkey) | **Post** /2010-04-01/Accounts/{AccountSid}/SigningKeys.json | +*DefaultApi* | [**CreateParticipant**](docs/DefaultApi.md#createparticipant) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json | +*DefaultApi* | [**CreatePayments**](docs/DefaultApi.md#createpayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json | +*DefaultApi* | [**CreateQueue**](docs/DefaultApi.md#createqueue) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues.json | +*DefaultApi* | [**CreateSipAuthCallsCredentialListMapping**](docs/DefaultApi.md#createsipauthcallscredentiallistmapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json | +*DefaultApi* | [**CreateSipAuthCallsIpAccessControlListMapping**](docs/DefaultApi.md#createsipauthcallsipaccesscontrollistmapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json | +*DefaultApi* | [**CreateSipAuthRegistrationsCredentialListMapping**](docs/DefaultApi.md#createsipauthregistrationscredentiallistmapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json | +*DefaultApi* | [**CreateSipCredential**](docs/DefaultApi.md#createsipcredential) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json | +*DefaultApi* | [**CreateSipCredentialList**](docs/DefaultApi.md#createsipcredentiallist) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json | +*DefaultApi* | [**CreateSipCredentialListMapping**](docs/DefaultApi.md#createsipcredentiallistmapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json | +*DefaultApi* | [**CreateSipDomain**](docs/DefaultApi.md#createsipdomain) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains.json | +*DefaultApi* | [**CreateSipIpAccessControlList**](docs/DefaultApi.md#createsipipaccesscontrollist) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json | +*DefaultApi* | [**CreateSipIpAccessControlListMapping**](docs/DefaultApi.md#createsipipaccesscontrollistmapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json | +*DefaultApi* | [**CreateSipIpAddress**](docs/DefaultApi.md#createsipipaddress) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json | +*DefaultApi* | [**CreateToken**](docs/DefaultApi.md#createtoken) | **Post** /2010-04-01/Accounts/{AccountSid}/Tokens.json | +*DefaultApi* | [**CreateUsageTrigger**](docs/DefaultApi.md#createusagetrigger) | **Post** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json | +*DefaultApi* | [**CreateValidationRequest**](docs/DefaultApi.md#createvalidationrequest) | **Post** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json | +*DefaultApi* | [**DeleteAddress**](docs/DefaultApi.md#deleteaddress) | **Delete** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +*DefaultApi* | [**DeleteApplication**](docs/DefaultApi.md#deleteapplication) | **Delete** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +*DefaultApi* | [**DeleteCall**](docs/DefaultApi.md#deletecall) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +*DefaultApi* | [**DeleteCallFeedbackSummary**](docs/DefaultApi.md#deletecallfeedbacksummary) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json | +*DefaultApi* | [**DeleteCallRecording**](docs/DefaultApi.md#deletecallrecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +*DefaultApi* | [**DeleteConferenceRecording**](docs/DefaultApi.md#deleteconferencerecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +*DefaultApi* | [**DeleteConnectApp**](docs/DefaultApi.md#deleteconnectapp) | **Delete** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +*DefaultApi* | [**DeleteIncomingPhoneNumber**](docs/DefaultApi.md#deleteincomingphonenumber) | **Delete** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +*DefaultApi* | [**DeleteIncomingPhoneNumberAssignedAddOn**](docs/DefaultApi.md#deleteincomingphonenumberassignedaddon) | **Delete** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json | +*DefaultApi* | [**DeleteKey**](docs/DefaultApi.md#deletekey) | **Delete** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +*DefaultApi* | [**DeleteMedia**](docs/DefaultApi.md#deletemedia) | **Delete** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json | +*DefaultApi* | [**DeleteMessage**](docs/DefaultApi.md#deletemessage) | **Delete** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +*DefaultApi* | [**DeleteOutgoingCallerId**](docs/DefaultApi.md#deleteoutgoingcallerid) | **Delete** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +*DefaultApi* | [**DeleteParticipant**](docs/DefaultApi.md#deleteparticipant) | **Delete** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +*DefaultApi* | [**DeleteQueue**](docs/DefaultApi.md#deletequeue) | **Delete** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +*DefaultApi* | [**DeleteRecording**](docs/DefaultApi.md#deleterecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json | +*DefaultApi* | [**DeleteRecordingAddOnResult**](docs/DefaultApi.md#deleterecordingaddonresult) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json | +*DefaultApi* | [**DeleteRecordingAddOnResultPayload**](docs/DefaultApi.md#deleterecordingaddonresultpayload) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json | +*DefaultApi* | [**DeleteRecordingTranscription**](docs/DefaultApi.md#deleterecordingtranscription) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json | +*DefaultApi* | [**DeleteSigningKey**](docs/DefaultApi.md#deletesigningkey) | **Delete** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +*DefaultApi* | [**DeleteSipAuthCallsCredentialListMapping**](docs/DefaultApi.md#deletesipauthcallscredentiallistmapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**DeleteSipAuthCallsIpAccessControlListMapping**](docs/DefaultApi.md#deletesipauthcallsipaccesscontrollistmapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json | +*DefaultApi* | [**DeleteSipAuthRegistrationsCredentialListMapping**](docs/DefaultApi.md#deletesipauthregistrationscredentiallistmapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**DeleteSipCredential**](docs/DefaultApi.md#deletesipcredential) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +*DefaultApi* | [**DeleteSipCredentialList**](docs/DefaultApi.md#deletesipcredentiallist) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +*DefaultApi* | [**DeleteSipCredentialListMapping**](docs/DefaultApi.md#deletesipcredentiallistmapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**DeleteSipDomain**](docs/DefaultApi.md#deletesipdomain) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +*DefaultApi* | [**DeleteSipIpAccessControlList**](docs/DefaultApi.md#deletesipipaccesscontrollist) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +*DefaultApi* | [**DeleteSipIpAccessControlListMapping**](docs/DefaultApi.md#deletesipipaccesscontrollistmapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json | +*DefaultApi* | [**DeleteSipIpAddress**](docs/DefaultApi.md#deletesipipaddress) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +*DefaultApi* | [**DeleteTranscription**](docs/DefaultApi.md#deletetranscription) | **Delete** /2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json | +*DefaultApi* | [**DeleteUsageTrigger**](docs/DefaultApi.md#deleteusagetrigger) | **Delete** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | +*DefaultApi* | [**FetchAccount**](docs/DefaultApi.md#fetchaccount) | **Get** /2010-04-01/Accounts/{Sid}.json | +*DefaultApi* | [**FetchAddress**](docs/DefaultApi.md#fetchaddress) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +*DefaultApi* | [**FetchApplication**](docs/DefaultApi.md#fetchapplication) | **Get** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +*DefaultApi* | [**FetchAuthorizedConnectApp**](docs/DefaultApi.md#fetchauthorizedconnectapp) | **Get** /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json | +*DefaultApi* | [**FetchAvailablePhoneNumberCountry**](docs/DefaultApi.md#fetchavailablephonenumbercountry) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json | +*DefaultApi* | [**FetchBalance**](docs/DefaultApi.md#fetchbalance) | **Get** /2010-04-01/Accounts/{AccountSid}/Balance.json | +*DefaultApi* | [**FetchCall**](docs/DefaultApi.md#fetchcall) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +*DefaultApi* | [**FetchCallFeedback**](docs/DefaultApi.md#fetchcallfeedback) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json | +*DefaultApi* | [**FetchCallFeedbackSummary**](docs/DefaultApi.md#fetchcallfeedbacksummary) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json | +*DefaultApi* | [**FetchCallNotification**](docs/DefaultApi.md#fetchcallnotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json | +*DefaultApi* | [**FetchCallRecording**](docs/DefaultApi.md#fetchcallrecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +*DefaultApi* | [**FetchConference**](docs/DefaultApi.md#fetchconference) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json | +*DefaultApi* | [**FetchConferenceRecording**](docs/DefaultApi.md#fetchconferencerecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +*DefaultApi* | [**FetchConnectApp**](docs/DefaultApi.md#fetchconnectapp) | **Get** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +*DefaultApi* | [**FetchIncomingPhoneNumber**](docs/DefaultApi.md#fetchincomingphonenumber) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +*DefaultApi* | [**FetchIncomingPhoneNumberAssignedAddOn**](docs/DefaultApi.md#fetchincomingphonenumberassignedaddon) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json | +*DefaultApi* | [**FetchIncomingPhoneNumberAssignedAddOnExtension**](docs/DefaultApi.md#fetchincomingphonenumberassignedaddonextension) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json | +*DefaultApi* | [**FetchKey**](docs/DefaultApi.md#fetchkey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +*DefaultApi* | [**FetchMedia**](docs/DefaultApi.md#fetchmedia) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json | +*DefaultApi* | [**FetchMember**](docs/DefaultApi.md#fetchmember) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json | +*DefaultApi* | [**FetchMessage**](docs/DefaultApi.md#fetchmessage) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +*DefaultApi* | [**FetchNotification**](docs/DefaultApi.md#fetchnotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json | +*DefaultApi* | [**FetchOutgoingCallerId**](docs/DefaultApi.md#fetchoutgoingcallerid) | **Get** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +*DefaultApi* | [**FetchParticipant**](docs/DefaultApi.md#fetchparticipant) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +*DefaultApi* | [**FetchQueue**](docs/DefaultApi.md#fetchqueue) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +*DefaultApi* | [**FetchRecording**](docs/DefaultApi.md#fetchrecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json | +*DefaultApi* | [**FetchRecordingAddOnResult**](docs/DefaultApi.md#fetchrecordingaddonresult) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json | +*DefaultApi* | [**FetchRecordingAddOnResultPayload**](docs/DefaultApi.md#fetchrecordingaddonresultpayload) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json | +*DefaultApi* | [**FetchRecordingTranscription**](docs/DefaultApi.md#fetchrecordingtranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json | +*DefaultApi* | [**FetchShortCode**](docs/DefaultApi.md#fetchshortcode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | +*DefaultApi* | [**FetchSigningKey**](docs/DefaultApi.md#fetchsigningkey) | **Get** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +*DefaultApi* | [**FetchSipAuthCallsCredentialListMapping**](docs/DefaultApi.md#fetchsipauthcallscredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**FetchSipAuthCallsIpAccessControlListMapping**](docs/DefaultApi.md#fetchsipauthcallsipaccesscontrollistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json | +*DefaultApi* | [**FetchSipAuthRegistrationsCredentialListMapping**](docs/DefaultApi.md#fetchsipauthregistrationscredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**FetchSipCredential**](docs/DefaultApi.md#fetchsipcredential) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +*DefaultApi* | [**FetchSipCredentialList**](docs/DefaultApi.md#fetchsipcredentiallist) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +*DefaultApi* | [**FetchSipCredentialListMapping**](docs/DefaultApi.md#fetchsipcredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json | +*DefaultApi* | [**FetchSipDomain**](docs/DefaultApi.md#fetchsipdomain) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +*DefaultApi* | [**FetchSipIpAccessControlList**](docs/DefaultApi.md#fetchsipipaccesscontrollist) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +*DefaultApi* | [**FetchSipIpAccessControlListMapping**](docs/DefaultApi.md#fetchsipipaccesscontrollistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json | +*DefaultApi* | [**FetchSipIpAddress**](docs/DefaultApi.md#fetchsipipaddress) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +*DefaultApi* | [**FetchTranscription**](docs/DefaultApi.md#fetchtranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json | +*DefaultApi* | [**FetchUsageTrigger**](docs/DefaultApi.md#fetchusagetrigger) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | +*DefaultApi* | [**ListAccount**](docs/DefaultApi.md#listaccount) | **Get** /2010-04-01/Accounts.json | +*DefaultApi* | [**ListAddress**](docs/DefaultApi.md#listaddress) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses.json | +*DefaultApi* | [**ListApplication**](docs/DefaultApi.md#listapplication) | **Get** /2010-04-01/Accounts/{AccountSid}/Applications.json | +*DefaultApi* | [**ListAuthorizedConnectApp**](docs/DefaultApi.md#listauthorizedconnectapp) | **Get** /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json | +*DefaultApi* | [**ListAvailablePhoneNumberCountry**](docs/DefaultApi.md#listavailablephonenumbercountry) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json | +*DefaultApi* | [**ListAvailablePhoneNumberLocal**](docs/DefaultApi.md#listavailablephonenumberlocal) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json | +*DefaultApi* | [**ListAvailablePhoneNumberMachineToMachine**](docs/DefaultApi.md#listavailablephonenumbermachinetomachine) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json | +*DefaultApi* | [**ListAvailablePhoneNumberMobile**](docs/DefaultApi.md#listavailablephonenumbermobile) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json | +*DefaultApi* | [**ListAvailablePhoneNumberNational**](docs/DefaultApi.md#listavailablephonenumbernational) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json | +*DefaultApi* | [**ListAvailablePhoneNumberSharedCost**](docs/DefaultApi.md#listavailablephonenumbersharedcost) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json | +*DefaultApi* | [**ListAvailablePhoneNumberTollFree**](docs/DefaultApi.md#listavailablephonenumbertollfree) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json | +*DefaultApi* | [**ListAvailablePhoneNumberVoip**](docs/DefaultApi.md#listavailablephonenumbervoip) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json | +*DefaultApi* | [**ListCall**](docs/DefaultApi.md#listcall) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls.json | +*DefaultApi* | [**ListCallEvent**](docs/DefaultApi.md#listcallevent) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json | +*DefaultApi* | [**ListCallNotification**](docs/DefaultApi.md#listcallnotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json | +*DefaultApi* | [**ListCallRecording**](docs/DefaultApi.md#listcallrecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json | +*DefaultApi* | [**ListConference**](docs/DefaultApi.md#listconference) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences.json | +*DefaultApi* | [**ListConferenceRecording**](docs/DefaultApi.md#listconferencerecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json | +*DefaultApi* | [**ListConnectApp**](docs/DefaultApi.md#listconnectapp) | **Get** /2010-04-01/Accounts/{AccountSid}/ConnectApps.json | +*DefaultApi* | [**ListDependentPhoneNumber**](docs/DefaultApi.md#listdependentphonenumber) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json | +*DefaultApi* | [**ListIncomingPhoneNumber**](docs/DefaultApi.md#listincomingphonenumber) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json | +*DefaultApi* | [**ListIncomingPhoneNumberAssignedAddOn**](docs/DefaultApi.md#listincomingphonenumberassignedaddon) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json | +*DefaultApi* | [**ListIncomingPhoneNumberAssignedAddOnExtension**](docs/DefaultApi.md#listincomingphonenumberassignedaddonextension) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json | +*DefaultApi* | [**ListIncomingPhoneNumberLocal**](docs/DefaultApi.md#listincomingphonenumberlocal) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json | +*DefaultApi* | [**ListIncomingPhoneNumberMobile**](docs/DefaultApi.md#listincomingphonenumbermobile) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json | +*DefaultApi* | [**ListIncomingPhoneNumberTollFree**](docs/DefaultApi.md#listincomingphonenumbertollfree) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json | +*DefaultApi* | [**ListKey**](docs/DefaultApi.md#listkey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys.json | +*DefaultApi* | [**ListMedia**](docs/DefaultApi.md#listmedia) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json | +*DefaultApi* | [**ListMember**](docs/DefaultApi.md#listmember) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json | +*DefaultApi* | [**ListMessage**](docs/DefaultApi.md#listmessage) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages.json | +*DefaultApi* | [**ListNotification**](docs/DefaultApi.md#listnotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Notifications.json | +*DefaultApi* | [**ListOutgoingCallerId**](docs/DefaultApi.md#listoutgoingcallerid) | **Get** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json | +*DefaultApi* | [**ListParticipant**](docs/DefaultApi.md#listparticipant) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json | +*DefaultApi* | [**ListQueue**](docs/DefaultApi.md#listqueue) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues.json | +*DefaultApi* | [**ListRecording**](docs/DefaultApi.md#listrecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings.json | +*DefaultApi* | [**ListRecordingAddOnResult**](docs/DefaultApi.md#listrecordingaddonresult) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json | +*DefaultApi* | [**ListRecordingAddOnResultPayload**](docs/DefaultApi.md#listrecordingaddonresultpayload) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json | +*DefaultApi* | [**ListRecordingTranscription**](docs/DefaultApi.md#listrecordingtranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json | +*DefaultApi* | [**ListShortCode**](docs/DefaultApi.md#listshortcode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json | +*DefaultApi* | [**ListSigningKey**](docs/DefaultApi.md#listsigningkey) | **Get** /2010-04-01/Accounts/{AccountSid}/SigningKeys.json | +*DefaultApi* | [**ListSipAuthCallsCredentialListMapping**](docs/DefaultApi.md#listsipauthcallscredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json | +*DefaultApi* | [**ListSipAuthCallsIpAccessControlListMapping**](docs/DefaultApi.md#listsipauthcallsipaccesscontrollistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json | +*DefaultApi* | [**ListSipAuthRegistrationsCredentialListMapping**](docs/DefaultApi.md#listsipauthregistrationscredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json | +*DefaultApi* | [**ListSipCredential**](docs/DefaultApi.md#listsipcredential) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json | +*DefaultApi* | [**ListSipCredentialList**](docs/DefaultApi.md#listsipcredentiallist) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json | +*DefaultApi* | [**ListSipCredentialListMapping**](docs/DefaultApi.md#listsipcredentiallistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json | +*DefaultApi* | [**ListSipDomain**](docs/DefaultApi.md#listsipdomain) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains.json | +*DefaultApi* | [**ListSipIpAccessControlList**](docs/DefaultApi.md#listsipipaccesscontrollist) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json | +*DefaultApi* | [**ListSipIpAccessControlListMapping**](docs/DefaultApi.md#listsipipaccesscontrollistmapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json | +*DefaultApi* | [**ListSipIpAddress**](docs/DefaultApi.md#listsipipaddress) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json | +*DefaultApi* | [**ListTranscription**](docs/DefaultApi.md#listtranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Transcriptions.json | +*DefaultApi* | [**ListUsageRecord**](docs/DefaultApi.md#listusagerecord) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records.json | +*DefaultApi* | [**ListUsageRecordAllTime**](docs/DefaultApi.md#listusagerecordalltime) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json | +*DefaultApi* | [**ListUsageRecordDaily**](docs/DefaultApi.md#listusagerecorddaily) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json | +*DefaultApi* | [**ListUsageRecordLastMonth**](docs/DefaultApi.md#listusagerecordlastmonth) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json | +*DefaultApi* | [**ListUsageRecordMonthly**](docs/DefaultApi.md#listusagerecordmonthly) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json | +*DefaultApi* | [**ListUsageRecordThisMonth**](docs/DefaultApi.md#listusagerecordthismonth) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json | +*DefaultApi* | [**ListUsageRecordToday**](docs/DefaultApi.md#listusagerecordtoday) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json | +*DefaultApi* | [**ListUsageRecordYearly**](docs/DefaultApi.md#listusagerecordyearly) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json | +*DefaultApi* | [**ListUsageRecordYesterday**](docs/DefaultApi.md#listusagerecordyesterday) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json | +*DefaultApi* | [**ListUsageTrigger**](docs/DefaultApi.md#listusagetrigger) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json | +*DefaultApi* | [**UpdateAccount**](docs/DefaultApi.md#updateaccount) | **Post** /2010-04-01/Accounts/{Sid}.json | +*DefaultApi* | [**UpdateAddress**](docs/DefaultApi.md#updateaddress) | **Post** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +*DefaultApi* | [**UpdateApplication**](docs/DefaultApi.md#updateapplication) | **Post** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +*DefaultApi* | [**UpdateCall**](docs/DefaultApi.md#updatecall) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +*DefaultApi* | [**UpdateCallFeedback**](docs/DefaultApi.md#updatecallfeedback) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json | +*DefaultApi* | [**UpdateCallRecording**](docs/DefaultApi.md#updatecallrecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +*DefaultApi* | [**UpdateConference**](docs/DefaultApi.md#updateconference) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json | +*DefaultApi* | [**UpdateConferenceRecording**](docs/DefaultApi.md#updateconferencerecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +*DefaultApi* | [**UpdateConnectApp**](docs/DefaultApi.md#updateconnectapp) | **Post** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +*DefaultApi* | [**UpdateIncomingPhoneNumber**](docs/DefaultApi.md#updateincomingphonenumber) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +*DefaultApi* | [**UpdateKey**](docs/DefaultApi.md#updatekey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +*DefaultApi* | [**UpdateMember**](docs/DefaultApi.md#updatemember) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json | +*DefaultApi* | [**UpdateMessage**](docs/DefaultApi.md#updatemessage) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +*DefaultApi* | [**UpdateOutgoingCallerId**](docs/DefaultApi.md#updateoutgoingcallerid) | **Post** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +*DefaultApi* | [**UpdateParticipant**](docs/DefaultApi.md#updateparticipant) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +*DefaultApi* | [**UpdatePayments**](docs/DefaultApi.md#updatepayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json | +*DefaultApi* | [**UpdateQueue**](docs/DefaultApi.md#updatequeue) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +*DefaultApi* | [**UpdateShortCode**](docs/DefaultApi.md#updateshortcode) | **Post** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | +*DefaultApi* | [**UpdateSigningKey**](docs/DefaultApi.md#updatesigningkey) | **Post** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +*DefaultApi* | [**UpdateSipCredential**](docs/DefaultApi.md#updatesipcredential) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +*DefaultApi* | [**UpdateSipCredentialList**](docs/DefaultApi.md#updatesipcredentiallist) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +*DefaultApi* | [**UpdateSipDomain**](docs/DefaultApi.md#updatesipdomain) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +*DefaultApi* | [**UpdateSipIpAccessControlList**](docs/DefaultApi.md#updatesipipaccesscontrollist) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +*DefaultApi* | [**UpdateSipIpAddress**](docs/DefaultApi.md#updatesipipaddress) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +*DefaultApi* | [**UpdateUsageTrigger**](docs/DefaultApi.md#updateusagetrigger) | **Post** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | + + +## Documentation For Models + + - [ApiV2010Account](docs/ApiV2010Account.md) + - [ApiV2010AccountAddress](docs/ApiV2010AccountAddress.md) + - [ApiV2010AccountAddressDependentPhoneNumber](docs/ApiV2010AccountAddressDependentPhoneNumber.md) + - [ApiV2010AccountApplication](docs/ApiV2010AccountApplication.md) + - [ApiV2010AccountAuthorizedConnectApp](docs/ApiV2010AccountAuthorizedConnectApp.md) + - [ApiV2010AccountAvailablePhoneNumberCountry](docs/ApiV2010AccountAvailablePhoneNumberCountry.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md) + - [ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip](docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md) + - [ApiV2010AccountBalance](docs/ApiV2010AccountBalance.md) + - [ApiV2010AccountCall](docs/ApiV2010AccountCall.md) + - [ApiV2010AccountCallCallEvent](docs/ApiV2010AccountCallCallEvent.md) + - [ApiV2010AccountCallCallFeedback](docs/ApiV2010AccountCallCallFeedback.md) + - [ApiV2010AccountCallCallFeedbackSummary](docs/ApiV2010AccountCallCallFeedbackSummary.md) + - [ApiV2010AccountCallCallNotification](docs/ApiV2010AccountCallCallNotification.md) + - [ApiV2010AccountCallCallNotificationInstance](docs/ApiV2010AccountCallCallNotificationInstance.md) + - [ApiV2010AccountCallCallRecording](docs/ApiV2010AccountCallCallRecording.md) + - [ApiV2010AccountCallPayments](docs/ApiV2010AccountCallPayments.md) + - [ApiV2010AccountConference](docs/ApiV2010AccountConference.md) + - [ApiV2010AccountConferenceConferenceRecording](docs/ApiV2010AccountConferenceConferenceRecording.md) + - [ApiV2010AccountConferenceParticipant](docs/ApiV2010AccountConferenceParticipant.md) + - [ApiV2010AccountConnectApp](docs/ApiV2010AccountConnectApp.md) + - [ApiV2010AccountIncomingPhoneNumber](docs/ApiV2010AccountIncomingPhoneNumber.md) + - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md) + - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md) + - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md) + - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md) + - [ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree](docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md) + - [ApiV2010AccountKey](docs/ApiV2010AccountKey.md) + - [ApiV2010AccountMessage](docs/ApiV2010AccountMessage.md) + - [ApiV2010AccountMessageMedia](docs/ApiV2010AccountMessageMedia.md) + - [ApiV2010AccountMessageMessageFeedback](docs/ApiV2010AccountMessageMessageFeedback.md) + - [ApiV2010AccountNewKey](docs/ApiV2010AccountNewKey.md) + - [ApiV2010AccountNewSigningKey](docs/ApiV2010AccountNewSigningKey.md) + - [ApiV2010AccountNotification](docs/ApiV2010AccountNotification.md) + - [ApiV2010AccountNotificationInstance](docs/ApiV2010AccountNotificationInstance.md) + - [ApiV2010AccountOutgoingCallerId](docs/ApiV2010AccountOutgoingCallerId.md) + - [ApiV2010AccountQueue](docs/ApiV2010AccountQueue.md) + - [ApiV2010AccountQueueMember](docs/ApiV2010AccountQueueMember.md) + - [ApiV2010AccountRecording](docs/ApiV2010AccountRecording.md) + - [ApiV2010AccountRecordingRecordingAddOnResult](docs/ApiV2010AccountRecordingRecordingAddOnResult.md) + - [ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload](docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md) + - [ApiV2010AccountRecordingRecordingTranscription](docs/ApiV2010AccountRecordingRecordingTranscription.md) + - [ApiV2010AccountShortCode](docs/ApiV2010AccountShortCode.md) + - [ApiV2010AccountSigningKey](docs/ApiV2010AccountSigningKey.md) + - [ApiV2010AccountSipSipCredentialList](docs/ApiV2010AccountSipSipCredentialList.md) + - [ApiV2010AccountSipSipCredentialListSipCredential](docs/ApiV2010AccountSipSipCredentialListSipCredential.md) + - [ApiV2010AccountSipSipDomain](docs/ApiV2010AccountSipSipDomain.md) + - [ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping](docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md) + - [ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping](docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md) + - [ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping](docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md) + - [ApiV2010AccountSipSipDomainSipCredentialListMapping](docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md) + - [ApiV2010AccountSipSipDomainSipIpAccessControlListMapping](docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md) + - [ApiV2010AccountSipSipIpAccessControlList](docs/ApiV2010AccountSipSipIpAccessControlList.md) + - [ApiV2010AccountSipSipIpAccessControlListSipIpAddress](docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md) + - [ApiV2010AccountToken](docs/ApiV2010AccountToken.md) + - [ApiV2010AccountTranscription](docs/ApiV2010AccountTranscription.md) + - [ApiV2010AccountUsageUsageRecord](docs/ApiV2010AccountUsageUsageRecord.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordAllTime](docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordDaily](docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordLastMonth](docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordMonthly](docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordThisMonth](docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordToday](docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordYearly](docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md) + - [ApiV2010AccountUsageUsageRecordUsageRecordYesterday](docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md) + - [ApiV2010AccountUsageUsageTrigger](docs/ApiV2010AccountUsageUsageTrigger.md) + - [ApiV2010AccountValidationRequest](docs/ApiV2010AccountValidationRequest.md) + - [CreateAccountRequest](docs/CreateAccountRequest.md) + - [CreateAddressRequest](docs/CreateAddressRequest.md) + - [CreateApplicationRequest](docs/CreateApplicationRequest.md) + - [CreateCallFeedbackSummaryRequest](docs/CreateCallFeedbackSummaryRequest.md) + - [CreateCallRecordingRequest](docs/CreateCallRecordingRequest.md) + - [CreateCallRequest](docs/CreateCallRequest.md) + - [CreateIncomingPhoneNumberAssignedAddOnRequest](docs/CreateIncomingPhoneNumberAssignedAddOnRequest.md) + - [CreateIncomingPhoneNumberLocalRequest](docs/CreateIncomingPhoneNumberLocalRequest.md) + - [CreateIncomingPhoneNumberMobileRequest](docs/CreateIncomingPhoneNumberMobileRequest.md) + - [CreateIncomingPhoneNumberRequest](docs/CreateIncomingPhoneNumberRequest.md) + - [CreateIncomingPhoneNumberTollFreeRequest](docs/CreateIncomingPhoneNumberTollFreeRequest.md) + - [CreateMessageFeedbackRequest](docs/CreateMessageFeedbackRequest.md) + - [CreateMessageRequest](docs/CreateMessageRequest.md) + - [CreateNewKeyRequest](docs/CreateNewKeyRequest.md) + - [CreateNewSigningKeyRequest](docs/CreateNewSigningKeyRequest.md) + - [CreateParticipantRequest](docs/CreateParticipantRequest.md) + - [CreatePaymentsRequest](docs/CreatePaymentsRequest.md) + - [CreateQueueRequest](docs/CreateQueueRequest.md) + - [CreateSipAuthCallsCredentialListMappingRequest](docs/CreateSipAuthCallsCredentialListMappingRequest.md) + - [CreateSipAuthCallsIpAccessControlListMappingRequest](docs/CreateSipAuthCallsIpAccessControlListMappingRequest.md) + - [CreateSipAuthRegistrationsCredentialListMappingRequest](docs/CreateSipAuthRegistrationsCredentialListMappingRequest.md) + - [CreateSipCredentialListMappingRequest](docs/CreateSipCredentialListMappingRequest.md) + - [CreateSipCredentialListRequest](docs/CreateSipCredentialListRequest.md) + - [CreateSipCredentialRequest](docs/CreateSipCredentialRequest.md) + - [CreateSipDomainRequest](docs/CreateSipDomainRequest.md) + - [CreateSipIpAccessControlListMappingRequest](docs/CreateSipIpAccessControlListMappingRequest.md) + - [CreateSipIpAccessControlListRequest](docs/CreateSipIpAccessControlListRequest.md) + - [CreateSipIpAddressRequest](docs/CreateSipIpAddressRequest.md) + - [CreateTokenRequest](docs/CreateTokenRequest.md) + - [CreateUsageTriggerRequest](docs/CreateUsageTriggerRequest.md) + - [CreateValidationRequestRequest](docs/CreateValidationRequestRequest.md) + - [ListAccountResponse](docs/ListAccountResponse.md) + - [ListAddressResponse](docs/ListAddressResponse.md) + - [ListApplicationResponse](docs/ListApplicationResponse.md) + - [ListAuthorizedConnectAppResponse](docs/ListAuthorizedConnectAppResponse.md) + - [ListAvailablePhoneNumberCountryResponse](docs/ListAvailablePhoneNumberCountryResponse.md) + - [ListAvailablePhoneNumberLocalResponse](docs/ListAvailablePhoneNumberLocalResponse.md) + - [ListAvailablePhoneNumberMachineToMachineResponse](docs/ListAvailablePhoneNumberMachineToMachineResponse.md) + - [ListAvailablePhoneNumberMobileResponse](docs/ListAvailablePhoneNumberMobileResponse.md) + - [ListAvailablePhoneNumberNationalResponse](docs/ListAvailablePhoneNumberNationalResponse.md) + - [ListAvailablePhoneNumberSharedCostResponse](docs/ListAvailablePhoneNumberSharedCostResponse.md) + - [ListAvailablePhoneNumberTollFreeResponse](docs/ListAvailablePhoneNumberTollFreeResponse.md) + - [ListAvailablePhoneNumberVoipResponse](docs/ListAvailablePhoneNumberVoipResponse.md) + - [ListCallEventResponse](docs/ListCallEventResponse.md) + - [ListCallNotificationResponse](docs/ListCallNotificationResponse.md) + - [ListCallRecordingResponse](docs/ListCallRecordingResponse.md) + - [ListCallResponse](docs/ListCallResponse.md) + - [ListConferenceRecordingResponse](docs/ListConferenceRecordingResponse.md) + - [ListConferenceResponse](docs/ListConferenceResponse.md) + - [ListConnectAppResponse](docs/ListConnectAppResponse.md) + - [ListDependentPhoneNumberResponse](docs/ListDependentPhoneNumberResponse.md) + - [ListIncomingPhoneNumberAssignedAddOnExtensionResponse](docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md) + - [ListIncomingPhoneNumberAssignedAddOnResponse](docs/ListIncomingPhoneNumberAssignedAddOnResponse.md) + - [ListIncomingPhoneNumberLocalResponse](docs/ListIncomingPhoneNumberLocalResponse.md) + - [ListIncomingPhoneNumberMobileResponse](docs/ListIncomingPhoneNumberMobileResponse.md) + - [ListIncomingPhoneNumberResponse](docs/ListIncomingPhoneNumberResponse.md) + - [ListIncomingPhoneNumberTollFreeResponse](docs/ListIncomingPhoneNumberTollFreeResponse.md) + - [ListKeyResponse](docs/ListKeyResponse.md) + - [ListMediaResponse](docs/ListMediaResponse.md) + - [ListMemberResponse](docs/ListMemberResponse.md) + - [ListMessageResponse](docs/ListMessageResponse.md) + - [ListNotificationResponse](docs/ListNotificationResponse.md) + - [ListOutgoingCallerIdResponse](docs/ListOutgoingCallerIdResponse.md) + - [ListParticipantResponse](docs/ListParticipantResponse.md) + - [ListQueueResponse](docs/ListQueueResponse.md) + - [ListRecordingAddOnResultPayloadResponse](docs/ListRecordingAddOnResultPayloadResponse.md) + - [ListRecordingAddOnResultResponse](docs/ListRecordingAddOnResultResponse.md) + - [ListRecordingResponse](docs/ListRecordingResponse.md) + - [ListRecordingTranscriptionResponse](docs/ListRecordingTranscriptionResponse.md) + - [ListShortCodeResponse](docs/ListShortCodeResponse.md) + - [ListSigningKeyResponse](docs/ListSigningKeyResponse.md) + - [ListSipAuthCallsCredentialListMappingResponse](docs/ListSipAuthCallsCredentialListMappingResponse.md) + - [ListSipAuthCallsIpAccessControlListMappingResponse](docs/ListSipAuthCallsIpAccessControlListMappingResponse.md) + - [ListSipAuthRegistrationsCredentialListMappingResponse](docs/ListSipAuthRegistrationsCredentialListMappingResponse.md) + - [ListSipCredentialListMappingResponse](docs/ListSipCredentialListMappingResponse.md) + - [ListSipCredentialListResponse](docs/ListSipCredentialListResponse.md) + - [ListSipCredentialResponse](docs/ListSipCredentialResponse.md) + - [ListSipDomainResponse](docs/ListSipDomainResponse.md) + - [ListSipIpAccessControlListMappingResponse](docs/ListSipIpAccessControlListMappingResponse.md) + - [ListSipIpAccessControlListResponse](docs/ListSipIpAccessControlListResponse.md) + - [ListSipIpAddressResponse](docs/ListSipIpAddressResponse.md) + - [ListTranscriptionResponse](docs/ListTranscriptionResponse.md) + - [ListUsageRecordAllTimeResponse](docs/ListUsageRecordAllTimeResponse.md) + - [ListUsageRecordDailyResponse](docs/ListUsageRecordDailyResponse.md) + - [ListUsageRecordLastMonthResponse](docs/ListUsageRecordLastMonthResponse.md) + - [ListUsageRecordMonthlyResponse](docs/ListUsageRecordMonthlyResponse.md) + - [ListUsageRecordResponse](docs/ListUsageRecordResponse.md) + - [ListUsageRecordThisMonthResponse](docs/ListUsageRecordThisMonthResponse.md) + - [ListUsageRecordTodayResponse](docs/ListUsageRecordTodayResponse.md) + - [ListUsageRecordYearlyResponse](docs/ListUsageRecordYearlyResponse.md) + - [ListUsageRecordYesterdayResponse](docs/ListUsageRecordYesterdayResponse.md) + - [ListUsageTriggerResponse](docs/ListUsageTriggerResponse.md) + - [UpdateAccountRequest](docs/UpdateAccountRequest.md) + - [UpdateAddressRequest](docs/UpdateAddressRequest.md) + - [UpdateApplicationRequest](docs/UpdateApplicationRequest.md) + - [UpdateCallFeedbackRequest](docs/UpdateCallFeedbackRequest.md) + - [UpdateCallRecordingRequest](docs/UpdateCallRecordingRequest.md) + - [UpdateCallRequest](docs/UpdateCallRequest.md) + - [UpdateConferenceRecordingRequest](docs/UpdateConferenceRecordingRequest.md) + - [UpdateConferenceRequest](docs/UpdateConferenceRequest.md) + - [UpdateConnectAppRequest](docs/UpdateConnectAppRequest.md) + - [UpdateIncomingPhoneNumberRequest](docs/UpdateIncomingPhoneNumberRequest.md) + - [UpdateKeyRequest](docs/UpdateKeyRequest.md) + - [UpdateMemberRequest](docs/UpdateMemberRequest.md) + - [UpdateMessageRequest](docs/UpdateMessageRequest.md) + - [UpdateOutgoingCallerIdRequest](docs/UpdateOutgoingCallerIdRequest.md) + - [UpdateParticipantRequest](docs/UpdateParticipantRequest.md) + - [UpdatePaymentsRequest](docs/UpdatePaymentsRequest.md) + - [UpdateQueueRequest](docs/UpdateQueueRequest.md) + - [UpdateShortCodeRequest](docs/UpdateShortCodeRequest.md) + - [UpdateSigningKeyRequest](docs/UpdateSigningKeyRequest.md) + - [UpdateSipCredentialListRequest](docs/UpdateSipCredentialListRequest.md) + - [UpdateSipCredentialRequest](docs/UpdateSipCredentialRequest.md) + - [UpdateSipDomainRequest](docs/UpdateSipDomainRequest.md) + - [UpdateSipIpAccessControlListRequest](docs/UpdateSipIpAccessControlListRequest.md) + - [UpdateSipIpAddressRequest](docs/UpdateSipIpAddressRequest.md) + - [UpdateUsageTriggerRequest](docs/UpdateUsageTriggerRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/api/v2010/api_default.go b/rest/api/v2010/api_default.go new file mode 100644 index 000000000..7e404f7ec --- /dev/null +++ b/rest/api/v2010/api_default.go @@ -0,0 +1,10086 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://api.twilio.com"), + } +} +// CreateAccountParams Optional parameters for the method 'CreateAccount' +type CreateAccountParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateAccount Method for CreateAccount +Create a new Twilio Subaccount from the account making the request + * @param optional nil or *CreateAccountOpts - Optional Parameters: + * @param "FriendlyName" (string) - A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` +@return ApiV2010Account +*/ +func (c *DefaultApiService) CreateAccount(params *CreateAccountParams) (*ApiV2010Account, error) { + path := "/2010-04-01/Accounts.json" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateAddressParams Optional parameters for the method 'CreateAddress' +type CreateAddressParams struct { + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` +} + +/* +CreateAddress Method for CreateAddress + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource. + * @param optional nil or *CreateAddressOpts - Optional Parameters: + * @param "AutoCorrectAddress" (bool) - Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + * @param "City" (string) - The city of the new address. + * @param "CustomerName" (string) - The name to associate with the new address. + * @param "EmergencyEnabled" (bool) - Whether to enable emergency calling on the new address. Can be: `true` or `false`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new address. It can be up to 64 characters long. + * @param "IsoCountry" (string) - The ISO country code of the new address. + * @param "PostalCode" (string) - The postal code of the new address. + * @param "Region" (string) - The state or region of the new address. + * @param "Street" (string) - The number and street address of the new address. +@return ApiV2010AccountAddress +*/ +func (c *DefaultApiService) CreateAddress(AccountSid string, params *CreateAddressParams) (*ApiV2010AccountAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) + } + if params != nil && params.City != nil { + data.Set("City", *params.City) + } + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateApplicationParams Optional parameters for the method 'CreateApplication' +type CreateApplicationParams struct { + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateApplication Method for CreateApplication +Create a new application within your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateApplicationOpts - Optional Parameters: + * @param "ApiVersion" (string) - The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new application. It can be up to 64 characters long. + * @param "MessageStatusCallback" (string) - The URL we should call using a POST method to send message status information to your application. + * @param "SmsFallbackMethod" (string) - The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + * @param "SmsMethod" (string) - The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + * @param "SmsStatusCallback" (string) - The URL we should call using a POST method to send status information about SMS messages sent by the application. + * @param "SmsUrl" (string) - The URL we should call when the phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + * @param "VoiceCallerIdLookup" (bool) - Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. +@return ApiV2010AccountApplication +*/ +func (c *DefaultApiService) CreateApplication(AccountSid string, params *CreateApplicationParams) (*ApiV2010AccountApplication, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCallParams Optional parameters for the method 'CreateCall' +type CreateCallParams struct { + ApplicationSid *string `json:"ApplicationSid,omitempty"` + AsyncAmd *string `json:"AsyncAmd,omitempty"` + AsyncAmdStatusCallback *string `json:"AsyncAmdStatusCallback,omitempty"` + AsyncAmdStatusCallbackMethod *string `json:"AsyncAmdStatusCallbackMethod,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + From *string `json:"From,omitempty"` + MachineDetection *string `json:"MachineDetection,omitempty"` + MachineDetectionSilenceTimeout *int32 `json:"MachineDetectionSilenceTimeout,omitempty"` + MachineDetectionSpeechEndThreshold *int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` + MachineDetectionSpeechThreshold *int32 `json:"MachineDetectionSpeechThreshold,omitempty"` + MachineDetectionTimeout *int32 `json:"MachineDetectionTimeout,omitempty"` + Method *string `json:"Method,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + Trim *string `json:"Trim,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` +} + +/* +CreateCall Method for CreateCall +Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateCallOpts - Optional Parameters: + * @param "ApplicationSid" (string) - The SID of the Application resource that will handle the call, if the call will be handled by an application. + * @param "AsyncAmd" (string) - Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. + * @param "AsyncAmdStatusCallback" (string) - The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + * @param "AsyncAmdStatusCallbackMethod" (string) - The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + * @param "Byoc" (string) - The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + * @param "CallReason" (string) - The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + * @param "CallerId" (string) - The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + * @param "FallbackMethod" (string) - The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "FallbackUrl" (string) - The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "From" (string) - The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. + * @param "MachineDetection" (string) - Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + * @param "MachineDetectionSilenceTimeout" (int32) - The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + * @param "MachineDetectionSpeechEndThreshold" (int32) - The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + * @param "MachineDetectionSpeechThreshold" (int32) - The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + * @param "MachineDetectionTimeout" (int32) - The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + * @param "Method" (string) - The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "Record" (bool) - Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. + * @param "RecordingChannels" (string) - The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. + * @param "RecordingStatusCallback" (string) - The URL that we call when the recording is available to be accessed. + * @param "RecordingStatusCallbackEvent" ([]string) - The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. + * @param "RecordingStatusCallbackMethod" (string) - The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + * @param "RecordingTrack" (string) - The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + * @param "SendDigits" (string) - A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. + * @param "SipAuthPassword" (string) - The password required to authenticate the user account specified in `sip_auth_username`. + * @param "SipAuthUsername" (string) - The username used to authenticate the caller making a SIP call. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + * @param "StatusCallbackEvent" ([]string) - The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "Timeout" (int32) - The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. + * @param "To" (string) - The phone number, SIP address, or client identifier to call. + * @param "Trim" (string) - Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. + * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). +@return ApiV2010AccountCall +*/ +func (c *DefaultApiService) CreateCall(AccountSid string, params *CreateCallParams) (*ApiV2010AccountCall, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) + } + if params != nil && params.AsyncAmd != nil { + data.Set("AsyncAmd", *params.AsyncAmd) + } + if params != nil && params.AsyncAmdStatusCallback != nil { + data.Set("AsyncAmdStatusCallback", *params.AsyncAmdStatusCallback) + } + if params != nil && params.AsyncAmdStatusCallbackMethod != nil { + data.Set("AsyncAmdStatusCallbackMethod", *params.AsyncAmdStatusCallbackMethod) + } + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) + } + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) + } + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MachineDetection != nil { + data.Set("MachineDetection", *params.MachineDetection) + } + if params != nil && params.MachineDetectionSilenceTimeout != nil { + data.Set("MachineDetectionSilenceTimeout", fmt.Sprint(*params.MachineDetectionSilenceTimeout)) + } + if params != nil && params.MachineDetectionSpeechEndThreshold != nil { + data.Set("MachineDetectionSpeechEndThreshold", fmt.Sprint(*params.MachineDetectionSpeechEndThreshold)) + } + if params != nil && params.MachineDetectionSpeechThreshold != nil { + data.Set("MachineDetectionSpeechThreshold", fmt.Sprint(*params.MachineDetectionSpeechThreshold)) + } + if params != nil && params.MachineDetectionTimeout != nil { + data.Set("MachineDetectionTimeout", fmt.Sprint(*params.MachineDetectionTimeout)) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCallFeedbackSummaryParams Optional parameters for the method 'CreateCallFeedbackSummary' +type CreateCallFeedbackSummaryParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` +} + +/* +CreateCallFeedbackSummary Method for CreateCallFeedbackSummary +Create a FeedbackSummary resource for a call + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param optional nil or *CreateCallFeedbackSummaryOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. + * @param "IncludeSubaccounts" (bool) - Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. + * @param "StartDate" (time.Time) - Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. + * @param "StatusCallback" (string) - The URL that we will request when the feedback summary is complete. + * @param "StatusCallbackMethod" (string) - The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. +@return ApiV2010AccountCallCallFeedbackSummary +*/ +func (c *DefaultApiService) CreateCallFeedbackSummary(AccountSid string, params *CreateCallFeedbackSummaryParams) (*ApiV2010AccountCallCallFeedbackSummary, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCallRecordingParams Optional parameters for the method 'CreateCallRecording' +type CreateCallRecordingParams struct { + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Trim *string `json:"Trim,omitempty"` +} + +/* +CreateCallRecording Method for CreateCallRecording +Create a recording for the call + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param CallSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with. + * @param optional nil or *CreateCallRecordingOpts - Optional Parameters: + * @param "RecordingChannels" (string) - The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. + * @param "RecordingStatusCallback" (string) - The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). + * @param "RecordingStatusCallbackEvent" ([]string) - The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. + * @param "RecordingStatusCallbackMethod" (string) - The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. + * @param "RecordingTrack" (string) - The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + * @param "Trim" (string) - Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. +@return ApiV2010AccountCallCallRecording +*/ +func (c *DefaultApiService) CreateCallRecording(AccountSid string, CallSid string, params *CreateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIncomingPhoneNumberParams Optional parameters for the method 'CreateIncomingPhoneNumber' +type CreateIncomingPhoneNumberParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + AreaCode *string `json:"AreaCode,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateIncomingPhoneNumber Method for CreateIncomingPhoneNumber +Purchase a phone-number for the account. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateIncomingPhoneNumberOpts - Optional Parameters: + * @param "AddressSid" (string) - The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + * @param "ApiVersion" (string) - The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + * @param "AreaCode" (string) - The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). + * @param "BundleSid" (string) - The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + * @param "EmergencyAddressSid" (string) - The SID of the emergency address configuration to use for emergency calling from the new phone number. + * @param "EmergencyStatus" (string) - The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. + * @param "IdentitySid" (string) - The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + * @param "PhoneNumber" (string) - The phone number to purchase specified 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. + * @param "SmsApplicationSid" (string) - The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + * @param "SmsMethod" (string) - The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsUrl" (string) - The URL we should call when the new phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "TrunkSid" (string) - The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + * @param "VoiceApplicationSid" (string) - The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + * @param "VoiceCallerIdLookup" (bool) - Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. +@return ApiV2010AccountIncomingPhoneNumber +*/ +func (c *DefaultApiService) CreateIncomingPhoneNumber(AccountSid string, params *CreateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", *params.AreaCode) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'CreateIncomingPhoneNumberAssignedAddOn' +type CreateIncomingPhoneNumberAssignedAddOnParams struct { + InstalledAddOnSid *string `json:"InstalledAddOnSid,omitempty"` +} + +/* +CreateIncomingPhoneNumberAssignedAddOn Method for CreateIncomingPhoneNumberAssignedAddOn +Assign an Add-on installation to the Number specified. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param ResourceSid The SID of the Phone Number to assign the Add-on. + * @param optional nil or *CreateIncomingPhoneNumberAssignedAddOnOpts - Optional Parameters: + * @param "InstalledAddOnSid" (string) - The SID that identifies the Add-on installation. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn +*/ +func (c *DefaultApiService) CreateIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *CreateIncomingPhoneNumberAssignedAddOnParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.InstalledAddOnSid != nil { + data.Set("InstalledAddOnSid", *params.InstalledAddOnSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIncomingPhoneNumberLocalParams Optional parameters for the method 'CreateIncomingPhoneNumberLocal' +type CreateIncomingPhoneNumberLocalParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateIncomingPhoneNumberLocal Method for CreateIncomingPhoneNumberLocal + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateIncomingPhoneNumberLocalOpts - Optional Parameters: + * @param "AddressSid" (string) - The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + * @param "ApiVersion" (string) - The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + * @param "BundleSid" (string) - The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + * @param "EmergencyAddressSid" (string) - The SID of the emergency address configuration to use for emergency calling from the new phone number. + * @param "EmergencyStatus" (string) - The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + * @param "IdentitySid" (string) - The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + * @param "PhoneNumber" (string) - The phone number to purchase specified 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. + * @param "SmsApplicationSid" (string) - The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + * @param "SmsMethod" (string) - The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsUrl" (string) - The URL we should call when the new phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "TrunkSid" (string) - The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + * @param "VoiceApplicationSid" (string) - The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + * @param "VoiceCallerIdLookup" (bool) - Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal +*/ +func (c *DefaultApiService) CreateIncomingPhoneNumberLocal(AccountSid string, params *CreateIncomingPhoneNumberLocalParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIncomingPhoneNumberMobileParams Optional parameters for the method 'CreateIncomingPhoneNumberMobile' +type CreateIncomingPhoneNumberMobileParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateIncomingPhoneNumberMobile Method for CreateIncomingPhoneNumberMobile + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateIncomingPhoneNumberMobileOpts - Optional Parameters: + * @param "AddressSid" (string) - The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + * @param "ApiVersion" (string) - The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + * @param "BundleSid" (string) - The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + * @param "EmergencyAddressSid" (string) - The SID of the emergency address configuration to use for emergency calling from the new phone number. + * @param "EmergencyStatus" (string) - The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. + * @param "IdentitySid" (string) - The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + * @param "PhoneNumber" (string) - The phone number to purchase specified 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. + * @param "SmsApplicationSid" (string) - The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + * @param "SmsMethod" (string) - The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsUrl" (string) - The URL we should call when the new phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "TrunkSid" (string) - The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + * @param "VoiceApplicationSid" (string) - The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + * @param "VoiceCallerIdLookup" (bool) - Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile +*/ +func (c *DefaultApiService) CreateIncomingPhoneNumberMobile(AccountSid string, params *CreateIncomingPhoneNumberMobileParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIncomingPhoneNumberTollFreeParams Optional parameters for the method 'CreateIncomingPhoneNumberTollFree' +type CreateIncomingPhoneNumberTollFreeParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateIncomingPhoneNumberTollFree Method for CreateIncomingPhoneNumberTollFree + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateIncomingPhoneNumberTollFreeOpts - Optional Parameters: + * @param "AddressSid" (string) - The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + * @param "ApiVersion" (string) - The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + * @param "BundleSid" (string) - The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + * @param "EmergencyAddressSid" (string) - The SID of the emergency address configuration to use for emergency calling from the new phone number. + * @param "EmergencyStatus" (string) - The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + * @param "IdentitySid" (string) - The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. + * @param "PhoneNumber" (string) - The phone number to purchase specified 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. + * @param "SmsApplicationSid" (string) - The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + * @param "SmsMethod" (string) - The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsUrl" (string) - The URL we should call when the new phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "TrunkSid" (string) - The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + * @param "VoiceApplicationSid" (string) - The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + * @param "VoiceCallerIdLookup" (bool) - Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceReceiveMode" (string) - The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree +*/ +func (c *DefaultApiService) CreateIncomingPhoneNumberTollFree(AccountSid string, params *CreateIncomingPhoneNumberTollFreeParams) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessageParams Optional parameters for the method 'CreateMessage' +type CreateMessageParams struct { + AddressRetention *string `json:"AddressRetention,omitempty"` + ApplicationSid *string `json:"ApplicationSid,omitempty"` + Attempt *int32 `json:"Attempt,omitempty"` + Body *string `json:"Body,omitempty"` + ContentRetention *string `json:"ContentRetention,omitempty"` + ForceDelivery *bool `json:"ForceDelivery,omitempty"` + From *string `json:"From,omitempty"` + MaxPrice *float32 `json:"MaxPrice,omitempty"` + MediaUrl *[]string `json:"MediaUrl,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + PersistentAction *[]string `json:"PersistentAction,omitempty"` + ProvideFeedback *bool `json:"ProvideFeedback,omitempty"` + SmartEncoded *bool `json:"SmartEncoded,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + To *string `json:"To,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` +} + +/* +CreateMessage Method for CreateMessage +Send a message from the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateMessageOpts - Optional Parameters: + * @param "AddressRetention" (string) - Determines if the address can be stored or obfuscated based on privacy settings + * @param "ApplicationSid" (string) - The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. + * @param "Attempt" (int32) - Total number of attempts made ( including this ) to send out the message regardless of the provider used + * @param "Body" (string) - The text of the message you want to send. Can be up to 1,600 characters in length. + * @param "ContentRetention" (string) - Determines if the message content can be stored or redacted based on privacy settings + * @param "ForceDelivery" (bool) - Reserved + * @param "From" (string) - A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. + * @param "MaxPrice" (float32) - The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. + * @param "MediaUrl" ([]string) - The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. + * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. + * @param "PersistentAction" ([]string) - Rich actions for Channels Messages. + * @param "ProvideFeedback" (bool) - Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. + * @param "SmartEncoded" (bool) - Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. + * @param "To" (string) - The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. + * @param "ValidityPeriod" (int32) - How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. +@return ApiV2010AccountMessage +*/ +func (c *DefaultApiService) CreateMessage(AccountSid string, params *CreateMessageParams) (*ApiV2010AccountMessage, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressRetention != nil { + data.Set("AddressRetention", *params.AddressRetention) + } + if params != nil && params.ApplicationSid != nil { + data.Set("ApplicationSid", *params.ApplicationSid) + } + if params != nil && params.Attempt != nil { + data.Set("Attempt", fmt.Sprint(*params.Attempt)) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.ContentRetention != nil { + data.Set("ContentRetention", *params.ContentRetention) + } + if params != nil && params.ForceDelivery != nil { + data.Set("ForceDelivery", fmt.Sprint(*params.ForceDelivery)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MaxPrice != nil { + data.Set("MaxPrice", fmt.Sprint(*params.MaxPrice)) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.PersistentAction != nil { + data.Set("PersistentAction", strings.Join(*params.PersistentAction, ",")) + } + if params != nil && params.ProvideFeedback != nil { + data.Set("ProvideFeedback", fmt.Sprint(*params.ProvideFeedback)) + } + if params != nil && params.SmartEncoded != nil { + data.Set("SmartEncoded", fmt.Sprint(*params.SmartEncoded)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessageFeedbackParams Optional parameters for the method 'CreateMessageFeedback' +type CreateMessageFeedbackParams struct { + Outcome *string `json:"Outcome,omitempty"` +} + +/* +CreateMessageFeedback Method for CreateMessageFeedback + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param MessageSid The SID of the Message resource for which the feedback was provided. + * @param optional nil or *CreateMessageFeedbackOpts - Optional Parameters: + * @param "Outcome" (string) - Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. +@return ApiV2010AccountMessageMessageFeedback +*/ +func (c *DefaultApiService) CreateMessageFeedback(AccountSid string, MessageSid string, params *CreateMessageFeedbackParams) (*ApiV2010AccountMessageMessageFeedback, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Outcome != nil { + data.Set("Outcome", *params.Outcome) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountMessageMessageFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateNewKeyParams Optional parameters for the method 'CreateNewKey' +type CreateNewKeyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateNewKey Method for CreateNewKey + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + * @param optional nil or *CreateNewKeyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ApiV2010AccountNewKey +*/ +func (c *DefaultApiService) CreateNewKey(AccountSid string, params *CreateNewKeyParams) (*ApiV2010AccountNewKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountNewKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateNewSigningKeyParams Optional parameters for the method 'CreateNewSigningKey' +type CreateNewSigningKeyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateNewSigningKey Method for CreateNewSigningKey +Create a new Signing Key for the account making the request. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. + * @param optional nil or *CreateNewSigningKeyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ApiV2010AccountNewSigningKey +*/ +func (c *DefaultApiService) CreateNewSigningKey(AccountSid string, params *CreateNewSigningKeyParams) (*ApiV2010AccountNewSigningKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountNewSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateParticipantParams Optional parameters for the method 'CreateParticipant' +type CreateParticipantParams struct { + Beep *string `json:"Beep,omitempty"` + Byoc *string `json:"Byoc,omitempty"` + CallReason *string `json:"CallReason,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + CallerId *string `json:"CallerId,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackEvent *[]string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + JitterBufferSize *string `json:"JitterBufferSize,omitempty"` + Label *string `json:"Label,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackEvent *[]string `json:"RecordingStatusCallbackEvent,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RecordingTrack *string `json:"RecordingTrack,omitempty"` + Region *string `json:"Region,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` +} + +/* +CreateParticipant Method for CreateParticipant + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param ConferenceSid The SID of the participant's conference. + * @param optional nil or *CreateParticipantOpts - Optional Parameters: + * @param "Beep" (string) - Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + * @param "Byoc" (string) - The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + * @param "CallReason" (string) - The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + * @param "CallSidToCoach" (string) - The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + * @param "CallerId" (string) - The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. + * @param "Coaching" (bool) - Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + * @param "ConferenceRecord" (string) - Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + * @param "ConferenceRecordingStatusCallback" (string) - The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + * @param "ConferenceRecordingStatusCallbackEvent" ([]string) - The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. + * @param "ConferenceRecordingStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceStatusCallback" (string) - The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + * @param "ConferenceStatusCallbackEvent" ([]string) - The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values with a space. Defaults to `start end`. + * @param "ConferenceStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceTrim" (string) - Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + * @param "EarlyMedia" (bool) - Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. + * @param "EndConferenceOnExit" (bool) - Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + * @param "From" (string) - The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. + * @param "JitterBufferSize" (string) - Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. + * @param "Label" (string) - A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. + * @param "MaxParticipants" (int32) - The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + * @param "Muted" (bool) - Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. + * @param "Record" (bool) - Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + * @param "RecordingChannels" (string) - The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + * @param "RecordingStatusCallback" (string) - The URL that we should call using the `recording_status_callback_method` when the recording status changes. + * @param "RecordingStatusCallbackEvent" ([]string) - The recording state changes that should generate a call to `recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. + * @param "RecordingStatusCallbackMethod" (string) - The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "RecordingTrack" (string) - The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. + * @param "Region" (string) - The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + * @param "SipAuthPassword" (string) - The SIP password for authentication. + * @param "SipAuthUsername" (string) - The SIP username used for authentication. + * @param "StartConferenceOnEnter" (bool) - Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackEvent" ([]string) - The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. + * @param "Timeout" (int32) - The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. + * @param "To" (string) - The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. + * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). +@return ApiV2010AccountConferenceParticipant +*/ +func (c *DefaultApiService) CreateParticipant(AccountSid string, ConferenceSid string, params *CreateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.Byoc != nil { + data.Set("Byoc", *params.Byoc) + } + if params != nil && params.CallReason != nil { + data.Set("CallReason", *params.CallReason) + } + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) + } + if params != nil && params.CallerId != nil { + data.Set("CallerId", *params.CallerId) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackEvent != nil { + data.Set("ConferenceRecordingStatusCallbackEvent", strings.Join(*params.ConferenceRecordingStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.JitterBufferSize != nil { + data.Set("JitterBufferSize", *params.JitterBufferSize) + } + if params != nil && params.Label != nil { + data.Set("Label", *params.Label) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackEvent != nil { + data.Set("RecordingStatusCallbackEvent", strings.Join(*params.RecordingStatusCallbackEvent, ",")) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RecordingTrack != nil { + data.Set("RecordingTrack", *params.RecordingTrack) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreatePaymentsParams Optional parameters for the method 'CreatePayments' +type CreatePaymentsParams struct { + BankAccountType *string `json:"BankAccountType,omitempty"` + ChargeAmount *float32 `json:"ChargeAmount,omitempty"` + Currency *string `json:"Currency,omitempty"` + Description *string `json:"Description,omitempty"` + IdempotencyKey *string `json:"IdempotencyKey,omitempty"` + Input *string `json:"Input,omitempty"` + MinPostalCodeLength *int32 `json:"MinPostalCodeLength,omitempty"` + Parameter *map[string]interface{} `json:"Parameter,omitempty"` + PaymentConnector *string `json:"PaymentConnector,omitempty"` + PaymentMethod *string `json:"PaymentMethod,omitempty"` + PostalCode *bool `json:"PostalCode,omitempty"` + SecurityCode *bool `json:"SecurityCode,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + TokenType *string `json:"TokenType,omitempty"` + ValidCardTypes *string `json:"ValidCardTypes,omitempty"` +} + +/* +CreatePayments Method for CreatePayments +create an instance of payments. This will start a new payments session + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param CallSid The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. + * @param optional nil or *CreatePaymentsOpts - Optional Parameters: + * @param "BankAccountType" (string) - Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. + * @param "ChargeAmount" (float32) - A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. + * @param "Currency" (string) - The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Connector are accepted. + * @param "Description" (string) - The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. + * @param "IdempotencyKey" (string) - A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + * @param "Input" (string) - A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. + * @param "MinPostalCodeLength" (int32) - A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. + * @param "Parameter" (map[string]interface{}) - A single level JSON string that is required when accepting certain information specific only to ACH payments. The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). + * @param "PaymentConnector" (string) - This is the unique name corresponding to the Payment Gateway Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. + * @param "PaymentMethod" (string) - Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. + * @param "PostalCode" (bool) - Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. + * @param "SecurityCode" (bool) - Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. + * @param "StatusCallback" (string) - Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) + * @param "Timeout" (int32) - The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. + * @param "TokenType" (string) - Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. + * @param "ValidCardTypes" (string) - Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` +@return ApiV2010AccountCallPayments +*/ +func (c *DefaultApiService) CreatePayments(AccountSid string, CallSid string, params *CreatePaymentsParams) (*ApiV2010AccountCallPayments, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BankAccountType != nil { + data.Set("BankAccountType", *params.BankAccountType) + } + if params != nil && params.ChargeAmount != nil { + data.Set("ChargeAmount", fmt.Sprint(*params.ChargeAmount)) + } + if params != nil && params.Currency != nil { + data.Set("Currency", *params.Currency) + } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) + } + if params != nil && params.Input != nil { + data.Set("Input", *params.Input) + } + if params != nil && params.MinPostalCodeLength != nil { + data.Set("MinPostalCodeLength", fmt.Sprint(*params.MinPostalCodeLength)) + } + if params != nil && params.Parameter != nil { + v, err := json.Marshal(params.Parameter) + + if err != nil { + return nil, err + } + + data.Set("Parameter", fmt.Sprint(v)) + } + if params != nil && params.PaymentConnector != nil { + data.Set("PaymentConnector", *params.PaymentConnector) + } + if params != nil && params.PaymentMethod != nil { + data.Set("PaymentMethod", *params.PaymentMethod) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", fmt.Sprint(*params.PostalCode)) + } + if params != nil && params.SecurityCode != nil { + data.Set("SecurityCode", fmt.Sprint(*params.SecurityCode)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.TokenType != nil { + data.Set("TokenType", *params.TokenType) + } + if params != nil && params.ValidCardTypes != nil { + data.Set("ValidCardTypes", *params.ValidCardTypes) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateQueueParams Optional parameters for the method 'CreateQueue' +type CreateQueueParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` +} + +/* +CreateQueue Method for CreateQueue +Create a queue + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateQueueOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. + * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. +@return ApiV2010AccountQueue +*/ +func (c *DefaultApiService) CreateQueue(AccountSid string, params *CreateQueueParams) (*ApiV2010AccountQueue, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipAuthCallsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthCallsCredentialListMapping' +type CreateSipAuthCallsCredentialListMappingParams struct { + CredentialListSid *string `json:"CredentialListSid,omitempty"` +} + +/* +CreateSipAuthCallsCredentialListMapping Method for CreateSipAuthCallsCredentialListMapping +Create a new credential list mapping resource + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param DomainSid The SID of the SIP domain that will contain the new resource. + * @param optional nil or *CreateSipAuthCallsCredentialListMappingOpts - Optional Parameters: + * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping +*/ +func (c *DefaultApiService) CreateSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'CreateSipAuthCallsIpAccessControlListMapping' +type CreateSipAuthCallsIpAccessControlListMappingParams struct { + IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` +} + +/* +CreateSipAuthCallsIpAccessControlListMapping Method for CreateSipAuthCallsIpAccessControlListMapping +Create a new IP Access Control List mapping + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param DomainSid The SID of the SIP domain that will contain the new resource. + * @param optional nil or *CreateSipAuthCallsIpAccessControlListMappingOpts - Optional Parameters: + * @param "IpAccessControlListSid" (string) - The SID of the IpAccessControlList resource to map to the SIP domain. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping +*/ +func (c *DefaultApiService) CreateSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipAuthCallsIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'CreateSipAuthRegistrationsCredentialListMapping' +type CreateSipAuthRegistrationsCredentialListMappingParams struct { + CredentialListSid *string `json:"CredentialListSid,omitempty"` +} + +/* +CreateSipAuthRegistrationsCredentialListMapping Method for CreateSipAuthRegistrationsCredentialListMapping +Create a new credential list mapping resource + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param DomainSid The SID of the SIP domain that will contain the new resource. + * @param optional nil or *CreateSipAuthRegistrationsCredentialListMappingOpts - Optional Parameters: + * @param "CredentialListSid" (string) - The SID of the CredentialList resource to map to the SIP domain. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping +*/ +func (c *DefaultApiService) CreateSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipAuthRegistrationsCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipCredentialParams Optional parameters for the method 'CreateSipCredential' +type CreateSipCredentialParams struct { + Password *string `json:"Password,omitempty"` + Username *string `json:"Username,omitempty"` +} + +/* +CreateSipCredential Method for CreateSipCredential +Create a new credential resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param CredentialListSid The unique id that identifies the credential list to include the created credential. + * @param optional nil or *CreateSipCredentialOpts - Optional Parameters: + * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + * @param "Username" (string) - The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. +@return ApiV2010AccountSipSipCredentialListSipCredential +*/ +func (c *DefaultApiService) CreateSipCredential(AccountSid string, CredentialListSid string, params *CreateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) + } + if params != nil && params.Username != nil { + data.Set("Username", *params.Username) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipCredentialListParams Optional parameters for the method 'CreateSipCredentialList' +type CreateSipCredentialListParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateSipCredentialList Method for CreateSipCredentialList +Create a Credential List + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param optional nil or *CreateSipCredentialListOpts - Optional Parameters: + * @param "FriendlyName" (string) - A human readable descriptive text that describes the CredentialList, up to 64 characters long. +@return ApiV2010AccountSipSipCredentialList +*/ +func (c *DefaultApiService) CreateSipCredentialList(AccountSid string, params *CreateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipCredentialListMappingParams Optional parameters for the method 'CreateSipCredentialListMapping' +type CreateSipCredentialListMappingParams struct { + CredentialListSid *string `json:"CredentialListSid,omitempty"` +} + +/* +CreateSipCredentialListMapping Method for CreateSipCredentialListMapping +Create a CredentialListMapping resource for an account. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped. + * @param optional nil or *CreateSipCredentialListMappingOpts - Optional Parameters: + * @param "CredentialListSid" (string) - A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. +@return ApiV2010AccountSipSipDomainSipCredentialListMapping +*/ +func (c *DefaultApiService) CreateSipCredentialListMapping(AccountSid string, DomainSid string, params *CreateSipCredentialListMappingParams) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipDomainParams Optional parameters for the method 'CreateSipDomain' +type CreateSipDomainParams struct { + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateSipDomain Method for CreateSipDomain +Create a new Domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateSipDomainOpts - Optional Parameters: + * @param "ByocTrunkSid" (string) - The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + * @param "DomainName" (string) - The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`. + * @param "EmergencyCallerSid" (string) - Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + * @param "EmergencyCallingEnabled" (bool) - Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the resource. It can be up to 64 characters long. + * @param "Secure" (bool) - Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + * @param "SipRegistration" (bool) - Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + * @param "VoiceStatusCallbackMethod" (string) - The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. + * @param "VoiceUrl" (string) - The URL we should when the domain receives a call. +@return ApiV2010AccountSipSipDomain +*/ +func (c *DefaultApiService) CreateSipDomain(AccountSid string, params *CreateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) + } + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) + } + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipIpAccessControlListParams Optional parameters for the method 'CreateSipIpAccessControlList' +type CreateSipIpAccessControlListParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateSipIpAccessControlList Method for CreateSipIpAccessControlList +Create a new IpAccessControlList resource + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param optional nil or *CreateSipIpAccessControlListOpts - Optional Parameters: + * @param "FriendlyName" (string) - A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. +@return ApiV2010AccountSipSipIpAccessControlList +*/ +func (c *DefaultApiService) CreateSipIpAccessControlList(AccountSid string, params *CreateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipIpAccessControlListMappingParams Optional parameters for the method 'CreateSipIpAccessControlListMapping' +type CreateSipIpAccessControlListMappingParams struct { + IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` +} + +/* +CreateSipIpAccessControlListMapping Method for CreateSipIpAccessControlListMapping +Create a new IpAccessControlListMapping resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP domain. + * @param optional nil or *CreateSipIpAccessControlListMappingOpts - Optional Parameters: + * @param "IpAccessControlListSid" (string) - The unique id of the IP access control list to map to the SIP domain. +@return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping +*/ +func (c *DefaultApiService) CreateSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *CreateSipIpAccessControlListMappingParams) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSipIpAddressParams Optional parameters for the method 'CreateSipIpAddress' +type CreateSipIpAddressParams struct { + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` +} + +/* +CreateSipIpAddress Method for CreateSipIpAddress +Create a new IpAddress resource. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param IpAccessControlListSid The IpAccessControlList Sid with which to associate the created IpAddress resource. + * @param optional nil or *CreateSipIpAddressOpts - Optional Parameters: + * @param "CidrPrefixLength" (int32) - An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. + * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. +@return ApiV2010AccountSipSipIpAccessControlListSipIpAddress +*/ +func (c *DefaultApiService) CreateSipIpAddress(AccountSid string, IpAccessControlListSid string, params *CreateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTokenParams Optional parameters for the method 'CreateToken' +type CreateTokenParams struct { + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +CreateToken Method for CreateToken +Create a new token for ICE servers + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateTokenOpts - Optional Parameters: + * @param "Ttl" (int32) - The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). +@return ApiV2010AccountToken +*/ +func (c *DefaultApiService) CreateToken(AccountSid string, params *CreateTokenParams) (*ApiV2010AccountToken, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Tokens.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateUsageTriggerParams Optional parameters for the method 'CreateUsageTrigger' +type CreateUsageTriggerParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` + TriggerValue *string `json:"TriggerValue,omitempty"` + UsageCategory *string `json:"UsageCategory,omitempty"` +} + +/* +CreateUsageTrigger Method for CreateUsageTrigger +Create a new UsageTrigger + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. + * @param optional nil or *CreateUsageTriggerOpts - Optional Parameters: + * @param "CallbackMethod" (string) - The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + * @param "CallbackUrl" (string) - The URL we should call using `callback_method` when the trigger fires. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "Recurring" (string) - The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. + * @param "TriggerBy" (string) - The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. + * @param "TriggerValue" (string) - The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. + * @param "UsageCategory" (string) - The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. +@return ApiV2010AccountUsageUsageTrigger +*/ +func (c *DefaultApiService) CreateUsageTrigger(AccountSid string, params *CreateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) + } + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) + } + if params != nil && params.TriggerValue != nil { + data.Set("TriggerValue", *params.TriggerValue) + } + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateValidationRequestParams Optional parameters for the method 'CreateValidationRequest' +type CreateValidationRequestParams struct { + CallDelay *int32 `json:"CallDelay,omitempty"` + Extension *string `json:"Extension,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` +} + +/* +CreateValidationRequest Method for CreateValidationRequest + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource. + * @param optional nil or *CreateValidationRequestOpts - Optional Parameters: + * @param "CallDelay" (int32) - The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. + * @param "Extension" (string) - The digits to dial after connecting the verification call. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. + * @param "PhoneNumber" (string) - The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information about the verification process to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. +@return ApiV2010AccountValidationRequest +*/ +func (c *DefaultApiService) CreateValidationRequest(AccountSid string, params *CreateValidationRequestParams) (*ApiV2010AccountValidationRequest, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallDelay != nil { + data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) + } + if params != nil && params.Extension != nil { + data.Set("Extension", *params.Extension) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountValidationRequest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteAddress Method for DeleteAddress + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Address resource to delete. +*/ +func (c *DefaultApiService) DeleteAddress(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteApplication Method for DeleteApplication +Delete the application by the specified application sid + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Application resource to delete. +*/ +func (c *DefaultApiService) DeleteApplication(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCall Method for DeleteCall +Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. + * @param Sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete +*/ +func (c *DefaultApiService) DeleteCall(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCallFeedbackSummary Method for DeleteCallFeedbackSummary +Delete a FeedbackSummary resource from a call + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteCallFeedbackSummary(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCallRecording Method for DeleteCallRecording +Delete a recording from your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. +*/ +func (c *DefaultApiService) DeleteCallRecording(AccountSid string, CallSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteConferenceRecording Method for DeleteConferenceRecording +Delete a recording from your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. + * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. +*/ +func (c *DefaultApiService) DeleteConferenceRecording(AccountSid string, ConferenceSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteConnectApp Method for DeleteConnectApp +Delete an instance of a connect-app + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. +*/ +func (c *DefaultApiService) DeleteConnectApp(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteIncomingPhoneNumber Method for DeleteIncomingPhoneNumber +Delete a phone-numbers belonging to the account used to make the request. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. +*/ +func (c *DefaultApiService) DeleteIncomingPhoneNumber(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteIncomingPhoneNumberAssignedAddOn Method for DeleteIncomingPhoneNumberAssignedAddOn +Remove the assignment of an Add-on installation from the Number specified. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. + * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. + * @param Sid The Twilio-provided string that uniquely identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteKey Method for DeleteKey + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Key resource to delete. +*/ +func (c *DefaultApiService) DeleteKey(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteMedia Method for DeleteMedia +Delete media from your account. Once delete, you will no longer be billed + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. + * @param MessageSid The SID of the Message resource that this Media resource belongs to. + * @param Sid The Twilio-provided string that uniquely identifies the Media resource to delete +*/ +func (c *DefaultApiService) DeleteMedia(AccountSid string, MessageSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteMessage Method for DeleteMessage +Deletes a message record from your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. +*/ +func (c *DefaultApiService) DeleteMessage(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteOutgoingCallerId Method for DeleteOutgoingCallerId +Delete the caller-id specified from the account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. +*/ +func (c *DefaultApiService) DeleteOutgoingCallerId(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteParticipant Method for DeleteParticipant +Kick a participant from a given conference + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. + * @param ConferenceSid The SID of the conference with the participants to delete. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. +*/ +func (c *DefaultApiService) DeleteParticipant(AccountSid string, ConferenceSid string, CallSid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteQueue Method for DeleteQueue +Remove an empty queue + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to delete +*/ +func (c *DefaultApiService) DeleteQueue(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRecording Method for DeleteRecording +Delete a recording from your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to delete. +*/ +func (c *DefaultApiService) DeleteRecording(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRecordingAddOnResult Method for DeleteRecordingAddOnResult +Delete a result and purge all associated Payloads + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. + * @param ReferenceSid The SID of the recording to which the result to delete belongs. + * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. +*/ +func (c *DefaultApiService) DeleteRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRecordingAddOnResultPayload Method for DeleteRecordingAddOnResultPayload +Delete a payload from the result along with all associated Data + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete. + * @param ReferenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. + * @param AddOnResultSid The SID of the AddOnResult to which the payloads to delete belongs. + * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. +*/ +func (c *DefaultApiService) DeleteRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRecordingTranscription Method for DeleteRecordingTranscription + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. +*/ +func (c *DefaultApiService) DeleteRecordingTranscription(AccountSid string, RecordingSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSigningKey Method for DeleteSigningKey + * @param AccountSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteSigningKey(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipAuthCallsCredentialListMapping Method for DeleteSipAuthCallsCredentialListMapping +Delete a credential list mapping from the requested domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + * @param DomainSid The SID of the SIP domain that contains the resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. +*/ +func (c *DefaultApiService) DeleteSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipAuthCallsIpAccessControlListMapping Method for DeleteSipAuthCallsIpAccessControlListMapping +Delete an IP Access Control List mapping from the requested domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. + * @param DomainSid The SID of the SIP domain that contains the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. +*/ +func (c *DefaultApiService) DeleteSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipAuthRegistrationsCredentialListMapping Method for DeleteSipAuthRegistrationsCredentialListMapping +Delete a credential list mapping from the requested domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. + * @param DomainSid The SID of the SIP domain that contains the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. +*/ +func (c *DefaultApiService) DeleteSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipCredential Method for DeleteSipCredential +Delete a credential resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param CredentialListSid The unique id that identifies the credential list that contains the desired credentials. + * @param Sid The unique id that identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteSipCredential(AccountSid string, CredentialListSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipCredentialList Method for DeleteSipCredentialList +Delete a Credential List + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param Sid The credential list Sid that uniquely identifies this resource +*/ +func (c *DefaultApiService) DeleteSipCredentialList(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipCredentialListMapping Method for DeleteSipCredentialListMapping +Delete a CredentialListMapping resource from an account. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. + * @param Sid A 34 character string that uniquely identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipDomain Method for DeleteSipDomain +Delete an instance of a Domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete. +*/ +func (c *DefaultApiService) DeleteSipDomain(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipIpAccessControlList Method for DeleteSipIpAccessControlList +Delete an IpAccessControlList from the requested account + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param Sid A 34 character string that uniquely identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteSipIpAccessControlList(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipIpAccessControlListMapping Method for DeleteSipIpAccessControlListMapping +Delete an IpAccessControlListMapping resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP domain. + * @param Sid A 34 character string that uniquely identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSipIpAddress Method for DeleteSipIpAddress +Delete an IpAddress resource. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to delete. + * @param Sid A 34 character string that uniquely identifies the resource to delete. +*/ +func (c *DefaultApiService) DeleteSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTranscription Method for DeleteTranscription +Delete a transcription from the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to delete. +*/ +func (c *DefaultApiService) DeleteTranscription(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUsageTrigger Method for DeleteUsageTrigger + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. +*/ +func (c *DefaultApiService) DeleteUsageTrigger(AccountSid string, Sid string) (error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchAccount Method for FetchAccount +Fetch the account specified by the provided Account Sid + * @param Sid The Account Sid that uniquely identifies the account to fetch +@return ApiV2010Account +*/ +func (c *DefaultApiService) FetchAccount(Sid string) (*ApiV2010Account, error) { + path := "/2010-04-01/Accounts/{Sid}.json" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAddress Method for FetchAddress + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Address resource to fetch. +@return ApiV2010AccountAddress +*/ +func (c *DefaultApiService) FetchAddress(AccountSid string, Sid string) (*ApiV2010AccountAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchApplication Method for FetchApplication +Fetch the application specified by the provided sid + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Application resource to fetch. +@return ApiV2010AccountApplication +*/ +func (c *DefaultApiService) FetchApplication(AccountSid string, Sid string) (*ApiV2010AccountApplication, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAuthorizedConnectApp Method for FetchAuthorizedConnectApp +Fetch an instance of an authorized-connect-app + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. + * @param ConnectAppSid The SID of the Connect App to fetch. +@return ApiV2010AccountAuthorizedConnectApp +*/ +func (c *DefaultApiService) FetchAuthorizedConnectApp(AccountSid string, ConnectAppSid string) (*ApiV2010AccountAuthorizedConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConnectAppSid"+"}", ConnectAppSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAuthorizedConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAvailablePhoneNumberCountry Method for FetchAvailablePhoneNumberCountry + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. +@return ApiV2010AccountAvailablePhoneNumberCountry +*/ +func (c *DefaultApiService) FetchAvailablePhoneNumberCountry(AccountSid string, CountryCode string) (*ApiV2010AccountAvailablePhoneNumberCountry, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAvailablePhoneNumberCountry{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchBalance Method for FetchBalance +Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information + * @param AccountSid The unique SID identifier of the Account. +@return ApiV2010AccountBalance +*/ +func (c *DefaultApiService) FetchBalance(AccountSid string) (*ApiV2010AccountBalance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Balance.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountBalance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCall Method for FetchCall +Fetch the call specified by the provided Call SID + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. + * @param Sid The SID of the Call resource to fetch. +@return ApiV2010AccountCall +*/ +func (c *DefaultApiService) FetchCall(AccountSid string, Sid string) (*ApiV2010AccountCall, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCallFeedback Method for FetchCallFeedback +Fetch a Feedback resource from a call + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param CallSid The call sid that uniquely identifies the call +@return ApiV2010AccountCallCallFeedback +*/ +func (c *DefaultApiService) FetchCallFeedback(AccountSid string, CallSid string) (*ApiV2010AccountCallCallFeedback, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCallFeedbackSummary Method for FetchCallFeedbackSummary +Fetch a FeedbackSummary resource from a call + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ApiV2010AccountCallCallFeedbackSummary +*/ +func (c *DefaultApiService) FetchCallFeedbackSummary(AccountSid string, Sid string) (*ApiV2010AccountCallCallFeedbackSummary, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallFeedbackSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCallNotification Method for FetchCallNotification + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. +@return ApiV2010AccountCallCallNotificationInstance +*/ +func (c *DefaultApiService) FetchCallNotification(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCallRecording Method for FetchCallRecording +Fetch an instance of a recording for a call + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. +@return ApiV2010AccountCallCallRecording +*/ +func (c *DefaultApiService) FetchCallRecording(AccountSid string, CallSid string, Sid string) (*ApiV2010AccountCallCallRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConference Method for FetchConference +Fetch an instance of a conference + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Conference resource to fetch +@return ApiV2010AccountConference +*/ +func (c *DefaultApiService) FetchConference(AccountSid string, Sid string) (*ApiV2010AccountConference, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConferenceRecording Method for FetchConferenceRecording +Fetch an instance of a recording for a call + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to fetch. + * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. +@return ApiV2010AccountConferenceConferenceRecording +*/ +func (c *DefaultApiService) FetchConferenceRecording(AccountSid string, ConferenceSid string, Sid string) (*ApiV2010AccountConferenceConferenceRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConnectApp Method for FetchConnectApp +Fetch an instance of a connect-app + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. +@return ApiV2010AccountConnectApp +*/ +func (c *DefaultApiService) FetchConnectApp(AccountSid string, Sid string) (*ApiV2010AccountConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchIncomingPhoneNumber Method for FetchIncomingPhoneNumber +Fetch an incoming-phone-number belonging to the account used to make the request. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. +@return ApiV2010AccountIncomingPhoneNumber +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumber(AccountSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumber, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchIncomingPhoneNumberAssignedAddOn Method for FetchIncomingPhoneNumberAssignedAddOn +Fetch an instance of an Add-on installation currently assigned to this Number. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. + * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchIncomingPhoneNumberAssignedAddOnExtension Method for FetchIncomingPhoneNumberAssignedAddOnExtension +Fetch an instance of an Extension for the Assigned Add-on. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. + * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. + * @param AssignedAddOnSid The SID that uniquely identifies the assigned Add-on installation. + * @param Sid The Twilio-provided string that uniquely identifies the resource to fetch. +@return ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension +*/ +func (c *DefaultApiService) FetchIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, Sid string) (*ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchKey Method for FetchKey + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Key resource to fetch. +@return ApiV2010AccountKey +*/ +func (c *DefaultApiService) FetchKey(AccountSid string, Sid string) (*ApiV2010AccountKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMedia Method for FetchMedia +Fetch a single media instance belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to fetch. + * @param MessageSid The SID of the Message resource that this Media resource belongs to. + * @param Sid The Twilio-provided string that uniquely identifies the Media resource to fetch +@return ApiV2010AccountMessageMedia +*/ +func (c *DefaultApiService) FetchMedia(AccountSid string, MessageSid string, Sid string) (*ApiV2010AccountMessageMedia, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountMessageMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMember Method for FetchMember +Fetch a specific member from the queue + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch. + * @param QueueSid The SID of the Queue in which to find the members to fetch. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. +@return ApiV2010AccountQueueMember +*/ +func (c *DefaultApiService) FetchMember(AccountSid string, QueueSid string, CallSid string) (*ApiV2010AccountQueueMember, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessage Method for FetchMessage +Fetch a message belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. +@return ApiV2010AccountMessage +*/ +func (c *DefaultApiService) FetchMessage(AccountSid string, Sid string) (*ApiV2010AccountMessage, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchNotification Method for FetchNotification +Fetch a notification belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Notification resource to fetch. +@return ApiV2010AccountNotificationInstance +*/ +func (c *DefaultApiService) FetchNotification(AccountSid string, Sid string) (*ApiV2010AccountNotificationInstance, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountNotificationInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchOutgoingCallerId Method for FetchOutgoingCallerId +Fetch an outgoing-caller-id belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. +@return ApiV2010AccountOutgoingCallerId +*/ +func (c *DefaultApiService) FetchOutgoingCallerId(AccountSid string, Sid string) (*ApiV2010AccountOutgoingCallerId, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchParticipant Method for FetchParticipant +Fetch an instance of a participant + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource to fetch. + * @param ConferenceSid The SID of the conference with the participant to fetch. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. +@return ApiV2010AccountConferenceParticipant +*/ +func (c *DefaultApiService) FetchParticipant(AccountSid string, ConferenceSid string, CallSid string) (*ApiV2010AccountConferenceParticipant, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchQueue Method for FetchQueue +Fetch an instance of a queue identified by the QueueSid + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to fetch +@return ApiV2010AccountQueue +*/ +func (c *DefaultApiService) FetchQueue(AccountSid string, Sid string) (*ApiV2010AccountQueue, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecording Method for FetchRecording +Fetch an instance of a recording + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to fetch. +@return ApiV2010AccountRecording +*/ +func (c *DefaultApiService) FetchRecording(AccountSid string, Sid string) (*ApiV2010AccountRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecordingAddOnResult Method for FetchRecordingAddOnResult +Fetch an instance of an AddOnResult + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource to fetch. + * @param ReferenceSid The SID of the recording to which the result to fetch belongs. + * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. +@return ApiV2010AccountRecordingRecordingAddOnResult +*/ +func (c *DefaultApiService) FetchRecordingAddOnResult(AccountSid string, ReferenceSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResult, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountRecordingRecordingAddOnResult{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecordingAddOnResultPayload Method for FetchRecordingAddOnResultPayload +Fetch an instance of a result payload + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch. + * @param ReferenceSid The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs. + * @param AddOnResultSid The SID of the AddOnResult to which the payload to fetch belongs. + * @param Sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. +@return ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload +*/ +func (c *DefaultApiService) FetchRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, Sid string) (*ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecordingTranscription Method for FetchRecordingTranscription + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. +@return ApiV2010AccountRecordingRecordingTranscription +*/ +func (c *DefaultApiService) FetchRecordingTranscription(AccountSid string, RecordingSid string, Sid string) (*ApiV2010AccountRecordingRecordingTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountRecordingRecordingTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchShortCode Method for FetchShortCode +Fetch an instance of a short code + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch +@return ApiV2010AccountShortCode +*/ +func (c *DefaultApiService) FetchShortCode(AccountSid string, Sid string) (*ApiV2010AccountShortCode, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSigningKey Method for FetchSigningKey + * @param AccountSid + * @param Sid +@return ApiV2010AccountSigningKey +*/ +func (c *DefaultApiService) FetchSigningKey(AccountSid string, Sid string) (*ApiV2010AccountSigningKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipAuthCallsCredentialListMapping Method for FetchSipAuthCallsCredentialListMapping +Fetch a specific instance of a credential list mapping + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + * @param DomainSid The SID of the SIP domain that contains the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping +*/ +func (c *DefaultApiService) FetchSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipAuthCallsIpAccessControlListMapping Method for FetchSipAuthCallsIpAccessControlListMapping +Fetch a specific instance of an IP Access Control List mapping + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource to fetch. + * @param DomainSid The SID of the SIP domain that contains the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping +*/ +func (c *DefaultApiService) FetchSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipAuthRegistrationsCredentialListMapping Method for FetchSipAuthRegistrationsCredentialListMapping +Fetch a specific instance of a credential list mapping + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. + * @param DomainSid The SID of the SIP domain that contains the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. +@return ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping +*/ +func (c *DefaultApiService) FetchSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipCredential Method for FetchSipCredential +Fetch a single credential. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param CredentialListSid The unique id that identifies the credential list that contains the desired credential. + * @param Sid The unique id that identifies the resource to fetch. +@return ApiV2010AccountSipSipCredentialListSipCredential +*/ +func (c *DefaultApiService) FetchSipCredential(AccountSid string, CredentialListSid string, Sid string) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipCredentialList Method for FetchSipCredentialList +Get a Credential List + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param Sid The credential list Sid that uniquely identifies this resource +@return ApiV2010AccountSipSipCredentialList +*/ +func (c *DefaultApiService) FetchSipCredentialList(AccountSid string, Sid string) (*ApiV2010AccountSipSipCredentialList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipCredentialListMapping Method for FetchSipCredentialListMapping +Fetch a single CredentialListMapping resource from an account. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. + * @param Sid A 34 character string that uniquely identifies the resource to fetch. +@return ApiV2010AccountSipSipDomainSipCredentialListMapping +*/ +func (c *DefaultApiService) FetchSipCredentialListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipCredentialListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipCredentialListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipDomain Method for FetchSipDomain +Fetch an instance of a Domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. +@return ApiV2010AccountSipSipDomain +*/ +func (c *DefaultApiService) FetchSipDomain(AccountSid string, Sid string) (*ApiV2010AccountSipSipDomain, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipIpAccessControlList Method for FetchSipIpAccessControlList +Fetch a specific instance of an IpAccessControlList + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param Sid A 34 character string that uniquely identifies the resource to fetch. +@return ApiV2010AccountSipSipIpAccessControlList +*/ +func (c *DefaultApiService) FetchSipIpAccessControlList(AccountSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipIpAccessControlListMapping Method for FetchSipIpAccessControlListMapping +Fetch an IpAccessControlListMapping resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP domain. + * @param Sid A 34 character string that uniquely identifies the resource to fetch. +@return ApiV2010AccountSipSipDomainSipIpAccessControlListMapping +*/ +func (c *DefaultApiService) FetchSipIpAccessControlListMapping(AccountSid string, DomainSid string, Sid string) (*ApiV2010AccountSipSipDomainSipIpAccessControlListMapping, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomainSipIpAccessControlListMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSipIpAddress Method for FetchSipIpAddress +Read one IpAddress resource. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to fetch. + * @param Sid A 34 character string that uniquely identifies the IpAddress resource to fetch. +@return ApiV2010AccountSipSipIpAccessControlListSipIpAddress +*/ +func (c *DefaultApiService) FetchSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTranscription Method for FetchTranscription +Fetch an instance of a Transcription + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch. +@return ApiV2010AccountTranscription +*/ +func (c *DefaultApiService) FetchTranscription(AccountSid string, Sid string) (*ApiV2010AccountTranscription, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountTranscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUsageTrigger Method for FetchUsageTrigger +Fetch and instance of a usage-trigger + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. +@return ApiV2010AccountUsageUsageTrigger +*/ +func (c *DefaultApiService) FetchUsageTrigger(AccountSid string, Sid string) (*ApiV2010AccountUsageUsageTrigger, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAccountParams Optional parameters for the method 'ListAccount' +type ListAccountParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAccount Method for ListAccount +Retrieves a collection of Accounts belonging to the account used to make the request + * @param optional nil or *ListAccountOpts - Optional Parameters: + * @param "FriendlyName" (string) - Only return the Account resources with friendly names that exactly match this name. + * @param "Status" (string) - Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAccountResponse +*/ +func (c *DefaultApiService) ListAccount(params *ListAccountParams) (*ListAccountResponse, error) { + path := "/2010-04-01/Accounts.json" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAccountResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAddressParams Optional parameters for the method 'ListAddress' +type ListAddressParams struct { + CustomerName *string `json:"CustomerName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAddress Method for ListAddress + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to read. + * @param optional nil or *ListAddressOpts - Optional Parameters: + * @param "CustomerName" (string) - The `customer_name` of the Address resources to read. + * @param "FriendlyName" (string) - The string that identifies the Address resources to read. + * @param "IsoCountry" (string) - The ISO country code of the Address resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAddressResponse +*/ +func (c *DefaultApiService) ListAddress(AccountSid string, params *ListAddressParams) (*ListAddressResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListApplicationParams Optional parameters for the method 'ListApplication' +type ListApplicationParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListApplication Method for ListApplication +Retrieve a list of applications representing an application within the requesting account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read. + * @param optional nil or *ListApplicationOpts - Optional Parameters: + * @param "FriendlyName" (string) - The string that identifies the Application resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListApplicationResponse +*/ +func (c *DefaultApiService) ListApplication(AccountSid string, params *ListApplicationParams) (*ListApplicationResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListApplicationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAuthorizedConnectAppParams Optional parameters for the method 'ListAuthorizedConnectApp' +type ListAuthorizedConnectAppParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAuthorizedConnectApp Method for ListAuthorizedConnectApp +Retrieve a list of authorized-connect-apps belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resources to read. + * @param optional nil or *ListAuthorizedConnectAppOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAuthorizedConnectAppResponse +*/ +func (c *DefaultApiService) ListAuthorizedConnectApp(AccountSid string, params *ListAuthorizedConnectAppParams) (*ListAuthorizedConnectAppResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAuthorizedConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberCountryParams Optional parameters for the method 'ListAvailablePhoneNumberCountry' +type ListAvailablePhoneNumberCountryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberCountry Method for ListAvailablePhoneNumberCountry + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resources. + * @param optional nil or *ListAvailablePhoneNumberCountryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberCountryResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberCountry(AccountSid string, params *ListAvailablePhoneNumberCountryParams) (*ListAvailablePhoneNumberCountryResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberLocalParams Optional parameters for the method 'ListAvailablePhoneNumberLocal' +type ListAvailablePhoneNumberLocalParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberLocal Method for ListAvailablePhoneNumberLocal + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberLocalOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberLocalResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberLocal(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberLocalParams) (*ListAvailablePhoneNumberLocalResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberMachineToMachineParams Optional parameters for the method 'ListAvailablePhoneNumberMachineToMachine' +type ListAvailablePhoneNumberMachineToMachineParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberMachineToMachine Method for ListAvailablePhoneNumberMachineToMachine + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberMachineToMachineOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberMachineToMachineResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberMachineToMachine(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMachineToMachineParams) (*ListAvailablePhoneNumberMachineToMachineResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberMachineToMachineResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberMobileParams Optional parameters for the method 'ListAvailablePhoneNumberMobile' +type ListAvailablePhoneNumberMobileParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberMobile Method for ListAvailablePhoneNumberMobile + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberMobileOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberMobileResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberMobile(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberMobileParams) (*ListAvailablePhoneNumberMobileResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberNationalParams Optional parameters for the method 'ListAvailablePhoneNumberNational' +type ListAvailablePhoneNumberNationalParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberNational Method for ListAvailablePhoneNumberNational + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberNationalOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberNationalResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberNational(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberNationalParams) (*ListAvailablePhoneNumberNationalResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberNationalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberSharedCostParams Optional parameters for the method 'ListAvailablePhoneNumberSharedCost' +type ListAvailablePhoneNumberSharedCostParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberSharedCost Method for ListAvailablePhoneNumberSharedCost + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberSharedCostOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberSharedCostResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberSharedCost(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberSharedCostParams) (*ListAvailablePhoneNumberSharedCostResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberSharedCostResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberTollFreeParams Optional parameters for the method 'ListAvailablePhoneNumberTollFree' +type ListAvailablePhoneNumberTollFreeParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberTollFree Method for ListAvailablePhoneNumberTollFree + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberTollFreeOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberTollFreeResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberTollFree(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberTollFreeParams) (*ListAvailablePhoneNumberTollFreeResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailablePhoneNumberVoipParams Optional parameters for the method 'ListAvailablePhoneNumberVoip' +type ListAvailablePhoneNumberVoipParams struct { + AreaCode *int32 `json:"AreaCode,omitempty"` + Contains *string `json:"Contains,omitempty"` + SmsEnabled *bool `json:"SmsEnabled,omitempty"` + MmsEnabled *bool `json:"MmsEnabled,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` + ExcludeAllAddressRequired *bool `json:"ExcludeAllAddressRequired,omitempty"` + ExcludeLocalAddressRequired *bool `json:"ExcludeLocalAddressRequired,omitempty"` + ExcludeForeignAddressRequired *bool `json:"ExcludeForeignAddressRequired,omitempty"` + Beta *bool `json:"Beta,omitempty"` + NearNumber *string `json:"NearNumber,omitempty"` + NearLatLong *string `json:"NearLatLong,omitempty"` + Distance *int32 `json:"Distance,omitempty"` + InPostalCode *string `json:"InPostalCode,omitempty"` + InRegion *string `json:"InRegion,omitempty"` + InRateCenter *string `json:"InRateCenter,omitempty"` + InLata *string `json:"InLata,omitempty"` + InLocality *string `json:"InLocality,omitempty"` + FaxEnabled *bool `json:"FaxEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailablePhoneNumberVoip Method for ListAvailablePhoneNumberVoip + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. + * @param CountryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. + * @param optional nil or *ListAvailablePhoneNumberVoipOpts - Optional Parameters: + * @param "AreaCode" (int32) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. + * @param "Contains" (string) - The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. + * @param "SmsEnabled" (bool) - Whether the phone numbers can receive text messages. Can be: `true` or `false`. + * @param "MmsEnabled" (bool) - Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. + * @param "VoiceEnabled" (bool) - Whether the phone numbers can receive calls. Can be: `true` or `false`. + * @param "ExcludeAllAddressRequired" (bool) - Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeLocalAddressRequired" (bool) - Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "ExcludeForeignAddressRequired" (bool) - Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. + * @param "Beta" (bool) - Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "NearNumber" (string) - Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. + * @param "NearLatLong" (string) - Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. + * @param "Distance" (int32) - The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. + * @param "InPostalCode" (string) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. + * @param "InRegion" (string) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. + * @param "InRateCenter" (string) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. + * @param "InLata" (string) - Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. + * @param "InLocality" (string) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. + * @param "FaxEnabled" (bool) - Whether the phone numbers can receive faxes. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailablePhoneNumberVoipResponse +*/ +func (c *DefaultApiService) ListAvailablePhoneNumberVoip(AccountSid string, CountryCode string, params *ListAvailablePhoneNumberVoipParams) (*ListAvailablePhoneNumberVoipResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CountryCode"+"}", CountryCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCode != nil { + data.Set("AreaCode", fmt.Sprint(*params.AreaCode)) + } + if params != nil && params.Contains != nil { + data.Set("Contains", *params.Contains) + } + if params != nil && params.SmsEnabled != nil { + data.Set("SmsEnabled", fmt.Sprint(*params.SmsEnabled)) + } + if params != nil && params.MmsEnabled != nil { + data.Set("MmsEnabled", fmt.Sprint(*params.MmsEnabled)) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + if params != nil && params.ExcludeAllAddressRequired != nil { + data.Set("ExcludeAllAddressRequired", fmt.Sprint(*params.ExcludeAllAddressRequired)) + } + if params != nil && params.ExcludeLocalAddressRequired != nil { + data.Set("ExcludeLocalAddressRequired", fmt.Sprint(*params.ExcludeLocalAddressRequired)) + } + if params != nil && params.ExcludeForeignAddressRequired != nil { + data.Set("ExcludeForeignAddressRequired", fmt.Sprint(*params.ExcludeForeignAddressRequired)) + } + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.NearNumber != nil { + data.Set("NearNumber", *params.NearNumber) + } + if params != nil && params.NearLatLong != nil { + data.Set("NearLatLong", *params.NearLatLong) + } + if params != nil && params.Distance != nil { + data.Set("Distance", fmt.Sprint(*params.Distance)) + } + if params != nil && params.InPostalCode != nil { + data.Set("InPostalCode", *params.InPostalCode) + } + if params != nil && params.InRegion != nil { + data.Set("InRegion", *params.InRegion) + } + if params != nil && params.InRateCenter != nil { + data.Set("InRateCenter", *params.InRateCenter) + } + if params != nil && params.InLata != nil { + data.Set("InLata", *params.InLata) + } + if params != nil && params.InLocality != nil { + data.Set("InLocality", *params.InLocality) + } + if params != nil && params.FaxEnabled != nil { + data.Set("FaxEnabled", fmt.Sprint(*params.FaxEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailablePhoneNumberVoipResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCallParams Optional parameters for the method 'ListCall' +type ListCallParams struct { + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + ParentCallSid *string `json:"ParentCallSid,omitempty"` + Status *string `json:"Status,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + StartTimelesserThan *time.Time `json:"StartTime<,omitempty"` + StartTimegreaterThan *time.Time `json:"StartTime>,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + EndTimelesserThan *time.Time `json:"EndTime<,omitempty"` + EndTimegreaterThan *time.Time `json:"EndTime>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCall Method for ListCall +Retrieves a collection of calls made to and from your account + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to read. + * @param optional nil or *ListCallOpts - Optional Parameters: + * @param "To" (string) - Only show calls made to this phone number, SIP address, Client identifier or SIM SID. + * @param "From" (string) - Only include calls from this phone number, SIP address, Client identifier or SIM SID. + * @param "ParentCallSid" (string) - Only include calls spawned by calls with this SID. + * @param "Status" (string) - The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. + * @param "StartTime" (time.Time) - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + * @param "StartTimelesserThan" (time.Time) - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + * @param "StartTimegreaterThan" (time.Time) - Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. + * @param "EndTime" (time.Time) - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + * @param "EndTimelesserThan" (time.Time) - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + * @param "EndTimegreaterThan" (time.Time) - Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCallResponse +*/ +func (c *DefaultApiService) ListCall(AccountSid string, params *ListCallParams) (*ListCallResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.ParentCallSid != nil { + data.Set("ParentCallSid", *params.ParentCallSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.StartTimelesserThan != nil { + data.Set("StartTimelesserThan", fmt.Sprint(*params.StartTimelesserThan)) + } + if params != nil && params.StartTimegreaterThan != nil { + data.Set("StartTimegreaterThan", fmt.Sprint(*params.StartTimegreaterThan)) + } + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.EndTimelesserThan != nil { + data.Set("EndTimelesserThan", fmt.Sprint(*params.EndTimelesserThan)) + } + if params != nil && params.EndTimegreaterThan != nil { + data.Set("EndTimegreaterThan", fmt.Sprint(*params.EndTimegreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCallResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCallEventParams Optional parameters for the method 'ListCallEvent' +type ListCallEventParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCallEvent Method for ListCallEvent +Retrieve a list of all events for a call. + * @param AccountSid The unique SID identifier of the Account. + * @param CallSid The unique SID identifier of the Call. + * @param optional nil or *ListCallEventOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCallEventResponse +*/ +func (c *DefaultApiService) ListCallEvent(AccountSid string, CallSid string, params *ListCallEventParams) (*ListCallEventResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCallEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCallNotificationParams Optional parameters for the method 'ListCallNotification' +type ListCallNotificationParams struct { + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` + MessageDatelesserThan *time.Time `json:"MessageDate<,omitempty"` + MessageDategreaterThan *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCallNotification Method for ListCallNotification + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resources to read. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resources to read. + * @param optional nil or *ListCallNotificationOpts - Optional Parameters: + * @param "Log" (int32) - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + * @param "MessageDate" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "MessageDatelesserThan" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "MessageDategreaterThan" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCallNotificationResponse +*/ +func (c *DefaultApiService) ListCallNotification(AccountSid string, CallSid string, params *ListCallNotificationParams) (*ListCallNotificationResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) + } + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) + } + if params != nil && params.MessageDatelesserThan != nil { + data.Set("MessageDatelesserThan", fmt.Sprint(*params.MessageDatelesserThan)) + } + if params != nil && params.MessageDategreaterThan != nil { + data.Set("MessageDategreaterThan", fmt.Sprint(*params.MessageDategreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCallNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCallRecordingParams Optional parameters for the method 'ListCallRecording' +type ListCallRecordingParams struct { + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreatedlesserThan *time.Time `json:"DateCreated<,omitempty"` + DateCreatedgreaterThan *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCallRecording Method for ListCallRecording +Retrieve a list of recordings belonging to the call used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + * @param optional nil or *ListCallRecordingOpts - Optional Parameters: + * @param "DateCreated" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "DateCreatedlesserThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "DateCreatedgreaterThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCallRecordingResponse +*/ +func (c *DefaultApiService) ListCallRecording(AccountSid string, CallSid string, params *ListCallRecordingParams) (*ListCallRecordingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedlesserThan != nil { + data.Set("DateCreatedlesserThan", fmt.Sprint(*params.DateCreatedlesserThan)) + } + if params != nil && params.DateCreatedgreaterThan != nil { + data.Set("DateCreatedgreaterThan", fmt.Sprint(*params.DateCreatedgreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCallRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConferenceParams Optional parameters for the method 'ListConference' +type ListConferenceParams struct { + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreatedlesserThan *time.Time `json:"DateCreated<,omitempty"` + DateCreatedgreaterThan *time.Time `json:"DateCreated>,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + DateUpdatedlesserThan *time.Time `json:"DateUpdated<,omitempty"` + DateUpdatedgreaterThan *time.Time `json:"DateUpdated>,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConference Method for ListConference +Retrieve a list of conferences belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to read. + * @param optional nil or *ListConferenceOpts - Optional Parameters: + * @param "DateCreated" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + * @param "DateCreatedlesserThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + * @param "DateCreatedgreaterThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. + * @param "DateUpdated" (time.Time) - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + * @param "DateUpdatedlesserThan" (time.Time) - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + * @param "DateUpdatedgreaterThan" (time.Time) - The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. + * @param "FriendlyName" (string) - The string that identifies the Conference resources to read. + * @param "Status" (string) - The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConferenceResponse +*/ +func (c *DefaultApiService) ListConference(AccountSid string, params *ListConferenceParams) (*ListConferenceResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedlesserThan != nil { + data.Set("DateCreatedlesserThan", fmt.Sprint(*params.DateCreatedlesserThan)) + } + if params != nil && params.DateCreatedgreaterThan != nil { + data.Set("DateCreatedgreaterThan", fmt.Sprint(*params.DateCreatedgreaterThan)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.DateUpdatedlesserThan != nil { + data.Set("DateUpdatedlesserThan", fmt.Sprint(*params.DateUpdatedlesserThan)) + } + if params != nil && params.DateUpdatedgreaterThan != nil { + data.Set("DateUpdatedgreaterThan", fmt.Sprint(*params.DateUpdatedgreaterThan)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConferenceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConferenceRecordingParams Optional parameters for the method 'ListConferenceRecording' +type ListConferenceRecordingParams struct { + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreatedlesserThan *time.Time `json:"DateCreated<,omitempty"` + DateCreatedgreaterThan *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConferenceRecording Method for ListConferenceRecording +Retrieve a list of recordings belonging to the call used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to read. + * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to read. + * @param optional nil or *ListConferenceRecordingOpts - Optional Parameters: + * @param "DateCreated" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "DateCreatedlesserThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "DateCreatedgreaterThan" (time.Time) - The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConferenceRecordingResponse +*/ +func (c *DefaultApiService) ListConferenceRecording(AccountSid string, ConferenceSid string, params *ListConferenceRecordingParams) (*ListConferenceRecordingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedlesserThan != nil { + data.Set("DateCreatedlesserThan", fmt.Sprint(*params.DateCreatedlesserThan)) + } + if params != nil && params.DateCreatedgreaterThan != nil { + data.Set("DateCreatedgreaterThan", fmt.Sprint(*params.DateCreatedgreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConferenceRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConnectAppParams Optional parameters for the method 'ListConnectApp' +type ListConnectAppParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConnectApp Method for ListConnectApp +Retrieve a list of connect-apps belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to read. + * @param optional nil or *ListConnectAppOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConnectAppResponse +*/ +func (c *DefaultApiService) ListConnectApp(AccountSid string, params *ListConnectAppParams) (*ListConnectAppResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConnectAppResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDependentPhoneNumberParams Optional parameters for the method 'ListDependentPhoneNumber' +type ListDependentPhoneNumberParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDependentPhoneNumber Method for ListDependentPhoneNumber + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read. + * @param AddressSid The SID of the Address resource associated with the phone number. + * @param optional nil or *ListDependentPhoneNumberOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDependentPhoneNumberResponse +*/ +func (c *DefaultApiService) ListDependentPhoneNumber(AccountSid string, AddressSid string, params *ListDependentPhoneNumberParams) (*ListDependentPhoneNumberResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"AddressSid"+"}", AddressSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDependentPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberParams Optional parameters for the method 'ListIncomingPhoneNumber' +type ListIncomingPhoneNumberParams struct { + Beta *bool `json:"Beta,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumber Method for ListIncomingPhoneNumber +Retrieve a list of incoming-phone-numbers belonging to the account used to make the request. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to read. + * @param optional nil or *ListIncomingPhoneNumberOpts - Optional Parameters: + * @param "Beta" (bool) - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "FriendlyName" (string) - A string that identifies the IncomingPhoneNumber resources to read. + * @param "PhoneNumber" (string) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumber(AccountSid string, params *ListIncomingPhoneNumberParams) (*ListIncomingPhoneNumberResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberAssignedAddOnParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOn' +type ListIncomingPhoneNumberAssignedAddOnParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumberAssignedAddOn Method for ListIncomingPhoneNumberAssignedAddOn +Retrieve a list of Add-on installations currently assigned to this Number. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. + * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberAssignedAddOnResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOn(AccountSid string, ResourceSid string, params *ListIncomingPhoneNumberAssignedAddOnParams) (*ListIncomingPhoneNumberAssignedAddOnResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberAssignedAddOnResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberAssignedAddOnExtensionParams Optional parameters for the method 'ListIncomingPhoneNumberAssignedAddOnExtension' +type ListIncomingPhoneNumberAssignedAddOnExtensionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumberAssignedAddOnExtension Method for ListIncomingPhoneNumberAssignedAddOnExtension +Retrieve a list of Extensions for the Assigned Add-on. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + * @param ResourceSid The SID of the Phone Number to which the Add-on is assigned. + * @param AssignedAddOnSid The SID that uniquely identifies the assigned Add-on installation. + * @param optional nil or *ListIncomingPhoneNumberAssignedAddOnExtensionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberAssignedAddOnExtensionResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumberAssignedAddOnExtension(AccountSid string, ResourceSid string, AssignedAddOnSid string, params *ListIncomingPhoneNumberAssignedAddOnExtensionParams) (*ListIncomingPhoneNumberAssignedAddOnExtensionResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ResourceSid"+"}", ResourceSid, -1) + path = strings.Replace(path, "{"+"AssignedAddOnSid"+"}", AssignedAddOnSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberAssignedAddOnExtensionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberLocalParams Optional parameters for the method 'ListIncomingPhoneNumberLocal' +type ListIncomingPhoneNumberLocalParams struct { + Beta *bool `json:"Beta,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumberLocal Method for ListIncomingPhoneNumberLocal + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + * @param optional nil or *ListIncomingPhoneNumberLocalOpts - Optional Parameters: + * @param "Beta" (bool) - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "FriendlyName" (string) - A string that identifies the resources to read. + * @param "PhoneNumber" (string) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberLocalResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumberLocal(AccountSid string, params *ListIncomingPhoneNumberLocalParams) (*ListIncomingPhoneNumberLocalResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberLocalResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberMobileParams Optional parameters for the method 'ListIncomingPhoneNumberMobile' +type ListIncomingPhoneNumberMobileParams struct { + Beta *bool `json:"Beta,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumberMobile Method for ListIncomingPhoneNumberMobile + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + * @param optional nil or *ListIncomingPhoneNumberMobileOpts - Optional Parameters: + * @param "Beta" (bool) - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "FriendlyName" (string) - A string that identifies the resources to read. + * @param "PhoneNumber" (string) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberMobileResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumberMobile(AccountSid string, params *ListIncomingPhoneNumberMobileParams) (*ListIncomingPhoneNumberMobileResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberMobileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIncomingPhoneNumberTollFreeParams Optional parameters for the method 'ListIncomingPhoneNumberTollFree' +type ListIncomingPhoneNumberTollFreeParams struct { + Beta *bool `json:"Beta,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Origin *string `json:"Origin,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIncomingPhoneNumberTollFree Method for ListIncomingPhoneNumberTollFree + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. + * @param optional nil or *ListIncomingPhoneNumberTollFreeOpts - Optional Parameters: + * @param "Beta" (bool) - Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. + * @param "FriendlyName" (string) - A string that identifies the resources to read. + * @param "PhoneNumber" (string) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. + * @param "Origin" (string) - Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIncomingPhoneNumberTollFreeResponse +*/ +func (c *DefaultApiService) ListIncomingPhoneNumberTollFree(AccountSid string, params *ListIncomingPhoneNumberTollFreeParams) (*ListIncomingPhoneNumberTollFreeResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beta != nil { + data.Set("Beta", fmt.Sprint(*params.Beta)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Origin != nil { + data.Set("Origin", *params.Origin) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIncomingPhoneNumberTollFreeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListKeyParams Optional parameters for the method 'ListKey' +type ListKeyParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListKey Method for ListKey + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to read. + * @param optional nil or *ListKeyOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListKeyResponse +*/ +func (c *DefaultApiService) ListKey(AccountSid string, params *ListKeyParams) (*ListKeyResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMediaParams Optional parameters for the method 'ListMedia' +type ListMediaParams struct { + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreatedlesserThan *time.Time `json:"DateCreated<,omitempty"` + DateCreatedgreaterThan *time.Time `json:"DateCreated>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMedia Method for ListMedia +Retrieve a list of Media resources belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to read. + * @param MessageSid The SID of the Message resource that this Media resource belongs to. + * @param optional nil or *ListMediaOpts - Optional Parameters: + * @param "DateCreated" (time.Time) - Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param "DateCreatedlesserThan" (time.Time) - Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param "DateCreatedgreaterThan" (time.Time) - Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMediaResponse +*/ +func (c *DefaultApiService) ListMedia(AccountSid string, MessageSid string, params *ListMediaParams) (*ListMediaResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedlesserThan != nil { + data.Set("DateCreatedlesserThan", fmt.Sprint(*params.DateCreatedlesserThan)) + } + if params != nil && params.DateCreatedgreaterThan != nil { + data.Set("DateCreatedgreaterThan", fmt.Sprint(*params.DateCreatedgreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMemberParams Optional parameters for the method 'ListMember' +type ListMemberParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMember Method for ListMember +Retrieve the members of the queue + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read. + * @param QueueSid The SID of the Queue in which to find the members + * @param optional nil or *ListMemberOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMemberResponse +*/ +func (c *DefaultApiService) ListMember(AccountSid string, QueueSid string, params *ListMemberParams) (*ListMemberResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessageParams Optional parameters for the method 'ListMessage' +type ListMessageParams struct { + To *string `json:"To,omitempty"` + From *string `json:"From,omitempty"` + DateSent *time.Time `json:"DateSent,omitempty"` + DateSentlesserThan *time.Time `json:"DateSent<,omitempty"` + DateSentgreaterThan *time.Time `json:"DateSent>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessage Method for ListMessage +Retrieve a list of messages belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to read. + * @param optional nil or *ListMessageOpts - Optional Parameters: + * @param "To" (string) - Read messages sent to only this phone number. + * @param "From" (string) - Read messages sent from only this phone number or alphanumeric sender ID. + * @param "DateSent" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param "DateSentlesserThan" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param "DateSentgreaterThan" (time.Time) - The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessageResponse +*/ +func (c *DefaultApiService) ListMessage(AccountSid string, params *ListMessageParams) (*ListMessageResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.DateSent != nil { + data.Set("DateSent", fmt.Sprint(*params.DateSent)) + } + if params != nil && params.DateSentlesserThan != nil { + data.Set("DateSentlesserThan", fmt.Sprint(*params.DateSentlesserThan)) + } + if params != nil && params.DateSentgreaterThan != nil { + data.Set("DateSentgreaterThan", fmt.Sprint(*params.DateSentgreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListNotificationParams Optional parameters for the method 'ListNotification' +type ListNotificationParams struct { + Log *int32 `json:"Log,omitempty"` + MessageDate *time.Time `json:"MessageDate,omitempty"` + MessageDatelesserThan *time.Time `json:"MessageDate<,omitempty"` + MessageDategreaterThan *time.Time `json:"MessageDate>,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListNotification Method for ListNotification +Retrieve a list of notifications belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resources to read. + * @param optional nil or *ListNotificationOpts - Optional Parameters: + * @param "Log" (int32) - Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. + * @param "MessageDate" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "MessageDatelesserThan" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "MessageDategreaterThan" (time.Time) - Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListNotificationResponse +*/ +func (c *DefaultApiService) ListNotification(AccountSid string, params *ListNotificationParams) (*ListNotificationResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Notifications.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Log != nil { + data.Set("Log", fmt.Sprint(*params.Log)) + } + if params != nil && params.MessageDate != nil { + data.Set("MessageDate", fmt.Sprint(*params.MessageDate)) + } + if params != nil && params.MessageDatelesserThan != nil { + data.Set("MessageDatelesserThan", fmt.Sprint(*params.MessageDatelesserThan)) + } + if params != nil && params.MessageDategreaterThan != nil { + data.Set("MessageDategreaterThan", fmt.Sprint(*params.MessageDategreaterThan)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListNotificationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListOutgoingCallerIdParams Optional parameters for the method 'ListOutgoingCallerId' +type ListOutgoingCallerIdParams struct { + PhoneNumber *string `json:"PhoneNumber,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListOutgoingCallerId Method for ListOutgoingCallerId +Retrieve a list of outgoing-caller-ids belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to read. + * @param optional nil or *ListOutgoingCallerIdOpts - Optional Parameters: + * @param "PhoneNumber" (string) - The phone number of the OutgoingCallerId resources to read. + * @param "FriendlyName" (string) - The string that identifies the OutgoingCallerId resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListOutgoingCallerIdResponse +*/ +func (c *DefaultApiService) ListOutgoingCallerId(AccountSid string, params *ListOutgoingCallerIdParams) (*ListOutgoingCallerIdResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListOutgoingCallerIdResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListParticipantParams Optional parameters for the method 'ListParticipant' +type ListParticipantParams struct { + Muted *bool `json:"Muted,omitempty"` + Hold *bool `json:"Hold,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListParticipant Method for ListParticipant +Retrieve a list of participants belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to read. + * @param ConferenceSid The SID of the conference with the participants to read. + * @param optional nil or *ListParticipantOpts - Optional Parameters: + * @param "Muted" (bool) - Whether to return only participants that are muted. Can be: `true` or `false`. + * @param "Hold" (bool) - Whether to return only participants that are on hold. Can be: `true` or `false`. + * @param "Coaching" (bool) - Whether to return only participants who are coaching another call. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListParticipantResponse +*/ +func (c *DefaultApiService) ListParticipant(AccountSid string, ConferenceSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListQueueParams Optional parameters for the method 'ListQueue' +type ListQueueParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListQueue Method for ListQueue +Retrieve a list of queues belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resources to read. + * @param optional nil or *ListQueueOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListQueueResponse +*/ +func (c *DefaultApiService) ListQueue(AccountSid string, params *ListQueueParams) (*ListQueueResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRecordingParams Optional parameters for the method 'ListRecording' +type ListRecordingParams struct { + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateCreatedlesserThan *time.Time `json:"DateCreated<,omitempty"` + DateCreatedgreaterThan *time.Time `json:"DateCreated>,omitempty"` + CallSid *string `json:"CallSid,omitempty"` + ConferenceSid *string `json:"ConferenceSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRecording Method for ListRecording +Retrieve a list of recordings belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. + * @param optional nil or *ListRecordingOpts - Optional Parameters: + * @param "DateCreated" (time.Time) - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + * @param "DateCreatedlesserThan" (time.Time) - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + * @param "DateCreatedgreaterThan" (time.Time) - Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. + * @param "CallSid" (string) - The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. + * @param "ConferenceSid" (string) - The Conference SID that identifies the conference associated with the recording to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRecordingResponse +*/ +func (c *DefaultApiService) ListRecording(AccountSid string, params *ListRecordingParams) (*ListRecordingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateCreatedlesserThan != nil { + data.Set("DateCreatedlesserThan", fmt.Sprint(*params.DateCreatedlesserThan)) + } + if params != nil && params.DateCreatedgreaterThan != nil { + data.Set("DateCreatedgreaterThan", fmt.Sprint(*params.DateCreatedgreaterThan)) + } + if params != nil && params.CallSid != nil { + data.Set("CallSid", *params.CallSid) + } + if params != nil && params.ConferenceSid != nil { + data.Set("ConferenceSid", *params.ConferenceSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRecordingAddOnResultParams Optional parameters for the method 'ListRecordingAddOnResult' +type ListRecordingAddOnResultParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRecordingAddOnResult Method for ListRecordingAddOnResult +Retrieve a list of results belonging to the recording + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to read. + * @param ReferenceSid The SID of the recording to which the result to read belongs. + * @param optional nil or *ListRecordingAddOnResultOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRecordingAddOnResultResponse +*/ +func (c *DefaultApiService) ListRecordingAddOnResult(AccountSid string, ReferenceSid string, params *ListRecordingAddOnResultParams) (*ListRecordingAddOnResultResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRecordingAddOnResultResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRecordingAddOnResultPayloadParams Optional parameters for the method 'ListRecordingAddOnResultPayload' +type ListRecordingAddOnResultPayloadParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRecordingAddOnResultPayload Method for ListRecordingAddOnResultPayload +Retrieve a list of payloads belonging to the AddOnResult + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to read. + * @param ReferenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to read belongs. + * @param AddOnResultSid The SID of the AddOnResult to which the payloads to read belongs. + * @param optional nil or *ListRecordingAddOnResultPayloadOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRecordingAddOnResultPayloadResponse +*/ +func (c *DefaultApiService) ListRecordingAddOnResultPayload(AccountSid string, ReferenceSid string, AddOnResultSid string, params *ListRecordingAddOnResultPayloadParams) (*ListRecordingAddOnResultPayloadResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ReferenceSid"+"}", ReferenceSid, -1) + path = strings.Replace(path, "{"+"AddOnResultSid"+"}", AddOnResultSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRecordingAddOnResultPayloadResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRecordingTranscriptionParams Optional parameters for the method 'ListRecordingTranscription' +type ListRecordingTranscriptionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRecordingTranscription Method for ListRecordingTranscription + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + * @param RecordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcriptions to read. + * @param optional nil or *ListRecordingTranscriptionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRecordingTranscriptionResponse +*/ +func (c *DefaultApiService) ListRecordingTranscription(AccountSid string, RecordingSid string, params *ListRecordingTranscriptionParams) (*ListRecordingTranscriptionResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"RecordingSid"+"}", RecordingSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRecordingTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListShortCodeParams Optional parameters for the method 'ListShortCode' +type ListShortCodeParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + ShortCode *string `json:"ShortCode,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListShortCode Method for ListShortCode +Retrieve a list of short-codes belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to read. + * @param optional nil or *ListShortCodeOpts - Optional Parameters: + * @param "FriendlyName" (string) - The string that identifies the ShortCode resources to read. + * @param "ShortCode" (string) - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListShortCodeResponse +*/ +func (c *DefaultApiService) ListShortCode(AccountSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ShortCode != nil { + data.Set("ShortCode", *params.ShortCode) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSigningKeyParams Optional parameters for the method 'ListSigningKey' +type ListSigningKeyParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSigningKey Method for ListSigningKey + * @param AccountSid + * @param optional nil or *ListSigningKeyOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSigningKeyResponse +*/ +func (c *DefaultApiService) ListSigningKey(AccountSid string, params *ListSigningKeyParams) (*ListSigningKeyResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSigningKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipAuthCallsCredentialListMappingParams Optional parameters for the method 'ListSipAuthCallsCredentialListMapping' +type ListSipAuthCallsCredentialListMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipAuthCallsCredentialListMapping Method for ListSipAuthCallsCredentialListMapping +Retrieve a list of credential list mappings belonging to the domain used in the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + * @param DomainSid The SID of the SIP domain that contains the resources to read. + * @param optional nil or *ListSipAuthCallsCredentialListMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipAuthCallsCredentialListMappingResponse +*/ +func (c *DefaultApiService) ListSipAuthCallsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsCredentialListMappingParams) (*ListSipAuthCallsCredentialListMappingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipAuthCallsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipAuthCallsIpAccessControlListMappingParams Optional parameters for the method 'ListSipAuthCallsIpAccessControlListMapping' +type ListSipAuthCallsIpAccessControlListMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipAuthCallsIpAccessControlListMapping Method for ListSipAuthCallsIpAccessControlListMapping +Retrieve a list of IP Access Control List mappings belonging to the domain used in the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to read. + * @param DomainSid The SID of the SIP domain that contains the resources to read. + * @param optional nil or *ListSipAuthCallsIpAccessControlListMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipAuthCallsIpAccessControlListMappingResponse +*/ +func (c *DefaultApiService) ListSipAuthCallsIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipAuthCallsIpAccessControlListMappingParams) (*ListSipAuthCallsIpAccessControlListMappingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipAuthCallsIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipAuthRegistrationsCredentialListMappingParams Optional parameters for the method 'ListSipAuthRegistrationsCredentialListMapping' +type ListSipAuthRegistrationsCredentialListMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipAuthRegistrationsCredentialListMapping Method for ListSipAuthRegistrationsCredentialListMapping +Retrieve a list of credential list mappings belonging to the domain used in the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. + * @param DomainSid The SID of the SIP domain that contains the resources to read. + * @param optional nil or *ListSipAuthRegistrationsCredentialListMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipAuthRegistrationsCredentialListMappingResponse +*/ +func (c *DefaultApiService) ListSipAuthRegistrationsCredentialListMapping(AccountSid string, DomainSid string, params *ListSipAuthRegistrationsCredentialListMappingParams) (*ListSipAuthRegistrationsCredentialListMappingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipAuthRegistrationsCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipCredentialParams Optional parameters for the method 'ListSipCredential' +type ListSipCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipCredential Method for ListSipCredential +Retrieve a list of credentials. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param CredentialListSid The unique id that identifies the credential list that contains the desired credentials. + * @param optional nil or *ListSipCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipCredentialResponse +*/ +func (c *DefaultApiService) ListSipCredential(AccountSid string, CredentialListSid string, params *ListSipCredentialParams) (*ListSipCredentialResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipCredentialListParams Optional parameters for the method 'ListSipCredentialList' +type ListSipCredentialListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipCredentialList Method for ListSipCredentialList +Get All Credential Lists + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param optional nil or *ListSipCredentialListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipCredentialListResponse +*/ +func (c *DefaultApiService) ListSipCredentialList(AccountSid string, params *ListSipCredentialListParams) (*ListSipCredentialListResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipCredentialListMappingParams Optional parameters for the method 'ListSipCredentialListMapping' +type ListSipCredentialListMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipCredentialListMapping Method for ListSipCredentialListMapping +Read multiple CredentialListMapping resources from an account. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP Domain that includes the resource to read. + * @param optional nil or *ListSipCredentialListMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipCredentialListMappingResponse +*/ +func (c *DefaultApiService) ListSipCredentialListMapping(AccountSid string, DomainSid string, params *ListSipCredentialListMappingParams) (*ListSipCredentialListMappingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipCredentialListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipDomainParams Optional parameters for the method 'ListSipDomain' +type ListSipDomainParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipDomain Method for ListSipDomain +Retrieve a list of domains belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read. + * @param optional nil or *ListSipDomainOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipDomainResponse +*/ +func (c *DefaultApiService) ListSipDomain(AccountSid string, params *ListSipDomainParams) (*ListSipDomainResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipDomainResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipIpAccessControlListParams Optional parameters for the method 'ListSipIpAccessControlList' +type ListSipIpAccessControlListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipIpAccessControlList Method for ListSipIpAccessControlList +Retrieve a list of IpAccessControlLists that belong to the account used to make the request + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param optional nil or *ListSipIpAccessControlListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipIpAccessControlListResponse +*/ +func (c *DefaultApiService) ListSipIpAccessControlList(AccountSid string, params *ListSipIpAccessControlListParams) (*ListSipIpAccessControlListResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipIpAccessControlListMappingParams Optional parameters for the method 'ListSipIpAccessControlListMapping' +type ListSipIpAccessControlListMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipIpAccessControlListMapping Method for ListSipIpAccessControlListMapping +Retrieve a list of IpAccessControlListMapping resources. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param DomainSid A 34 character string that uniquely identifies the SIP domain. + * @param optional nil or *ListSipIpAccessControlListMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipIpAccessControlListMappingResponse +*/ +func (c *DefaultApiService) ListSipIpAccessControlListMapping(AccountSid string, DomainSid string, params *ListSipIpAccessControlListMappingParams) (*ListSipIpAccessControlListMappingResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"DomainSid"+"}", DomainSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipIpAccessControlListMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSipIpAddressParams Optional parameters for the method 'ListSipIpAddress' +type ListSipIpAddressParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSipIpAddress Method for ListSipIpAddress +Read multiple IpAddress resources. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to read. + * @param optional nil or *ListSipIpAddressOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSipIpAddressResponse +*/ +func (c *DefaultApiService) ListSipIpAddress(AccountSid string, IpAccessControlListSid string, params *ListSipIpAddressParams) (*ListSipIpAddressResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSipIpAddressResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTranscriptionParams Optional parameters for the method 'ListTranscription' +type ListTranscriptionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTranscription Method for ListTranscription +Retrieve a list of transcriptions belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. + * @param optional nil or *ListTranscriptionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTranscriptionResponse +*/ +func (c *DefaultApiService) ListTranscription(AccountSid string, params *ListTranscriptionParams) (*ListTranscriptionResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Transcriptions.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTranscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' +type ListUsageRecordParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecord Method for ListUsageRecord +Retrieve a list of usage-records belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordResponse +*/ +func (c *DefaultApiService) ListUsageRecord(AccountSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordAllTimeParams Optional parameters for the method 'ListUsageRecordAllTime' +type ListUsageRecordAllTimeParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordAllTime Method for ListUsageRecordAllTime + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordAllTimeOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordAllTimeResponse +*/ +func (c *DefaultApiService) ListUsageRecordAllTime(AccountSid string, params *ListUsageRecordAllTimeParams) (*ListUsageRecordAllTimeResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordAllTimeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordDailyParams Optional parameters for the method 'ListUsageRecordDaily' +type ListUsageRecordDailyParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordDaily Method for ListUsageRecordDaily + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordDailyOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordDailyResponse +*/ +func (c *DefaultApiService) ListUsageRecordDaily(AccountSid string, params *ListUsageRecordDailyParams) (*ListUsageRecordDailyResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordDailyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordLastMonthParams Optional parameters for the method 'ListUsageRecordLastMonth' +type ListUsageRecordLastMonthParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordLastMonth Method for ListUsageRecordLastMonth + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordLastMonthOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordLastMonthResponse +*/ +func (c *DefaultApiService) ListUsageRecordLastMonth(AccountSid string, params *ListUsageRecordLastMonthParams) (*ListUsageRecordLastMonthResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordLastMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordMonthlyParams Optional parameters for the method 'ListUsageRecordMonthly' +type ListUsageRecordMonthlyParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordMonthly Method for ListUsageRecordMonthly + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordMonthlyOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordMonthlyResponse +*/ +func (c *DefaultApiService) ListUsageRecordMonthly(AccountSid string, params *ListUsageRecordMonthlyParams) (*ListUsageRecordMonthlyResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordMonthlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordThisMonthParams Optional parameters for the method 'ListUsageRecordThisMonth' +type ListUsageRecordThisMonthParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordThisMonth Method for ListUsageRecordThisMonth + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordThisMonthOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordThisMonthResponse +*/ +func (c *DefaultApiService) ListUsageRecordThisMonth(AccountSid string, params *ListUsageRecordThisMonthParams) (*ListUsageRecordThisMonthResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordThisMonthResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordTodayParams Optional parameters for the method 'ListUsageRecordToday' +type ListUsageRecordTodayParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordToday Method for ListUsageRecordToday + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordTodayOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordTodayResponse +*/ +func (c *DefaultApiService) ListUsageRecordToday(AccountSid string, params *ListUsageRecordTodayParams) (*ListUsageRecordTodayResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordTodayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordYearlyParams Optional parameters for the method 'ListUsageRecordYearly' +type ListUsageRecordYearlyParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordYearly Method for ListUsageRecordYearly + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordYearlyOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordYearlyResponse +*/ +func (c *DefaultApiService) ListUsageRecordYearly(AccountSid string, params *ListUsageRecordYearlyParams) (*ListUsageRecordYearlyResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordYearlyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordYesterdayParams Optional parameters for the method 'ListUsageRecordYesterday' +type ListUsageRecordYesterdayParams struct { + Category *string `json:"Category,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts *bool `json:"IncludeSubaccounts,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecordYesterday Method for ListUsageRecordYesterday + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. + * @param optional nil or *ListUsageRecordYesterdayOpts - Optional Parameters: + * @param "Category" (string) - The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. + * @param "IncludeSubaccounts" (bool) - Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordYesterdayResponse +*/ +func (c *DefaultApiService) ListUsageRecordYesterday(AccountSid string, params *ListUsageRecordYesterdayParams) (*ListUsageRecordYesterdayResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Category != nil { + data.Set("Category", *params.Category) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.IncludeSubaccounts != nil { + data.Set("IncludeSubaccounts", fmt.Sprint(*params.IncludeSubaccounts)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordYesterdayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageTriggerParams Optional parameters for the method 'ListUsageTrigger' +type ListUsageTriggerParams struct { + Recurring *string `json:"Recurring,omitempty"` + TriggerBy *string `json:"TriggerBy,omitempty"` + UsageCategory *string `json:"UsageCategory,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageTrigger Method for ListUsageTrigger +Retrieve a list of usage-triggers belonging to the account used to make the request + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to read. + * @param optional nil or *ListUsageTriggerOpts - Optional Parameters: + * @param "Recurring" (string) - The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. + * @param "TriggerBy" (string) - The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). + * @param "UsageCategory" (string) - The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageTriggerResponse +*/ +func (c *DefaultApiService) ListUsageTrigger(AccountSid string, params *ListUsageTriggerParams) (*ListUsageTriggerResponse, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Recurring != nil { + data.Set("Recurring", *params.Recurring) + } + if params != nil && params.TriggerBy != nil { + data.Set("TriggerBy", *params.TriggerBy) + } + if params != nil && params.UsageCategory != nil { + data.Set("UsageCategory", *params.UsageCategory) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageTriggerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAccountParams Optional parameters for the method 'UpdateAccount' +type UpdateAccountParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateAccount Method for UpdateAccount +Modify the properties of a given Account + * @param Sid The Account Sid that uniquely identifies the account to update + * @param optional nil or *UpdateAccountOpts - Optional Parameters: + * @param "FriendlyName" (string) - Update the human-readable description of this Account + * @param "Status" (string) - Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. +@return ApiV2010Account +*/ +func (c *DefaultApiService) UpdateAccount(Sid string, params *UpdateAccountParams) (*ApiV2010Account, error) { + path := "/2010-04-01/Accounts/{Sid}.json" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010Account{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAddressParams Optional parameters for the method 'UpdateAddress' +type UpdateAddressParams struct { + AutoCorrectAddress *bool `json:"AutoCorrectAddress,omitempty"` + City *string `json:"City,omitempty"` + CustomerName *string `json:"CustomerName,omitempty"` + EmergencyEnabled *bool `json:"EmergencyEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PostalCode *string `json:"PostalCode,omitempty"` + Region *string `json:"Region,omitempty"` + Street *string `json:"Street,omitempty"` +} + +/* +UpdateAddress Method for UpdateAddress + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Address resource to update. + * @param optional nil or *UpdateAddressOpts - Optional Parameters: + * @param "AutoCorrectAddress" (bool) - Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + * @param "City" (string) - The city of the address. + * @param "CustomerName" (string) - The name to associate with the address. + * @param "EmergencyEnabled" (bool) - Whether to enable emergency calling on the address. Can be: `true` or `false`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the address. It can be up to 64 characters long. + * @param "PostalCode" (string) - The postal code of the address. + * @param "Region" (string) - The state or region of the address. + * @param "Street" (string) - The number and street address of the address. +@return ApiV2010AccountAddress +*/ +func (c *DefaultApiService) UpdateAddress(AccountSid string, Sid string, params *UpdateAddressParams) (*ApiV2010AccountAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AutoCorrectAddress != nil { + data.Set("AutoCorrectAddress", fmt.Sprint(*params.AutoCorrectAddress)) + } + if params != nil && params.City != nil { + data.Set("City", *params.City) + } + if params != nil && params.CustomerName != nil { + data.Set("CustomerName", *params.CustomerName) + } + if params != nil && params.EmergencyEnabled != nil { + data.Set("EmergencyEnabled", fmt.Sprint(*params.EmergencyEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PostalCode != nil { + data.Set("PostalCode", *params.PostalCode) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.Street != nil { + data.Set("Street", *params.Street) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateApplicationParams Optional parameters for the method 'UpdateApplication' +type UpdateApplicationParams struct { + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessageStatusCallback *string `json:"MessageStatusCallback,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsStatusCallback *string `json:"SmsStatusCallback,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateApplication Method for UpdateApplication +Updates the application's properties + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the Application resource to update. + * @param optional nil or *UpdateApplicationOpts - Optional Parameters: + * @param "ApiVersion" (string) - The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "MessageStatusCallback" (string) - The URL we should call using a POST method to send message status information to your application. + * @param "SmsFallbackMethod" (string) - The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + * @param "SmsMethod" (string) - The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + * @param "SmsStatusCallback" (string) - Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. + * @param "SmsUrl" (string) - The URL we should call when the phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + * @param "VoiceCallerIdLookup" (bool) - Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + * @param "VoiceUrl" (string) - The URL we should call when the phone number assigned to this application receives a call. +@return ApiV2010AccountApplication +*/ +func (c *DefaultApiService) UpdateApplication(AccountSid string, Sid string, params *UpdateApplicationParams) (*ApiV2010AccountApplication, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessageStatusCallback != nil { + data.Set("MessageStatusCallback", *params.MessageStatusCallback) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsStatusCallback != nil { + data.Set("SmsStatusCallback", *params.SmsStatusCallback) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountApplication{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCallParams Optional parameters for the method 'UpdateCall' +type UpdateCallParams struct { + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + Method *string `json:"Method,omitempty"` + Status *string `json:"Status,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Twiml *string `json:"Twiml,omitempty"` + Url *string `json:"Url,omitempty"` +} + +/* +UpdateCall Method for UpdateCall +Initiates a call redirect or terminates a call + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to update. + * @param Sid The Twilio-provided string that uniquely identifies the Call resource to update + * @param optional nil or *UpdateCallOpts - Optional Parameters: + * @param "FallbackMethod" (string) - The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "FallbackUrl" (string) - The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "Method" (string) - The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "Status" (string) - The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + * @param "StatusCallbackMethod" (string) - The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + * @param "Twiml" (string) - TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive + * @param "Url" (string) - The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). +@return ApiV2010AccountCall +*/ +func (c *DefaultApiService) UpdateCall(AccountSid string, Sid string, params *UpdateCallParams) (*ApiV2010AccountCall, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Twiml != nil { + data.Set("Twiml", *params.Twiml) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCallFeedbackParams Optional parameters for the method 'UpdateCallFeedback' +type UpdateCallFeedbackParams struct { + Issue *[]string `json:"Issue,omitempty"` + QualityScore *int32 `json:"QualityScore,omitempty"` +} + +/* +UpdateCallFeedback Method for UpdateCallFeedback +Update a Feedback resource for a call + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param CallSid The call sid that uniquely identifies the call + * @param optional nil or *UpdateCallFeedbackOpts - Optional Parameters: + * @param "Issue" ([]string) - One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + * @param "QualityScore" (int32) - The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. +@return ApiV2010AccountCallCallFeedback +*/ +func (c *DefaultApiService) UpdateCallFeedback(AccountSid string, CallSid string, params *UpdateCallFeedbackParams) (*ApiV2010AccountCallCallFeedback, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Issue != nil { + data.Set("Issue", strings.Join(*params.Issue, ",")) + } + if params != nil && params.QualityScore != nil { + data.Set("QualityScore", fmt.Sprint(*params.QualityScore)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallFeedback{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCallRecordingParams Optional parameters for the method 'UpdateCallRecording' +type UpdateCallRecordingParams struct { + PauseBehavior *string `json:"PauseBehavior,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateCallRecording Method for UpdateCallRecording +Changes the status of the recording to paused, stopped, or in-progress. Note: Pass `Twilio.CURRENT` instead of recording sid to reference current active recording. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to update. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Recording resource to update. + * @param optional nil or *UpdateCallRecordingOpts - Optional Parameters: + * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. +@return ApiV2010AccountCallCallRecording +*/ +func (c *DefaultApiService) UpdateCallRecording(AccountSid string, CallSid string, Sid string, params *UpdateCallRecordingParams) (*ApiV2010AccountCallCallRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallCallRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConferenceParams Optional parameters for the method 'UpdateConference' +type UpdateConferenceParams struct { + AnnounceMethod *string `json:"AnnounceMethod,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateConference Method for UpdateConference + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to update. + * @param Sid The Twilio-provided string that uniquely identifies the Conference resource to update + * @param optional nil or *UpdateConferenceOpts - Optional Parameters: + * @param "AnnounceMethod" (string) - The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` + * @param "AnnounceUrl" (string) - The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `` or ``. + * @param "Status" (string) - The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants +@return ApiV2010AccountConference +*/ +func (c *DefaultApiService) UpdateConference(AccountSid string, Sid string, params *UpdateConferenceParams) (*ApiV2010AccountConference, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) + } + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConference{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConferenceRecordingParams Optional parameters for the method 'UpdateConferenceRecording' +type UpdateConferenceRecordingParams struct { + PauseBehavior *string `json:"PauseBehavior,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateConferenceRecording Method for UpdateConferenceRecording +Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as recording sid. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to update. + * @param ConferenceSid The Conference SID that identifies the conference associated with the recording to update. + * @param Sid The Twilio-provided string that uniquely identifies the Conference Recording resource to update. Use `Twilio.CURRENT` to reference the current active recording. + * @param optional nil or *UpdateConferenceRecordingOpts - Optional Parameters: + * @param "PauseBehavior" (string) - Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + * @param "Status" (string) - The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. +@return ApiV2010AccountConferenceConferenceRecording +*/ +func (c *DefaultApiService) UpdateConferenceRecording(AccountSid string, ConferenceSid string, Sid string, params *UpdateConferenceRecordingParams) (*ApiV2010AccountConferenceConferenceRecording, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PauseBehavior != nil { + data.Set("PauseBehavior", *params.PauseBehavior) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceConferenceRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConnectAppParams Optional parameters for the method 'UpdateConnectApp' +type UpdateConnectAppParams struct { + AuthorizeRedirectUrl *string `json:"AuthorizeRedirectUrl,omitempty"` + CompanyName *string `json:"CompanyName,omitempty"` + DeauthorizeCallbackMethod *string `json:"DeauthorizeCallbackMethod,omitempty"` + DeauthorizeCallbackUrl *string `json:"DeauthorizeCallbackUrl,omitempty"` + Description *string `json:"Description,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + HomepageUrl *string `json:"HomepageUrl,omitempty"` + Permissions *[]string `json:"Permissions,omitempty"` +} + +/* +UpdateConnectApp Method for UpdateConnectApp +Update a connect-app with the specified parameters + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the ConnectApp resource to update. + * @param optional nil or *UpdateConnectAppOpts - Optional Parameters: + * @param "AuthorizeRedirectUrl" (string) - The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + * @param "CompanyName" (string) - The company name to set for the Connect App. + * @param "DeauthorizeCallbackMethod" (string) - The HTTP method to use when calling `deauthorize_callback_url`. + * @param "DeauthorizeCallbackUrl" (string) - The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. + * @param "Description" (string) - A description of the Connect App. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "HomepageUrl" (string) - A public URL where users can obtain more information about this Connect App. + * @param "Permissions" ([]string) - A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. +@return ApiV2010AccountConnectApp +*/ +func (c *DefaultApiService) UpdateConnectApp(AccountSid string, Sid string, params *UpdateConnectAppParams) (*ApiV2010AccountConnectApp, error) { + path := "/2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AuthorizeRedirectUrl != nil { + data.Set("AuthorizeRedirectUrl", *params.AuthorizeRedirectUrl) + } + if params != nil && params.CompanyName != nil { + data.Set("CompanyName", *params.CompanyName) + } + if params != nil && params.DeauthorizeCallbackMethod != nil { + data.Set("DeauthorizeCallbackMethod", *params.DeauthorizeCallbackMethod) + } + if params != nil && params.DeauthorizeCallbackUrl != nil { + data.Set("DeauthorizeCallbackUrl", *params.DeauthorizeCallbackUrl) + } + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.HomepageUrl != nil { + data.Set("HomepageUrl", *params.HomepageUrl) + } + if params != nil && params.Permissions != nil { + data.Set("Permissions", strings.Join(*params.Permissions, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConnectApp{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateIncomingPhoneNumberParams Optional parameters for the method 'UpdateIncomingPhoneNumber' +type UpdateIncomingPhoneNumberParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + ApiVersion *string `json:"ApiVersion,omitempty"` + BundleSid *string `json:"BundleSid,omitempty"` + EmergencyAddressSid *string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus *string `json:"EmergencyStatus,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IdentitySid *string `json:"IdentitySid,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + TrunkSid *string `json:"TrunkSid,omitempty"` + VoiceApplicationSid *string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup *bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode *string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateIncomingPhoneNumber Method for UpdateIncomingPhoneNumber +Update an incoming-phone-number instance. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + * @param Sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update. + * @param optional nil or *UpdateIncomingPhoneNumberOpts - Optional Parameters: + * @param "AccountSid" (string) - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + * @param "AddressSid" (string) - The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. + * @param "ApiVersion" (string) - The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. + * @param "BundleSid" (string) - The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + * @param "EmergencyAddressSid" (string) - The SID of the emergency address configuration to use for emergency calling from this phone number. + * @param "EmergencyStatus" (string) - The configuration status parameter that determines whether the phone number is enabled for emergency calling. + * @param "FriendlyName" (string) - A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + * @param "IdentitySid" (string) - The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. + * @param "SmsApplicationSid" (string) - The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + * @param "SmsMethod" (string) - The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "SmsUrl" (string) - The URL we should call when the phone number receives an incoming SMS message. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "TrunkSid" (string) - The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + * @param "VoiceApplicationSid" (string) - The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + * @param "VoiceCallerIdLookup" (bool) - Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + * @param "VoiceFallbackMethod" (string) - The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + * @param "VoiceMethod" (string) - The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "VoiceReceiveMode" (string) - The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + * @param "VoiceUrl" (string) - The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. +@return ApiV2010AccountIncomingPhoneNumber +*/ +func (c *DefaultApiService) UpdateIncomingPhoneNumber(AccountSid string, Sid string, params *UpdateIncomingPhoneNumberParams) (*ApiV2010AccountIncomingPhoneNumber, error) { + path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.BundleSid != nil { + data.Set("BundleSid", *params.BundleSid) + } + if params != nil && params.EmergencyAddressSid != nil { + data.Set("EmergencyAddressSid", *params.EmergencyAddressSid) + } + if params != nil && params.EmergencyStatus != nil { + data.Set("EmergencyStatus", *params.EmergencyStatus) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IdentitySid != nil { + data.Set("IdentitySid", *params.IdentitySid) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.TrunkSid != nil { + data.Set("TrunkSid", *params.TrunkSid) + } + if params != nil && params.VoiceApplicationSid != nil { + data.Set("VoiceApplicationSid", *params.VoiceApplicationSid) + } + if params != nil && params.VoiceCallerIdLookup != nil { + data.Set("VoiceCallerIdLookup", fmt.Sprint(*params.VoiceCallerIdLookup)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceReceiveMode != nil { + data.Set("VoiceReceiveMode", *params.VoiceReceiveMode) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountIncomingPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateKeyParams Optional parameters for the method 'UpdateKey' +type UpdateKeyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateKey Method for UpdateKey + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the Key resource to update. + * @param optional nil or *UpdateKeyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ApiV2010AccountKey +*/ +func (c *DefaultApiService) UpdateKey(AccountSid string, Sid string, params *UpdateKeyParams) (*ApiV2010AccountKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMemberParams Optional parameters for the method 'UpdateMember' +type UpdateMemberParams struct { + Method *string `json:"Method,omitempty"` + Url *string `json:"Url,omitempty"` +} + +/* +UpdateMember Method for UpdateMember +Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to update. + * @param QueueSid The SID of the Queue in which to find the members to update. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update. + * @param optional nil or *UpdateMemberOpts - Optional Parameters: + * @param "Method" (string) - How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. + * @param "Url" (string) - The absolute URL of the Queue resource. +@return ApiV2010AccountQueueMember +*/ +func (c *DefaultApiService) UpdateMember(AccountSid string, QueueSid string, CallSid string, params *UpdateMemberParams) (*ApiV2010AccountQueueMember, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"QueueSid"+"}", QueueSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.Url != nil { + data.Set("Url", *params.Url) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueueMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMessageParams Optional parameters for the method 'UpdateMessage' +type UpdateMessageParams struct { + Body *string `json:"Body,omitempty"` +} + +/* +UpdateMessage Method for UpdateMessage +To redact a message-body from a post-flight message record, post to the message instance resource with an empty body + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to update. + * @param optional nil or *UpdateMessageOpts - Optional Parameters: + * @param "Body" (string) - The text of the message you want to send. Can be up to 1,600 characters long. +@return ApiV2010AccountMessage +*/ +func (c *DefaultApiService) UpdateMessage(AccountSid string, Sid string, params *UpdateMessageParams) (*ApiV2010AccountMessage, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateOutgoingCallerIdParams Optional parameters for the method 'UpdateOutgoingCallerId' +type UpdateOutgoingCallerIdParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateOutgoingCallerId Method for UpdateOutgoingCallerId +Updates the caller-id + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to update. + * @param optional nil or *UpdateOutgoingCallerIdOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ApiV2010AccountOutgoingCallerId +*/ +func (c *DefaultApiService) UpdateOutgoingCallerId(AccountSid string, Sid string, params *UpdateOutgoingCallerIdParams) (*ApiV2010AccountOutgoingCallerId, error) { + path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountOutgoingCallerId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateParticipantParams Optional parameters for the method 'UpdateParticipant' +type UpdateParticipantParams struct { + AnnounceMethod *string `json:"AnnounceMethod,omitempty"` + AnnounceUrl *string `json:"AnnounceUrl,omitempty"` + BeepOnExit *bool `json:"BeepOnExit,omitempty"` + CallSidToCoach *string `json:"CallSidToCoach,omitempty"` + Coaching *bool `json:"Coaching,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + Hold *bool `json:"Hold,omitempty"` + HoldMethod *string `json:"HoldMethod,omitempty"` + HoldUrl *string `json:"HoldUrl,omitempty"` + Muted *bool `json:"Muted,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` +} + +/* +UpdateParticipant Method for UpdateParticipant +Update the properties of the participant + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to update. + * @param ConferenceSid The SID of the conference with the participant to update. + * @param CallSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to update. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. + * @param optional nil or *UpdateParticipantOpts - Optional Parameters: + * @param "AnnounceMethod" (string) - The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "AnnounceUrl" (string) - The URL we call using the `announce_method` for an announcement to the participant. The URL must return an MP3 file, a WAV file, or a TwiML document that contains `` or `` commands. + * @param "BeepOnExit" (bool) - Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. + * @param "CallSidToCoach" (string) - The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + * @param "Coaching" (bool) - Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + * @param "EndConferenceOnExit" (bool) - Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + * @param "Hold" (bool) - Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. + * @param "HoldMethod" (string) - The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. + * @param "HoldUrl" (string) - The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains the ``, `` or `` commands. + * @param "Muted" (bool) - Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. + * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). +@return ApiV2010AccountConferenceParticipant +*/ +func (c *DefaultApiService) UpdateParticipant(AccountSid string, ConferenceSid string, CallSid string, params *UpdateParticipantParams) (*ApiV2010AccountConferenceParticipant, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"ConferenceSid"+"}", ConferenceSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AnnounceMethod != nil { + data.Set("AnnounceMethod", *params.AnnounceMethod) + } + if params != nil && params.AnnounceUrl != nil { + data.Set("AnnounceUrl", *params.AnnounceUrl) + } + if params != nil && params.BeepOnExit != nil { + data.Set("BeepOnExit", fmt.Sprint(*params.BeepOnExit)) + } + if params != nil && params.CallSidToCoach != nil { + data.Set("CallSidToCoach", *params.CallSidToCoach) + } + if params != nil && params.Coaching != nil { + data.Set("Coaching", fmt.Sprint(*params.Coaching)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.Hold != nil { + data.Set("Hold", fmt.Sprint(*params.Hold)) + } + if params != nil && params.HoldMethod != nil { + data.Set("HoldMethod", *params.HoldMethod) + } + if params != nil && params.HoldUrl != nil { + data.Set("HoldUrl", *params.HoldUrl) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountConferenceParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdatePaymentsParams Optional parameters for the method 'UpdatePayments' +type UpdatePaymentsParams struct { + Capture *string `json:"Capture,omitempty"` + IdempotencyKey *string `json:"IdempotencyKey,omitempty"` + Status *string `json:"Status,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` +} + +/* +UpdatePayments Method for UpdatePayments +update an instance of payments with different phases of payment flows. + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will update the resource. + * @param CallSid The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource. + * @param Sid The SID of Payments session that needs to be updated. + * @param optional nil or *UpdatePaymentsOpts - Optional Parameters: + * @param "Capture" (string) - The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. + * @param "IdempotencyKey" (string) - A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + * @param "Status" (string) - Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected connector for processing. + * @param "StatusCallback" (string) - Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. +@return ApiV2010AccountCallPayments +*/ +func (c *DefaultApiService) UpdatePayments(AccountSid string, CallSid string, Sid string, params *UpdatePaymentsParams) (*ApiV2010AccountCallPayments, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Capture != nil { + data.Set("Capture", *params.Capture) + } + if params != nil && params.IdempotencyKey != nil { + data.Set("IdempotencyKey", *params.IdempotencyKey) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountCallPayments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateQueueParams Optional parameters for the method 'UpdateQueue' +type UpdateQueueParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxSize *int32 `json:"MaxSize,omitempty"` +} + +/* +UpdateQueue Method for UpdateQueue +Update the queue with the new parameters + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Queue resource to update + * @param optional nil or *UpdateQueueOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. + * @param "MaxSize" (int32) - The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. +@return ApiV2010AccountQueue +*/ +func (c *DefaultApiService) UpdateQueue(AccountSid string, Sid string, params *UpdateQueueParams) (*ApiV2010AccountQueue, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxSize != nil { + data.Set("MaxSize", fmt.Sprint(*params.MaxSize)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' +type UpdateShortCodeParams struct { + ApiVersion *string `json:"ApiVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` +} + +/* +UpdateShortCode Method for UpdateShortCode +Update a short code with the following parameters + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to update. + * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to update + * @param optional nil or *UpdateShortCodeOpts - Optional Parameters: + * @param "ApiVersion" (string) - The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. + * @param "FriendlyName" (string) - A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. + * @param "SmsFallbackMethod" (string) - The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + * @param "SmsFallbackUrl" (string) - The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. + * @param "SmsMethod" (string) - The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. + * @param "SmsUrl" (string) - The URL we should call when receiving an incoming SMS message to this short code. +@return ApiV2010AccountShortCode +*/ +func (c *DefaultApiService) UpdateShortCode(AccountSid string, Sid string, params *UpdateShortCodeParams) (*ApiV2010AccountShortCode, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiVersion != nil { + data.Set("ApiVersion", *params.ApiVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSigningKeyParams Optional parameters for the method 'UpdateSigningKey' +type UpdateSigningKeyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateSigningKey Method for UpdateSigningKey + * @param AccountSid + * @param Sid + * @param optional nil or *UpdateSigningKeyOpts - Optional Parameters: + * @param "FriendlyName" (string) - +@return ApiV2010AccountSigningKey +*/ +func (c *DefaultApiService) UpdateSigningKey(AccountSid string, Sid string, params *UpdateSigningKeyParams) (*ApiV2010AccountSigningKey, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSigningKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSipCredentialParams Optional parameters for the method 'UpdateSipCredential' +type UpdateSipCredentialParams struct { + Password *string `json:"Password,omitempty"` +} + +/* +UpdateSipCredential Method for UpdateSipCredential +Update a credential resource. + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param CredentialListSid The unique id that identifies the credential list that includes this credential. + * @param Sid The unique id that identifies the resource to update. + * @param optional nil or *UpdateSipCredentialOpts - Optional Parameters: + * @param "Password" (string) - The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) +@return ApiV2010AccountSipSipCredentialListSipCredential +*/ +func (c *DefaultApiService) UpdateSipCredential(AccountSid string, CredentialListSid string, Sid string, params *UpdateSipCredentialParams) (*ApiV2010AccountSipSipCredentialListSipCredential, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"CredentialListSid"+"}", CredentialListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Password != nil { + data.Set("Password", *params.Password) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialListSipCredential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSipCredentialListParams Optional parameters for the method 'UpdateSipCredentialList' +type UpdateSipCredentialListParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateSipCredentialList Method for UpdateSipCredentialList +Update a Credential List + * @param AccountSid The unique id of the Account that is responsible for this resource. + * @param Sid The credential list Sid that uniquely identifies this resource + * @param optional nil or *UpdateSipCredentialListOpts - Optional Parameters: + * @param "FriendlyName" (string) - A human readable descriptive text for a CredentialList, up to 64 characters long. +@return ApiV2010AccountSipSipCredentialList +*/ +func (c *DefaultApiService) UpdateSipCredentialList(AccountSid string, Sid string, params *UpdateSipCredentialListParams) (*ApiV2010AccountSipSipCredentialList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSipDomainParams Optional parameters for the method 'UpdateSipDomain' +type UpdateSipDomainParams struct { + ByocTrunkSid *string `json:"ByocTrunkSid,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + EmergencyCallerSid *string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled *bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + SipRegistration *bool `json:"SipRegistration,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceStatusCallbackMethod *string `json:"VoiceStatusCallbackMethod,omitempty"` + VoiceStatusCallbackUrl *string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateSipDomain Method for UpdateSipDomain +Update the attributes of a domain + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the SipDomain resource to update. + * @param optional nil or *UpdateSipDomainOpts - Optional Parameters: + * @param "ByocTrunkSid" (string) - The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + * @param "DomainName" (string) - The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`. + * @param "EmergencyCallerSid" (string) - Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + * @param "EmergencyCallingEnabled" (bool) - Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + * @param "FriendlyName" (string) - A descriptive string that you created to describe the resource. It can be up to 64 characters long. + * @param "Secure" (bool) - Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + * @param "SipRegistration" (bool) - Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url` + * @param "VoiceStatusCallbackMethod" (string) - The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + * @param "VoiceStatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. + * @param "VoiceUrl" (string) - The URL we should call when the domain receives a call. +@return ApiV2010AccountSipSipDomain +*/ +func (c *DefaultApiService) UpdateSipDomain(AccountSid string, Sid string, params *UpdateSipDomainParams) (*ApiV2010AccountSipSipDomain, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ByocTrunkSid != nil { + data.Set("ByocTrunkSid", *params.ByocTrunkSid) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.EmergencyCallerSid != nil { + data.Set("EmergencyCallerSid", *params.EmergencyCallerSid) + } + if params != nil && params.EmergencyCallingEnabled != nil { + data.Set("EmergencyCallingEnabled", fmt.Sprint(*params.EmergencyCallingEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.SipRegistration != nil { + data.Set("SipRegistration", fmt.Sprint(*params.SipRegistration)) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceStatusCallbackMethod != nil { + data.Set("VoiceStatusCallbackMethod", *params.VoiceStatusCallbackMethod) + } + if params != nil && params.VoiceStatusCallbackUrl != nil { + data.Set("VoiceStatusCallbackUrl", *params.VoiceStatusCallbackUrl) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSipIpAccessControlListParams Optional parameters for the method 'UpdateSipIpAccessControlList' +type UpdateSipIpAccessControlListParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateSipIpAccessControlList Method for UpdateSipIpAccessControlList +Rename an IpAccessControlList + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param Sid A 34 character string that uniquely identifies the resource to udpate. + * @param optional nil or *UpdateSipIpAccessControlListOpts - Optional Parameters: + * @param "FriendlyName" (string) - A human readable descriptive text, up to 64 characters long. +@return ApiV2010AccountSipSipIpAccessControlList +*/ +func (c *DefaultApiService) UpdateSipIpAccessControlList(AccountSid string, Sid string, params *UpdateSipIpAccessControlListParams) (*ApiV2010AccountSipSipIpAccessControlList, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSipIpAddressParams Optional parameters for the method 'UpdateSipIpAddress' +type UpdateSipIpAddressParams struct { + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` +} + +/* +UpdateSipIpAddress Method for UpdateSipIpAddress +Update an IpAddress resource. + * @param AccountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. + * @param IpAccessControlListSid The IpAccessControlList Sid that identifies the IpAddress resources to update. + * @param Sid A 34 character string that identifies the IpAddress resource to update. + * @param optional nil or *UpdateSipIpAddressOpts - Optional Parameters: + * @param "CidrPrefixLength" (int32) - An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + * @param "FriendlyName" (string) - A human readable descriptive text for this resource, up to 64 characters long. + * @param "IpAddress" (string) - An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. +@return ApiV2010AccountSipSipIpAccessControlListSipIpAddress +*/ +func (c *DefaultApiService) UpdateSipIpAddress(AccountSid string, IpAccessControlListSid string, Sid string, params *UpdateSipIpAddressParams) (*ApiV2010AccountSipSipIpAccessControlListSipIpAddress, error) { + path := "/2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"IpAccessControlListSid"+"}", IpAccessControlListSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountSipSipIpAccessControlListSipIpAddress{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUsageTriggerParams Optional parameters for the method 'UpdateUsageTrigger' +type UpdateUsageTriggerParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateUsageTrigger Method for UpdateUsageTrigger +Update an instance of a usage trigger + * @param AccountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to update. + * @param Sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to update. + * @param optional nil or *UpdateUsageTriggerOpts - Optional Parameters: + * @param "CallbackMethod" (string) - The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + * @param "CallbackUrl" (string) - The URL we should call using `callback_method` when the trigger fires. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ApiV2010AccountUsageUsageTrigger +*/ +func (c *DefaultApiService) UpdateUsageTrigger(AccountSid string, Sid string, params *UpdateUsageTriggerParams) (*ApiV2010AccountUsageUsageTrigger, error) { + path := "/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json" + path = strings.Replace(path, "{"+"AccountSid"+"}", AccountSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ApiV2010AccountUsageUsageTrigger{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/api/v2010/docs/ApiV2010Account.md b/rest/api/v2010/docs/ApiV2010Account.md new file mode 100644 index 000000000..f5b3f89d2 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010Account.md @@ -0,0 +1,20 @@ +# ApiV2010Account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthToken** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**OwnerAccountSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Type** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAddress.md b/rest/api/v2010/docs/ApiV2010AccountAddress.md new file mode 100644 index 000000000..f70a38ac3 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAddress.md @@ -0,0 +1,25 @@ +# ApiV2010AccountAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**City** | **string** | | [optional] +**CustomerName** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyEnabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**Region** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Street** | **string** | | [optional] +**Uri** | **string** | | [optional] +**Validated** | **bool** | | [optional] +**Verified** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md b/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md new file mode 100644 index 000000000..74de3a569 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAddressDependentPhoneNumber.md @@ -0,0 +1,36 @@ +# ApiV2010AccountAddressDependentPhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyAddressSid** | **string** | | [optional] +**EmergencyStatus** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountApplication.md b/rest/api/v2010/docs/ApiV2010AccountApplication.md new file mode 100644 index 000000000..c600c6848 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountApplication.md @@ -0,0 +1,30 @@ +# ApiV2010AccountApplication + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**MessageStatusCallback** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsStatusCallback** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md b/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md new file mode 100644 index 000000000..062e34ff8 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAuthorizedConnectApp.md @@ -0,0 +1,20 @@ +# ApiV2010AccountAuthorizedConnectApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConnectAppCompanyName** | **string** | | [optional] +**ConnectAppDescription** | **string** | | [optional] +**ConnectAppFriendlyName** | **string** | | [optional] +**ConnectAppHomepageUrl** | **string** | | [optional] +**ConnectAppSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md new file mode 100644 index 000000000..ef523dd69 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountry.md @@ -0,0 +1,15 @@ +# ApiV2010AccountAvailablePhoneNumberCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Beta** | **bool** | | [optional] +**Country** | **string** | | [optional] +**CountryCode** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md new file mode 100644 index 000000000..453d7e7df --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md new file mode 100644 index 000000000..d172c69c8 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md new file mode 100644 index 000000000..a278bdab1 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md new file mode 100644 index 000000000..a04f7582c --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md new file mode 100644 index 000000000..2ba28bacd --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md new file mode 100644 index 000000000..e2e134548 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md new file mode 100644 index 000000000..0f6ca78b4 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip.md @@ -0,0 +1,23 @@ +# ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRequirements** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Lata** | **string** | | [optional] +**Latitude** | **float32** | | [optional] +**Locality** | **string** | | [optional] +**Longitude** | **float32** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PostalCode** | **string** | | [optional] +**RateCenter** | **string** | | [optional] +**Region** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountBalance.md b/rest/api/v2010/docs/ApiV2010AccountBalance.md new file mode 100644 index 000000000..b74d6aec0 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountBalance.md @@ -0,0 +1,13 @@ +# ApiV2010AccountBalance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Balance** | **string** | | [optional] +**Currency** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCall.md b/rest/api/v2010/docs/ApiV2010AccountCall.md new file mode 100644 index 000000000..feda736b9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCall.md @@ -0,0 +1,37 @@ +# ApiV2010AccountCall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Annotation** | **string** | | [optional] +**AnsweredBy** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallerName** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Direction** | Pointer to **string** | | [optional] +**Duration** | **string** | | [optional] +**EndTime** | **string** | | [optional] +**ForwardedFrom** | **string** | | [optional] +**From** | **string** | | [optional] +**FromFormatted** | **string** | | [optional] +**GroupSid** | **string** | | [optional] +**ParentCallSid** | **string** | | [optional] +**PhoneNumberSid** | **string** | | [optional] +**Price** | Pointer to **string** | | [optional] +**PriceUnit** | **string** | | [optional] +**QueueTime** | **string** | | [optional] +**Sid** | **string** | | [optional] +**StartTime** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**To** | **string** | | [optional] +**ToFormatted** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md b/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md new file mode 100644 index 000000000..26eeeee99 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallEvent.md @@ -0,0 +1,12 @@ +# ApiV2010AccountCallCallEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Request** | [**map[string]interface{}**](.md) | | [optional] +**Response** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md b/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md new file mode 100644 index 000000000..a4520a620 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallFeedback.md @@ -0,0 +1,16 @@ +# ApiV2010AccountCallCallFeedback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Issues** | **[]string** | | [optional] +**QualityScore** | **int32** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md b/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md new file mode 100644 index 000000000..88332a56f --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallFeedbackSummary.md @@ -0,0 +1,24 @@ +# ApiV2010AccountCallCallFeedbackSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallCount** | **int32** | | [optional] +**CallFeedbackCount** | **int32** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**IncludeSubaccounts** | **bool** | | [optional] +**Issues** | **[]map[string]interface{}** | | [optional] +**QualityScoreAverage** | **float32** | | [optional] +**QualityScoreMedian** | **float32** | | [optional] +**QualityScoreStandardDeviation** | **float32** | | [optional] +**Sid** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**Status** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md b/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md new file mode 100644 index 000000000..05a01da37 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallNotification.md @@ -0,0 +1,24 @@ +# ApiV2010AccountCallCallNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ErrorCode** | **string** | | [optional] +**Log** | **string** | | [optional] +**MessageDate** | **string** | | [optional] +**MessageText** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md b/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md new file mode 100644 index 000000000..0371e06d3 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallNotificationInstance.md @@ -0,0 +1,27 @@ +# ApiV2010AccountCallCallNotificationInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ErrorCode** | **string** | | [optional] +**Log** | **string** | | [optional] +**MessageDate** | **string** | | [optional] +**MessageText** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**RequestVariables** | **string** | | [optional] +**ResponseBody** | **string** | | [optional] +**ResponseHeaders** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md b/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md new file mode 100644 index 000000000..810db8fe8 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallCallRecording.md @@ -0,0 +1,28 @@ +# ApiV2010AccountCallCallRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**Channels** | **int32** | | [optional] +**ConferenceSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Duration** | **string** | | [optional] +**EncryptionDetails** | [**map[string]interface{}**](.md) | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Source** | **string** | | [optional] +**StartTime** | **string** | | [optional] +**Status** | **string** | | [optional] +**Track** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountCallPayments.md b/rest/api/v2010/docs/ApiV2010AccountCallPayments.md new file mode 100644 index 000000000..56ffe0674 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountCallPayments.md @@ -0,0 +1,16 @@ +# ApiV2010AccountCallPayments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountConference.md b/rest/api/v2010/docs/ApiV2010AccountConference.md new file mode 100644 index 000000000..ee9b500c2 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountConference.md @@ -0,0 +1,22 @@ +# ApiV2010AccountConference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSidEndingConference** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ReasonConferenceEnded** | **string** | | [optional] +**Region** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md b/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md new file mode 100644 index 000000000..8f12288f0 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountConferenceConferenceRecording.md @@ -0,0 +1,27 @@ +# ApiV2010AccountConferenceConferenceRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**Channels** | **int32** | | [optional] +**ConferenceSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Duration** | **string** | | [optional] +**EncryptionDetails** | [**map[string]interface{}**](.md) | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Source** | **string** | | [optional] +**StartTime** | **string** | | [optional] +**Status** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md b/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md new file mode 100644 index 000000000..586ded048 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountConferenceParticipant.md @@ -0,0 +1,24 @@ +# ApiV2010AccountConferenceParticipant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**CallSidToCoach** | **string** | | [optional] +**Coaching** | **bool** | | [optional] +**ConferenceSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EndConferenceOnExit** | **bool** | | [optional] +**Hold** | **bool** | | [optional] +**Label** | **string** | | [optional] +**Muted** | **bool** | | [optional] +**StartConferenceOnEnter** | **bool** | | [optional] +**Status** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountConnectApp.md b/rest/api/v2010/docs/ApiV2010AccountConnectApp.md new file mode 100644 index 000000000..94dc00d1f --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountConnectApp.md @@ -0,0 +1,21 @@ +# ApiV2010AccountConnectApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AuthorizeRedirectUrl** | **string** | | [optional] +**CompanyName** | **string** | | [optional] +**DeauthorizeCallbackMethod** | **string** | | [optional] +**DeauthorizeCallbackUrl** | **string** | | [optional] +**Description** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**HomepageUrl** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md new file mode 100644 index 000000000..6a0705cd9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumber.md @@ -0,0 +1,43 @@ +# ApiV2010AccountIncomingPhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**BundleSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyAddressSid** | **string** | | [optional] +**EmergencyStatus** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IdentitySid** | **string** | | [optional] +**Origin** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceReceiveMode** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md new file mode 100644 index 000000000..219af304a --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn.md @@ -0,0 +1,21 @@ +# ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Description** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ResourceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**UniqueName** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md new file mode 100644 index 000000000..a741b31b6 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension.md @@ -0,0 +1,19 @@ +# ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssignedAddOnSid** | **string** | | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**ProductName** | **string** | | [optional] +**ResourceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md new file mode 100644 index 000000000..c26cb1526 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal.md @@ -0,0 +1,43 @@ +# ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**BundleSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyAddressSid** | **string** | | [optional] +**EmergencyStatus** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IdentitySid** | **string** | | [optional] +**Origin** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceReceiveMode** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md new file mode 100644 index 000000000..59bc63773 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile.md @@ -0,0 +1,43 @@ +# ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**BundleSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyAddressSid** | **string** | | [optional] +**EmergencyStatus** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IdentitySid** | **string** | | [optional] +**Origin** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceReceiveMode** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md new file mode 100644 index 000000000..1b67c97d7 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree.md @@ -0,0 +1,43 @@ +# ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**BundleSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**EmergencyAddressSid** | **string** | | [optional] +**EmergencyStatus** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IdentitySid** | **string** | | [optional] +**Origin** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceReceiveMode** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountKey.md b/rest/api/v2010/docs/ApiV2010AccountKey.md new file mode 100644 index 000000000..a2bd187d9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountKey.md @@ -0,0 +1,14 @@ +# ApiV2010AccountKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountMessage.md b/rest/api/v2010/docs/ApiV2010AccountMessage.md new file mode 100644 index 000000000..51866688d --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountMessage.md @@ -0,0 +1,30 @@ +# ApiV2010AccountMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Body** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateSent** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Direction** | **string** | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**ErrorMessage** | **string** | | [optional] +**From** | **string** | | [optional] +**MessagingServiceSid** | **string** | | [optional] +**NumMedia** | **string** | | [optional] +**NumSegments** | **string** | | [optional] +**Price** | **string** | | [optional] +**PriceUnit** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**To** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md b/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md new file mode 100644 index 000000000..a93a729ea --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountMessageMedia.md @@ -0,0 +1,17 @@ +# ApiV2010AccountMessageMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ContentType** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ParentSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md b/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md new file mode 100644 index 000000000..f1a4cddbc --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountMessageMessageFeedback.md @@ -0,0 +1,16 @@ +# ApiV2010AccountMessageMessageFeedback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**MessageSid** | **string** | | [optional] +**Outcome** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountNewKey.md b/rest/api/v2010/docs/ApiV2010AccountNewKey.md new file mode 100644 index 000000000..50f227c15 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountNewKey.md @@ -0,0 +1,15 @@ +# ApiV2010AccountNewKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Secret** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md b/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md new file mode 100644 index 000000000..ee8d57125 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountNewSigningKey.md @@ -0,0 +1,15 @@ +# ApiV2010AccountNewSigningKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Secret** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountNotification.md b/rest/api/v2010/docs/ApiV2010AccountNotification.md new file mode 100644 index 000000000..39f4e3fab --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountNotification.md @@ -0,0 +1,24 @@ +# ApiV2010AccountNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ErrorCode** | **string** | | [optional] +**Log** | **string** | | [optional] +**MessageDate** | **string** | | [optional] +**MessageText** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md b/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md new file mode 100644 index 000000000..5448310a7 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountNotificationInstance.md @@ -0,0 +1,27 @@ +# ApiV2010AccountNotificationInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ErrorCode** | **string** | | [optional] +**Log** | **string** | | [optional] +**MessageDate** | **string** | | [optional] +**MessageText** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**RequestVariables** | **string** | | [optional] +**ResponseBody** | **string** | | [optional] +**ResponseHeaders** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md b/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md new file mode 100644 index 000000000..272b890ce --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountOutgoingCallerId.md @@ -0,0 +1,17 @@ +# ApiV2010AccountOutgoingCallerId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountQueue.md b/rest/api/v2010/docs/ApiV2010AccountQueue.md new file mode 100644 index 000000000..737f6aa66 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountQueue.md @@ -0,0 +1,19 @@ +# ApiV2010AccountQueue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AverageWaitTime** | **int32** | | [optional] +**CurrentSize** | **int32** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**MaxSize** | **int32** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountQueueMember.md b/rest/api/v2010/docs/ApiV2010AccountQueueMember.md new file mode 100644 index 000000000..7ba0c62c9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountQueueMember.md @@ -0,0 +1,16 @@ +# ApiV2010AccountQueueMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallSid** | **string** | | [optional] +**DateEnqueued** | **string** | | [optional] +**Position** | **int32** | | [optional] +**QueueSid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**WaitTime** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountRecording.md b/rest/api/v2010/docs/ApiV2010AccountRecording.md new file mode 100644 index 000000000..98acffa86 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountRecording.md @@ -0,0 +1,28 @@ +# ApiV2010AccountRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**Channels** | **int32** | | [optional] +**ConferenceSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Duration** | **string** | | [optional] +**EncryptionDetails** | [**map[string]interface{}**](.md) | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**Price** | **string** | | [optional] +**PriceUnit** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Source** | **string** | | [optional] +**StartTime** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md new file mode 100644 index 000000000..795066a96 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResult.md @@ -0,0 +1,20 @@ +# ApiV2010AccountRecordingRecordingAddOnResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddOnConfigurationSid** | **string** | | [optional] +**AddOnSid** | **string** | | [optional] +**DateCompleted** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**ReferenceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md new file mode 100644 index 000000000..5e0c7002d --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload.md @@ -0,0 +1,21 @@ +# ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddOnConfigurationSid** | **string** | | [optional] +**AddOnResultSid** | **string** | | [optional] +**AddOnSid** | **string** | | [optional] +**ContentType** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Label** | **string** | | [optional] +**ReferenceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md new file mode 100644 index 000000000..80ad22beb --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountRecordingRecordingTranscription.md @@ -0,0 +1,23 @@ +# ApiV2010AccountRecordingRecordingTranscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Duration** | **string** | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**RecordingSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**TranscriptionText** | **string** | | [optional] +**Type** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountShortCode.md b/rest/api/v2010/docs/ApiV2010AccountShortCode.md new file mode 100644 index 000000000..f324a2594 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountShortCode.md @@ -0,0 +1,22 @@ +# ApiV2010AccountShortCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ShortCode** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSigningKey.md b/rest/api/v2010/docs/ApiV2010AccountSigningKey.md new file mode 100644 index 000000000..8345082bc --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSigningKey.md @@ -0,0 +1,14 @@ +# ApiV2010AccountSigningKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md b/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md new file mode 100644 index 000000000..685cfb7ae --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialList.md @@ -0,0 +1,17 @@ +# ApiV2010AccountSipSipCredentialList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md b/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md new file mode 100644 index 000000000..ad213a634 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipCredentialListSipCredential.md @@ -0,0 +1,17 @@ +# ApiV2010AccountSipSipCredentialListSipCredential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CredentialListSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] +**Username** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md new file mode 100644 index 000000000..d3b7cf8fa --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomain.md @@ -0,0 +1,31 @@ +# ApiV2010AccountSipSipDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AuthType** | **string** | | [optional] +**ByocTrunkSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**DomainName** | **string** | | [optional] +**EmergencyCallerSid** | **string** | | [optional] +**EmergencyCallingEnabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**Secure** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**SipRegistration** | **bool** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceStatusCallbackMethod** | **string** | | [optional] +**VoiceStatusCallbackUrl** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md new file mode 100644 index 000000000..5ccab7c02 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping.md @@ -0,0 +1,15 @@ +# ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md new file mode 100644 index 000000000..e6a14fe67 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping.md @@ -0,0 +1,15 @@ +# ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md new file mode 100644 index 000000000..7b10a4095 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping.md @@ -0,0 +1,15 @@ +# ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md new file mode 100644 index 000000000..e0ebf862f --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipCredentialListMapping.md @@ -0,0 +1,17 @@ +# ApiV2010AccountSipSipDomainSipCredentialListMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md new file mode 100644 index 000000000..f65fe9472 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipDomainSipIpAccessControlListMapping.md @@ -0,0 +1,17 @@ +# ApiV2010AccountSipSipDomainSipIpAccessControlListMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md b/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md new file mode 100644 index 000000000..35afce8fe --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlList.md @@ -0,0 +1,17 @@ +# ApiV2010AccountSipSipIpAccessControlList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md b/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md new file mode 100644 index 000000000..64a56b0a9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountSipSipIpAccessControlListSipIpAddress.md @@ -0,0 +1,19 @@ +# ApiV2010AccountSipSipIpAccessControlListSipIpAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CidrPrefixLength** | **int32** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IpAccessControlListSid** | **string** | | [optional] +**IpAddress** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountToken.md b/rest/api/v2010/docs/ApiV2010AccountToken.md new file mode 100644 index 000000000..d1e04ff70 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountToken.md @@ -0,0 +1,17 @@ +# ApiV2010AccountToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**IceServers** | **[]map[string]interface{}** | | [optional] +**Password** | **string** | | [optional] +**Ttl** | **string** | | [optional] +**Username** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountTranscription.md b/rest/api/v2010/docs/ApiV2010AccountTranscription.md new file mode 100644 index 000000000..497333a89 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountTranscription.md @@ -0,0 +1,23 @@ +# ApiV2010AccountTranscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**Duration** | **string** | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**RecordingSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**TranscriptionText** | **string** | | [optional] +**Type** | **string** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md new file mode 100644 index 000000000..2005fa431 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecord.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md new file mode 100644 index 000000000..37b7e3db3 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordAllTime.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordAllTime + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md new file mode 100644 index 000000000..7847289ec --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordDaily.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordDaily + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md new file mode 100644 index 000000000..58528939b --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordLastMonth.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordLastMonth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md new file mode 100644 index 000000000..d7ed37530 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordMonthly.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordMonthly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md new file mode 100644 index 000000000..9714e6caf --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordThisMonth.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordThisMonth + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md new file mode 100644 index 000000000..1aa5600a9 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordToday.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordToday + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md new file mode 100644 index 000000000..78f4d9e83 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYearly.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordYearly + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md new file mode 100644 index 000000000..66db46238 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageRecordUsageRecordYesterday.md @@ -0,0 +1,25 @@ +# ApiV2010AccountUsageUsageRecordUsageRecordYesterday + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**AsOf** | **string** | | [optional] +**Category** | **string** | | [optional] +**Count** | **string** | | [optional] +**CountUnit** | **string** | | [optional] +**Description** | **string** | | [optional] +**EndDate** | [**time.Time**](time.Time.md) | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**StartDate** | [**time.Time**](time.Time.md) | | [optional] +**SubresourceUris** | [**map[string]interface{}**](.md) | | [optional] +**Uri** | **string** | | [optional] +**Usage** | **string** | | [optional] +**UsageUnit** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md b/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md new file mode 100644 index 000000000..39250d45a --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountUsageUsageTrigger.md @@ -0,0 +1,26 @@ +# ApiV2010AccountUsageUsageTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**CallbackMethod** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**CurrentValue** | **string** | | [optional] +**DateCreated** | **string** | | [optional] +**DateFired** | **string** | | [optional] +**DateUpdated** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Recurring** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TriggerBy** | **string** | | [optional] +**TriggerValue** | **string** | | [optional] +**Uri** | **string** | | [optional] +**UsageCategory** | **string** | | [optional] +**UsageRecordUri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md b/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md new file mode 100644 index 000000000..15edc4a52 --- /dev/null +++ b/rest/api/v2010/docs/ApiV2010AccountValidationRequest.md @@ -0,0 +1,15 @@ +# ApiV2010AccountValidationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**ValidationCode** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateAccountRequest.md b/rest/api/v2010/docs/CreateAccountRequest.md new file mode 100644 index 000000000..6c7789c47 --- /dev/null +++ b/rest/api/v2010/docs/CreateAccountRequest.md @@ -0,0 +1,11 @@ +# CreateAccountRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateAddressRequest.md b/rest/api/v2010/docs/CreateAddressRequest.md new file mode 100644 index 000000000..964221245 --- /dev/null +++ b/rest/api/v2010/docs/CreateAddressRequest.md @@ -0,0 +1,19 @@ +# CreateAddressRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AutoCorrectAddress** | **bool** | Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. | [optional] +**City** | **string** | The city of the new address. | +**CustomerName** | **string** | The name to associate with the new address. | +**EmergencyEnabled** | **bool** | Whether to enable emergency calling on the new address. Can be: `true` or `false`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new address. It can be up to 64 characters long. | [optional] +**IsoCountry** | **string** | The ISO country code of the new address. | +**PostalCode** | **string** | The postal code of the new address. | +**Region** | **string** | The state or region of the new address. | +**Street** | **string** | The number and street address of the new address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateApplicationRequest.md b/rest/api/v2010/docs/CreateApplicationRequest.md new file mode 100644 index 000000000..7ec3cfa09 --- /dev/null +++ b/rest/api/v2010/docs/CreateApplicationRequest.md @@ -0,0 +1,25 @@ +# CreateApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiVersion** | **string** | The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new application. It can be up to 64 characters long. | [optional] +**MessageStatusCallback** | **string** | The URL we should call using a POST method to send message status information to your application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. | [optional] +**SmsStatusCallback** | **string** | The URL we should call using a POST method to send status information about SMS messages sent by the application. | [optional] +**SmsUrl** | **string** | The URL we should call when the phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | [optional] +**VoiceUrl** | **string** | The URL we should call when the phone number assigned to this application receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateCallFeedbackSummaryRequest.md b/rest/api/v2010/docs/CreateCallFeedbackSummaryRequest.md new file mode 100644 index 000000000..d6f76dd87 --- /dev/null +++ b/rest/api/v2010/docs/CreateCallFeedbackSummaryRequest.md @@ -0,0 +1,15 @@ +# CreateCallFeedbackSummaryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndDate** | [**time.Time**](time.Time.md) | Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. | +**IncludeSubaccounts** | **bool** | Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. | [optional] +**StartDate** | [**time.Time**](time.Time.md) | Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. | +**StatusCallback** | **string** | The URL that we will request when the feedback summary is complete. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateCallRecordingRequest.md b/rest/api/v2010/docs/CreateCallRecordingRequest.md new file mode 100644 index 000000000..853eaa862 --- /dev/null +++ b/rest/api/v2010/docs/CreateCallRecordingRequest.md @@ -0,0 +1,16 @@ +# CreateCallRecordingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecordingChannels** | **string** | The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. | [optional] +**RecordingStatusCallback** | **string** | The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). | [optional] +**RecordingStatusCallbackEvent** | **[]string** | The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. | [optional] +**RecordingStatusCallbackMethod** | **string** | The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**RecordingTrack** | **string** | The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. | [optional] +**Trim** | **string** | Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateCallRequest.md b/rest/api/v2010/docs/CreateCallRequest.md new file mode 100644 index 000000000..737dfe55e --- /dev/null +++ b/rest/api/v2010/docs/CreateCallRequest.md @@ -0,0 +1,43 @@ +# CreateCallRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApplicationSid** | **string** | The SID of the Application resource that will handle the call, if the call will be handled by an application. | [optional] +**AsyncAmd** | **string** | Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. | [optional] +**AsyncAmdStatusCallback** | **string** | The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. | [optional] +**AsyncAmdStatusCallbackMethod** | **string** | The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**Byoc** | **string** | The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) | [optional] +**CallReason** | **string** | The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) | [optional] +**CallerId** | **string** | The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. | [optional] +**FallbackMethod** | **string** | The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**FallbackUrl** | **string** | The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**From** | **string** | The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. | +**MachineDetection** | **string** | Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). | [optional] +**MachineDetectionSilenceTimeout** | **int32** | The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. | [optional] +**MachineDetectionSpeechEndThreshold** | **int32** | The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. | [optional] +**MachineDetectionSpeechThreshold** | **int32** | The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. | [optional] +**MachineDetectionTimeout** | **int32** | The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. | [optional] +**Method** | **string** | The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**Record** | **bool** | Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. | [optional] +**RecordingChannels** | **string** | The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. | [optional] +**RecordingStatusCallback** | **string** | The URL that we call when the recording is available to be accessed. | [optional] +**RecordingStatusCallbackEvent** | **[]string** | The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. | [optional] +**RecordingStatusCallbackMethod** | **string** | The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**RecordingTrack** | **string** | The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. | [optional] +**SendDigits** | **string** | A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. | [optional] +**SipAuthPassword** | **string** | The password required to authenticate the user account specified in `sip_auth_username`. | [optional] +**SipAuthUsername** | **string** | The username used to authenticate the caller making a SIP call. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). | [optional] +**StatusCallbackEvent** | **[]string** | The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**Timeout** | **int32** | The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. | [optional] +**To** | **string** | The phone number, SIP address, or client identifier to call. | +**Trim** | **string** | Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. | [optional] +**Twiml** | **string** | TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. | [optional] +**Url** | **string** | The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateIncomingPhoneNumberAssignedAddOnRequest.md b/rest/api/v2010/docs/CreateIncomingPhoneNumberAssignedAddOnRequest.md new file mode 100644 index 000000000..19a9327de --- /dev/null +++ b/rest/api/v2010/docs/CreateIncomingPhoneNumberAssignedAddOnRequest.md @@ -0,0 +1,11 @@ +# CreateIncomingPhoneNumberAssignedAddOnRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InstalledAddOnSid** | **string** | The SID that identifies the Add-on installation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateIncomingPhoneNumberLocalRequest.md b/rest/api/v2010/docs/CreateIncomingPhoneNumberLocalRequest.md new file mode 100644 index 000000000..c0233df73 --- /dev/null +++ b/rest/api/v2010/docs/CreateIncomingPhoneNumberLocalRequest.md @@ -0,0 +1,33 @@ +# CreateIncomingPhoneNumberLocalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | [optional] +**ApiVersion** | **string** | The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | [optional] +**BundleSid** | **string** | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | [optional] +**EmergencyAddressSid** | **string** | The SID of the emergency address configuration to use for emergency calling from the new phone number. | [optional] +**EmergencyStatus** | **string** | The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | [optional] +**IdentitySid** | **string** | The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | [optional] +**PhoneNumber** | **string** | The phone number to purchase specified 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. | +**SmsApplicationSid** | **string** | The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when the new phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**TrunkSid** | **string** | The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | [optional] +**VoiceApplicationSid** | **string** | The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceReceiveMode** | **string** | The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | [optional] +**VoiceUrl** | **string** | The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateIncomingPhoneNumberMobileRequest.md b/rest/api/v2010/docs/CreateIncomingPhoneNumberMobileRequest.md new file mode 100644 index 000000000..c12b33dde --- /dev/null +++ b/rest/api/v2010/docs/CreateIncomingPhoneNumberMobileRequest.md @@ -0,0 +1,33 @@ +# CreateIncomingPhoneNumberMobileRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | [optional] +**ApiVersion** | **string** | The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | [optional] +**BundleSid** | **string** | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | [optional] +**EmergencyAddressSid** | **string** | The SID of the emergency address configuration to use for emergency calling from the new phone number. | [optional] +**EmergencyStatus** | **string** | The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. | [optional] +**IdentitySid** | **string** | The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | [optional] +**PhoneNumber** | **string** | The phone number to purchase specified 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. | +**SmsApplicationSid** | **string** | The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when the new phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**TrunkSid** | **string** | The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | [optional] +**VoiceApplicationSid** | **string** | The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceReceiveMode** | **string** | The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | [optional] +**VoiceUrl** | **string** | The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateIncomingPhoneNumberRequest.md b/rest/api/v2010/docs/CreateIncomingPhoneNumberRequest.md new file mode 100644 index 000000000..c35367394 --- /dev/null +++ b/rest/api/v2010/docs/CreateIncomingPhoneNumberRequest.md @@ -0,0 +1,34 @@ +# CreateIncomingPhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | [optional] +**ApiVersion** | **string** | The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | [optional] +**AreaCode** | **string** | The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). | [optional] +**BundleSid** | **string** | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | [optional] +**EmergencyAddressSid** | **string** | The SID of the emergency address configuration to use for emergency calling from the new phone number. | [optional] +**EmergencyStatus** | **string** | The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. | [optional] +**IdentitySid** | **string** | The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | [optional] +**PhoneNumber** | **string** | The phone number to purchase specified 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. | [optional] +**SmsApplicationSid** | **string** | The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when the new phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**TrunkSid** | **string** | The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | [optional] +**VoiceApplicationSid** | **string** | The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceReceiveMode** | **string** | The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | [optional] +**VoiceUrl** | **string** | The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateIncomingPhoneNumberTollFreeRequest.md b/rest/api/v2010/docs/CreateIncomingPhoneNumberTollFreeRequest.md new file mode 100644 index 000000000..ceeb5905d --- /dev/null +++ b/rest/api/v2010/docs/CreateIncomingPhoneNumberTollFreeRequest.md @@ -0,0 +1,33 @@ +# CreateIncomingPhoneNumberTollFreeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | [optional] +**ApiVersion** | **string** | The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | [optional] +**BundleSid** | **string** | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | [optional] +**EmergencyAddressSid** | **string** | The SID of the emergency address configuration to use for emergency calling from the new phone number. | [optional] +**EmergencyStatus** | **string** | The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | [optional] +**IdentitySid** | **string** | The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. | [optional] +**PhoneNumber** | **string** | The phone number to purchase specified 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. | +**SmsApplicationSid** | **string** | The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when the new phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**TrunkSid** | **string** | The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | [optional] +**VoiceApplicationSid** | **string** | The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceReceiveMode** | **string** | The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | [optional] +**VoiceUrl** | **string** | The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateMessageFeedbackRequest.md b/rest/api/v2010/docs/CreateMessageFeedbackRequest.md new file mode 100644 index 000000000..70825ffaa --- /dev/null +++ b/rest/api/v2010/docs/CreateMessageFeedbackRequest.md @@ -0,0 +1,11 @@ +# CreateMessageFeedbackRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Outcome** | **string** | Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateMessageRequest.md b/rest/api/v2010/docs/CreateMessageRequest.md new file mode 100644 index 000000000..bb4772538 --- /dev/null +++ b/rest/api/v2010/docs/CreateMessageRequest.md @@ -0,0 +1,26 @@ +# CreateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressRetention** | **string** | Determines if the address can be stored or obfuscated based on privacy settings | [optional] +**ApplicationSid** | **string** | The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. | [optional] +**Attempt** | **int32** | Total number of attempts made ( including this ) to send out the message regardless of the provider used | [optional] +**Body** | **string** | The text of the message you want to send. Can be up to 1,600 characters in length. | [optional] +**ContentRetention** | **string** | Determines if the message content can be stored or redacted based on privacy settings | [optional] +**ForceDelivery** | **bool** | Reserved | [optional] +**From** | **string** | A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. | [optional] +**MaxPrice** | **float32** | The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. | [optional] +**MediaUrl** | **[]string** | The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. | [optional] +**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. | [optional] +**PersistentAction** | **[]string** | Rich actions for Channels Messages. | [optional] +**ProvideFeedback** | **bool** | Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. | [optional] +**SmartEncoded** | **bool** | Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. | [optional] +**To** | **string** | The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. | +**ValidityPeriod** | **int32** | How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateNewKeyRequest.md b/rest/api/v2010/docs/CreateNewKeyRequest.md new file mode 100644 index 000000000..9d5e97866 --- /dev/null +++ b/rest/api/v2010/docs/CreateNewKeyRequest.md @@ -0,0 +1,11 @@ +# CreateNewKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateNewSigningKeyRequest.md b/rest/api/v2010/docs/CreateNewSigningKeyRequest.md new file mode 100644 index 000000000..65dfebf62 --- /dev/null +++ b/rest/api/v2010/docs/CreateNewSigningKeyRequest.md @@ -0,0 +1,11 @@ +# CreateNewSigningKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateParticipantRequest.md b/rest/api/v2010/docs/CreateParticipantRequest.md new file mode 100644 index 000000000..7366171ac --- /dev/null +++ b/rest/api/v2010/docs/CreateParticipantRequest.md @@ -0,0 +1,48 @@ +# CreateParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Beep** | **string** | Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | [optional] +**Byoc** | **string** | The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) | [optional] +**CallReason** | **string** | The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) | [optional] +**CallSidToCoach** | **string** | The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. | [optional] +**CallerId** | **string** | The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. | [optional] +**Coaching** | **bool** | Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. | [optional] +**ConferenceRecord** | **string** | Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | [optional] +**ConferenceRecordingStatusCallback** | **string** | The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | [optional] +**ConferenceRecordingStatusCallbackEvent** | **[]string** | The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. | [optional] +**ConferenceRecordingStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceStatusCallback** | **string** | The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | [optional] +**ConferenceStatusCallbackEvent** | **[]string** | The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values with a space. Defaults to `start end`. | [optional] +**ConferenceStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceTrim** | **string** | Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | [optional] +**EarlyMedia** | **bool** | Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. | [optional] +**EndConferenceOnExit** | **bool** | Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. | [optional] +**From** | **string** | The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. | +**JitterBufferSize** | **string** | Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. | [optional] +**Label** | **string** | A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. | [optional] +**MaxParticipants** | **int32** | The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | [optional] +**Muted** | **bool** | Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. | [optional] +**Record** | **bool** | Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. | [optional] +**RecordingChannels** | **string** | The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | [optional] +**RecordingStatusCallback** | **string** | The URL that we should call using the `recording_status_callback_method` when the recording status changes. | [optional] +**RecordingStatusCallbackEvent** | **[]string** | The recording state changes that should generate a call to `recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. | [optional] +**RecordingStatusCallbackMethod** | **string** | The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**RecordingTrack** | **string** | The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. | [optional] +**Region** | **string** | The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | [optional] +**SipAuthPassword** | **string** | The SIP password for authentication. | [optional] +**SipAuthUsername** | **string** | The SIP username used for authentication. | [optional] +**StartConferenceOnEnter** | **bool** | Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackEvent** | **[]string** | The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. | [optional] +**Timeout** | **int32** | The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. | [optional] +**To** | **string** | The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. | +**WaitMethod** | **string** | The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | [optional] +**WaitUrl** | **string** | The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreatePaymentsRequest.md b/rest/api/v2010/docs/CreatePaymentsRequest.md new file mode 100644 index 000000000..1dd6e009f --- /dev/null +++ b/rest/api/v2010/docs/CreatePaymentsRequest.md @@ -0,0 +1,26 @@ +# CreatePaymentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BankAccountType** | **string** | Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. | [optional] +**ChargeAmount** | **float32** | A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. | [optional] +**Currency** | **string** | The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the <Pay> Connector are accepted. | [optional] +**Description** | **string** | The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. | [optional] +**IdempotencyKey** | **string** | A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. | +**Input** | **string** | A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. | [optional] +**MinPostalCodeLength** | **int32** | A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. | [optional] +**Parameter** | [**map[string]interface{}**](.md) | A single level JSON string that is required when accepting certain information specific only to ACH payments. The information that has to be included here depends on the <Pay> Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). | [optional] +**PaymentConnector** | **string** | This is the unique name corresponding to the Payment Gateway Connector installed in the Twilio Add-ons. Learn more about [<Pay> Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. | [optional] +**PaymentMethod** | **string** | Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. | [optional] +**PostalCode** | **bool** | Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. | [optional] +**SecurityCode** | **bool** | Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. | [optional] +**StatusCallback** | **string** | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) | +**Timeout** | **int32** | The number of seconds that <Pay> should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. | [optional] +**TokenType** | **string** | Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. | [optional] +**ValidCardTypes** | **string** | Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateQueueRequest.md b/rest/api/v2010/docs/CreateQueueRequest.md new file mode 100644 index 000000000..6b0a47065 --- /dev/null +++ b/rest/api/v2010/docs/CreateQueueRequest.md @@ -0,0 +1,12 @@ +# CreateQueueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you created to describe this resource. It can be up to 64 characters long. | +**MaxSize** | **int32** | The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipAuthCallsCredentialListMappingRequest.md b/rest/api/v2010/docs/CreateSipAuthCallsCredentialListMappingRequest.md new file mode 100644 index 000000000..7cb84f64c --- /dev/null +++ b/rest/api/v2010/docs/CreateSipAuthCallsCredentialListMappingRequest.md @@ -0,0 +1,11 @@ +# CreateSipAuthCallsCredentialListMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListSid** | **string** | The SID of the CredentialList resource to map to the SIP domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipAuthCallsIpAccessControlListMappingRequest.md b/rest/api/v2010/docs/CreateSipAuthCallsIpAccessControlListMappingRequest.md new file mode 100644 index 000000000..dfc94368c --- /dev/null +++ b/rest/api/v2010/docs/CreateSipAuthCallsIpAccessControlListMappingRequest.md @@ -0,0 +1,11 @@ +# CreateSipAuthCallsIpAccessControlListMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAccessControlListSid** | **string** | The SID of the IpAccessControlList resource to map to the SIP domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipAuthRegistrationsCredentialListMappingRequest.md b/rest/api/v2010/docs/CreateSipAuthRegistrationsCredentialListMappingRequest.md new file mode 100644 index 000000000..d1ab89db9 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipAuthRegistrationsCredentialListMappingRequest.md @@ -0,0 +1,11 @@ +# CreateSipAuthRegistrationsCredentialListMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListSid** | **string** | The SID of the CredentialList resource to map to the SIP domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipCredentialListMappingRequest.md b/rest/api/v2010/docs/CreateSipCredentialListMappingRequest.md new file mode 100644 index 000000000..7f6c5c229 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipCredentialListMappingRequest.md @@ -0,0 +1,11 @@ +# CreateSipCredentialListMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListSid** | **string** | A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipCredentialListRequest.md b/rest/api/v2010/docs/CreateSipCredentialListRequest.md new file mode 100644 index 000000000..46d5d85a3 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipCredentialListRequest.md @@ -0,0 +1,11 @@ +# CreateSipCredentialListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A human readable descriptive text that describes the CredentialList, up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipCredentialRequest.md b/rest/api/v2010/docs/CreateSipCredentialRequest.md new file mode 100644 index 000000000..f8f6d9688 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipCredentialRequest.md @@ -0,0 +1,12 @@ +# CreateSipCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | **string** | The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) | +**Username** | **string** | The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipDomainRequest.md b/rest/api/v2010/docs/CreateSipDomainRequest.md new file mode 100644 index 000000000..94c03c88e --- /dev/null +++ b/rest/api/v2010/docs/CreateSipDomainRequest.md @@ -0,0 +1,23 @@ +# CreateSipDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ByocTrunkSid** | **string** | The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. | [optional] +**DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \"-\" and must end with `sip.twilio.com`. | +**EmergencyCallerSid** | **string** | Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. | [optional] +**EmergencyCallingEnabled** | **bool** | Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the resource. It can be up to 64 characters long. | [optional] +**Secure** | **bool** | Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. | [optional] +**SipRegistration** | **bool** | Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | [optional] +**VoiceStatusCallbackMethod** | **string** | The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceStatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. | [optional] +**VoiceUrl** | **string** | The URL we should when the domain receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipIpAccessControlListMappingRequest.md b/rest/api/v2010/docs/CreateSipIpAccessControlListMappingRequest.md new file mode 100644 index 000000000..c5b1bf32a --- /dev/null +++ b/rest/api/v2010/docs/CreateSipIpAccessControlListMappingRequest.md @@ -0,0 +1,11 @@ +# CreateSipIpAccessControlListMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAccessControlListSid** | **string** | The unique id of the IP access control list to map to the SIP domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipIpAccessControlListRequest.md b/rest/api/v2010/docs/CreateSipIpAccessControlListRequest.md new file mode 100644 index 000000000..90f318df1 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipIpAccessControlListRequest.md @@ -0,0 +1,11 @@ +# CreateSipIpAccessControlListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateSipIpAddressRequest.md b/rest/api/v2010/docs/CreateSipIpAddressRequest.md new file mode 100644 index 000000000..e8de7eb95 --- /dev/null +++ b/rest/api/v2010/docs/CreateSipIpAddressRequest.md @@ -0,0 +1,13 @@ +# CreateSipIpAddressRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CidrPrefixLength** | **int32** | An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. | [optional] +**FriendlyName** | **string** | A human readable descriptive text for this resource, up to 64 characters long. | +**IpAddress** | **string** | An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateTokenRequest.md b/rest/api/v2010/docs/CreateTokenRequest.md new file mode 100644 index 000000000..a66b033f5 --- /dev/null +++ b/rest/api/v2010/docs/CreateTokenRequest.md @@ -0,0 +1,11 @@ +# CreateTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ttl** | **int32** | The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateUsageTriggerRequest.md b/rest/api/v2010/docs/CreateUsageTriggerRequest.md new file mode 100644 index 000000000..8381557e3 --- /dev/null +++ b/rest/api/v2010/docs/CreateUsageTriggerRequest.md @@ -0,0 +1,17 @@ +# CreateUsageTriggerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**CallbackUrl** | **string** | The URL we should call using `callback_method` when the trigger fires. | +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**Recurring** | **string** | The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. | [optional] +**TriggerBy** | **string** | The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. | [optional] +**TriggerValue** | **string** | The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. | +**UsageCategory** | **string** | The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/CreateValidationRequestRequest.md b/rest/api/v2010/docs/CreateValidationRequestRequest.md new file mode 100644 index 000000000..7b7144fa6 --- /dev/null +++ b/rest/api/v2010/docs/CreateValidationRequestRequest.md @@ -0,0 +1,16 @@ +# CreateValidationRequestRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallDelay** | **int32** | The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. | [optional] +**Extension** | **string** | The digits to dial after connecting the verification call. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. | [optional] +**PhoneNumber** | **string** | The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. | +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information about the verification process to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/DefaultApi.md b/rest/api/v2010/docs/DefaultApi.md new file mode 100644 index 000000000..15e93106e --- /dev/null +++ b/rest/api/v2010/docs/DefaultApi.md @@ -0,0 +1,8753 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAccount**](DefaultApi.md#CreateAccount) | **Post** /2010-04-01/Accounts.json | +[**CreateAddress**](DefaultApi.md#CreateAddress) | **Post** /2010-04-01/Accounts/{AccountSid}/Addresses.json | +[**CreateApplication**](DefaultApi.md#CreateApplication) | **Post** /2010-04-01/Accounts/{AccountSid}/Applications.json | +[**CreateCall**](DefaultApi.md#CreateCall) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls.json | +[**CreateCallFeedbackSummary**](DefaultApi.md#CreateCallFeedbackSummary) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary.json | +[**CreateCallRecording**](DefaultApi.md#CreateCallRecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json | +[**CreateIncomingPhoneNumber**](DefaultApi.md#CreateIncomingPhoneNumber) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json | +[**CreateIncomingPhoneNumberAssignedAddOn**](DefaultApi.md#CreateIncomingPhoneNumberAssignedAddOn) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json | +[**CreateIncomingPhoneNumberLocal**](DefaultApi.md#CreateIncomingPhoneNumberLocal) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json | +[**CreateIncomingPhoneNumberMobile**](DefaultApi.md#CreateIncomingPhoneNumberMobile) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json | +[**CreateIncomingPhoneNumberTollFree**](DefaultApi.md#CreateIncomingPhoneNumberTollFree) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json | +[**CreateMessage**](DefaultApi.md#CreateMessage) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages.json | +[**CreateMessageFeedback**](DefaultApi.md#CreateMessageFeedback) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json | +[**CreateNewKey**](DefaultApi.md#CreateNewKey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys.json | +[**CreateNewSigningKey**](DefaultApi.md#CreateNewSigningKey) | **Post** /2010-04-01/Accounts/{AccountSid}/SigningKeys.json | +[**CreateParticipant**](DefaultApi.md#CreateParticipant) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json | +[**CreatePayments**](DefaultApi.md#CreatePayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json | +[**CreateQueue**](DefaultApi.md#CreateQueue) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues.json | +[**CreateSipAuthCallsCredentialListMapping**](DefaultApi.md#CreateSipAuthCallsCredentialListMapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json | +[**CreateSipAuthCallsIpAccessControlListMapping**](DefaultApi.md#CreateSipAuthCallsIpAccessControlListMapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json | +[**CreateSipAuthRegistrationsCredentialListMapping**](DefaultApi.md#CreateSipAuthRegistrationsCredentialListMapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json | +[**CreateSipCredential**](DefaultApi.md#CreateSipCredential) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json | +[**CreateSipCredentialList**](DefaultApi.md#CreateSipCredentialList) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json | +[**CreateSipCredentialListMapping**](DefaultApi.md#CreateSipCredentialListMapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json | +[**CreateSipDomain**](DefaultApi.md#CreateSipDomain) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains.json | +[**CreateSipIpAccessControlList**](DefaultApi.md#CreateSipIpAccessControlList) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json | +[**CreateSipIpAccessControlListMapping**](DefaultApi.md#CreateSipIpAccessControlListMapping) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json | +[**CreateSipIpAddress**](DefaultApi.md#CreateSipIpAddress) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json | +[**CreateToken**](DefaultApi.md#CreateToken) | **Post** /2010-04-01/Accounts/{AccountSid}/Tokens.json | +[**CreateUsageTrigger**](DefaultApi.md#CreateUsageTrigger) | **Post** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json | +[**CreateValidationRequest**](DefaultApi.md#CreateValidationRequest) | **Post** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json | +[**DeleteAddress**](DefaultApi.md#DeleteAddress) | **Delete** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +[**DeleteApplication**](DefaultApi.md#DeleteApplication) | **Delete** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +[**DeleteCall**](DefaultApi.md#DeleteCall) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +[**DeleteCallFeedbackSummary**](DefaultApi.md#DeleteCallFeedbackSummary) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json | +[**DeleteCallRecording**](DefaultApi.md#DeleteCallRecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +[**DeleteConferenceRecording**](DefaultApi.md#DeleteConferenceRecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +[**DeleteConnectApp**](DefaultApi.md#DeleteConnectApp) | **Delete** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +[**DeleteIncomingPhoneNumber**](DefaultApi.md#DeleteIncomingPhoneNumber) | **Delete** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +[**DeleteIncomingPhoneNumberAssignedAddOn**](DefaultApi.md#DeleteIncomingPhoneNumberAssignedAddOn) | **Delete** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json | +[**DeleteKey**](DefaultApi.md#DeleteKey) | **Delete** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +[**DeleteMedia**](DefaultApi.md#DeleteMedia) | **Delete** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json | +[**DeleteMessage**](DefaultApi.md#DeleteMessage) | **Delete** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +[**DeleteOutgoingCallerId**](DefaultApi.md#DeleteOutgoingCallerId) | **Delete** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +[**DeleteParticipant**](DefaultApi.md#DeleteParticipant) | **Delete** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +[**DeleteQueue**](DefaultApi.md#DeleteQueue) | **Delete** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +[**DeleteRecording**](DefaultApi.md#DeleteRecording) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json | +[**DeleteRecordingAddOnResult**](DefaultApi.md#DeleteRecordingAddOnResult) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json | +[**DeleteRecordingAddOnResultPayload**](DefaultApi.md#DeleteRecordingAddOnResultPayload) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json | +[**DeleteRecordingTranscription**](DefaultApi.md#DeleteRecordingTranscription) | **Delete** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json | +[**DeleteSigningKey**](DefaultApi.md#DeleteSigningKey) | **Delete** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +[**DeleteSipAuthCallsCredentialListMapping**](DefaultApi.md#DeleteSipAuthCallsCredentialListMapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json | +[**DeleteSipAuthCallsIpAccessControlListMapping**](DefaultApi.md#DeleteSipAuthCallsIpAccessControlListMapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json | +[**DeleteSipAuthRegistrationsCredentialListMapping**](DefaultApi.md#DeleteSipAuthRegistrationsCredentialListMapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json | +[**DeleteSipCredential**](DefaultApi.md#DeleteSipCredential) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +[**DeleteSipCredentialList**](DefaultApi.md#DeleteSipCredentialList) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +[**DeleteSipCredentialListMapping**](DefaultApi.md#DeleteSipCredentialListMapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json | +[**DeleteSipDomain**](DefaultApi.md#DeleteSipDomain) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +[**DeleteSipIpAccessControlList**](DefaultApi.md#DeleteSipIpAccessControlList) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +[**DeleteSipIpAccessControlListMapping**](DefaultApi.md#DeleteSipIpAccessControlListMapping) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json | +[**DeleteSipIpAddress**](DefaultApi.md#DeleteSipIpAddress) | **Delete** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +[**DeleteTranscription**](DefaultApi.md#DeleteTranscription) | **Delete** /2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json | +[**DeleteUsageTrigger**](DefaultApi.md#DeleteUsageTrigger) | **Delete** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | +[**FetchAccount**](DefaultApi.md#FetchAccount) | **Get** /2010-04-01/Accounts/{Sid}.json | +[**FetchAddress**](DefaultApi.md#FetchAddress) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +[**FetchApplication**](DefaultApi.md#FetchApplication) | **Get** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +[**FetchAuthorizedConnectApp**](DefaultApi.md#FetchAuthorizedConnectApp) | **Get** /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps/{ConnectAppSid}.json | +[**FetchAvailablePhoneNumberCountry**](DefaultApi.md#FetchAvailablePhoneNumberCountry) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json | +[**FetchBalance**](DefaultApi.md#FetchBalance) | **Get** /2010-04-01/Accounts/{AccountSid}/Balance.json | +[**FetchCall**](DefaultApi.md#FetchCall) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +[**FetchCallFeedback**](DefaultApi.md#FetchCallFeedback) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json | +[**FetchCallFeedbackSummary**](DefaultApi.md#FetchCallFeedbackSummary) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/FeedbackSummary/{Sid}.json | +[**FetchCallNotification**](DefaultApi.md#FetchCallNotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json | +[**FetchCallRecording**](DefaultApi.md#FetchCallRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +[**FetchConference**](DefaultApi.md#FetchConference) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json | +[**FetchConferenceRecording**](DefaultApi.md#FetchConferenceRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +[**FetchConnectApp**](DefaultApi.md#FetchConnectApp) | **Get** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +[**FetchIncomingPhoneNumber**](DefaultApi.md#FetchIncomingPhoneNumber) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +[**FetchIncomingPhoneNumberAssignedAddOn**](DefaultApi.md#FetchIncomingPhoneNumberAssignedAddOn) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{Sid}.json | +[**FetchIncomingPhoneNumberAssignedAddOnExtension**](DefaultApi.md#FetchIncomingPhoneNumberAssignedAddOnExtension) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions/{Sid}.json | +[**FetchKey**](DefaultApi.md#FetchKey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +[**FetchMedia**](DefaultApi.md#FetchMedia) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json | +[**FetchMember**](DefaultApi.md#FetchMember) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json | +[**FetchMessage**](DefaultApi.md#FetchMessage) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +[**FetchNotification**](DefaultApi.md#FetchNotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Notifications/{Sid}.json | +[**FetchOutgoingCallerId**](DefaultApi.md#FetchOutgoingCallerId) | **Get** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +[**FetchParticipant**](DefaultApi.md#FetchParticipant) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +[**FetchQueue**](DefaultApi.md#FetchQueue) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +[**FetchRecording**](DefaultApi.md#FetchRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{Sid}.json | +[**FetchRecordingAddOnResult**](DefaultApi.md#FetchRecordingAddOnResult) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{Sid}.json | +[**FetchRecordingAddOnResultPayload**](DefaultApi.md#FetchRecordingAddOnResultPayload) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads/{Sid}.json | +[**FetchRecordingTranscription**](DefaultApi.md#FetchRecordingTranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json | +[**FetchShortCode**](DefaultApi.md#FetchShortCode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | +[**FetchSigningKey**](DefaultApi.md#FetchSigningKey) | **Get** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +[**FetchSipAuthCallsCredentialListMapping**](DefaultApi.md#FetchSipAuthCallsCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings/{Sid}.json | +[**FetchSipAuthCallsIpAccessControlListMapping**](DefaultApi.md#FetchSipAuthCallsIpAccessControlListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings/{Sid}.json | +[**FetchSipAuthRegistrationsCredentialListMapping**](DefaultApi.md#FetchSipAuthRegistrationsCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings/{Sid}.json | +[**FetchSipCredential**](DefaultApi.md#FetchSipCredential) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +[**FetchSipCredentialList**](DefaultApi.md#FetchSipCredentialList) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +[**FetchSipCredentialListMapping**](DefaultApi.md#FetchSipCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings/{Sid}.json | +[**FetchSipDomain**](DefaultApi.md#FetchSipDomain) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +[**FetchSipIpAccessControlList**](DefaultApi.md#FetchSipIpAccessControlList) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +[**FetchSipIpAccessControlListMapping**](DefaultApi.md#FetchSipIpAccessControlListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings/{Sid}.json | +[**FetchSipIpAddress**](DefaultApi.md#FetchSipIpAddress) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +[**FetchTranscription**](DefaultApi.md#FetchTranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json | +[**FetchUsageTrigger**](DefaultApi.md#FetchUsageTrigger) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | +[**ListAccount**](DefaultApi.md#ListAccount) | **Get** /2010-04-01/Accounts.json | +[**ListAddress**](DefaultApi.md#ListAddress) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses.json | +[**ListApplication**](DefaultApi.md#ListApplication) | **Get** /2010-04-01/Accounts/{AccountSid}/Applications.json | +[**ListAuthorizedConnectApp**](DefaultApi.md#ListAuthorizedConnectApp) | **Get** /2010-04-01/Accounts/{AccountSid}/AuthorizedConnectApps.json | +[**ListAvailablePhoneNumberCountry**](DefaultApi.md#ListAvailablePhoneNumberCountry) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json | +[**ListAvailablePhoneNumberLocal**](DefaultApi.md#ListAvailablePhoneNumberLocal) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Local.json | +[**ListAvailablePhoneNumberMachineToMachine**](DefaultApi.md#ListAvailablePhoneNumberMachineToMachine) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json | +[**ListAvailablePhoneNumberMobile**](DefaultApi.md#ListAvailablePhoneNumberMobile) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json | +[**ListAvailablePhoneNumberNational**](DefaultApi.md#ListAvailablePhoneNumberNational) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.json | +[**ListAvailablePhoneNumberSharedCost**](DefaultApi.md#ListAvailablePhoneNumberSharedCost) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json | +[**ListAvailablePhoneNumberTollFree**](DefaultApi.md#ListAvailablePhoneNumberTollFree) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json | +[**ListAvailablePhoneNumberVoip**](DefaultApi.md#ListAvailablePhoneNumberVoip) | **Get** /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Voip.json | +[**ListCall**](DefaultApi.md#ListCall) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls.json | +[**ListCallEvent**](DefaultApi.md#ListCallEvent) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json | +[**ListCallNotification**](DefaultApi.md#ListCallNotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications.json | +[**ListCallRecording**](DefaultApi.md#ListCallRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings.json | +[**ListConference**](DefaultApi.md#ListConference) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences.json | +[**ListConferenceRecording**](DefaultApi.md#ListConferenceRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings.json | +[**ListConnectApp**](DefaultApi.md#ListConnectApp) | **Get** /2010-04-01/Accounts/{AccountSid}/ConnectApps.json | +[**ListDependentPhoneNumber**](DefaultApi.md#ListDependentPhoneNumber) | **Get** /2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}/DependentPhoneNumbers.json | +[**ListIncomingPhoneNumber**](DefaultApi.md#ListIncomingPhoneNumber) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers.json | +[**ListIncomingPhoneNumberAssignedAddOn**](DefaultApi.md#ListIncomingPhoneNumberAssignedAddOn) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns.json | +[**ListIncomingPhoneNumberAssignedAddOnExtension**](DefaultApi.md#ListIncomingPhoneNumberAssignedAddOnExtension) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{ResourceSid}/AssignedAddOns/{AssignedAddOnSid}/Extensions.json | +[**ListIncomingPhoneNumberLocal**](DefaultApi.md#ListIncomingPhoneNumberLocal) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json | +[**ListIncomingPhoneNumberMobile**](DefaultApi.md#ListIncomingPhoneNumberMobile) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json | +[**ListIncomingPhoneNumberTollFree**](DefaultApi.md#ListIncomingPhoneNumberTollFree) | **Get** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json | +[**ListKey**](DefaultApi.md#ListKey) | **Get** /2010-04-01/Accounts/{AccountSid}/Keys.json | +[**ListMedia**](DefaultApi.md#ListMedia) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media.json | +[**ListMember**](DefaultApi.md#ListMember) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members.json | +[**ListMessage**](DefaultApi.md#ListMessage) | **Get** /2010-04-01/Accounts/{AccountSid}/Messages.json | +[**ListNotification**](DefaultApi.md#ListNotification) | **Get** /2010-04-01/Accounts/{AccountSid}/Notifications.json | +[**ListOutgoingCallerId**](DefaultApi.md#ListOutgoingCallerId) | **Get** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json | +[**ListParticipant**](DefaultApi.md#ListParticipant) | **Get** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json | +[**ListQueue**](DefaultApi.md#ListQueue) | **Get** /2010-04-01/Accounts/{AccountSid}/Queues.json | +[**ListRecording**](DefaultApi.md#ListRecording) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings.json | +[**ListRecordingAddOnResult**](DefaultApi.md#ListRecordingAddOnResult) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults.json | +[**ListRecordingAddOnResultPayload**](DefaultApi.md#ListRecordingAddOnResultPayload) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{ReferenceSid}/AddOnResults/{AddOnResultSid}/Payloads.json | +[**ListRecordingTranscription**](DefaultApi.md#ListRecordingTranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions.json | +[**ListShortCode**](DefaultApi.md#ListShortCode) | **Get** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json | +[**ListSigningKey**](DefaultApi.md#ListSigningKey) | **Get** /2010-04-01/Accounts/{AccountSid}/SigningKeys.json | +[**ListSipAuthCallsCredentialListMapping**](DefaultApi.md#ListSipAuthCallsCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/CredentialListMappings.json | +[**ListSipAuthCallsIpAccessControlListMapping**](DefaultApi.md#ListSipAuthCallsIpAccessControlListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Calls/IpAccessControlListMappings.json | +[**ListSipAuthRegistrationsCredentialListMapping**](DefaultApi.md#ListSipAuthRegistrationsCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/Auth/Registrations/CredentialListMappings.json | +[**ListSipCredential**](DefaultApi.md#ListSipCredential) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json | +[**ListSipCredentialList**](DefaultApi.md#ListSipCredentialList) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists.json | +[**ListSipCredentialListMapping**](DefaultApi.md#ListSipCredentialListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/CredentialListMappings.json | +[**ListSipDomain**](DefaultApi.md#ListSipDomain) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains.json | +[**ListSipIpAccessControlList**](DefaultApi.md#ListSipIpAccessControlList) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists.json | +[**ListSipIpAccessControlListMapping**](DefaultApi.md#ListSipIpAccessControlListMapping) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{DomainSid}/IpAccessControlListMappings.json | +[**ListSipIpAddress**](DefaultApi.md#ListSipIpAddress) | **Get** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses.json | +[**ListTranscription**](DefaultApi.md#ListTranscription) | **Get** /2010-04-01/Accounts/{AccountSid}/Transcriptions.json | +[**ListUsageRecord**](DefaultApi.md#ListUsageRecord) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records.json | +[**ListUsageRecordAllTime**](DefaultApi.md#ListUsageRecordAllTime) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/AllTime.json | +[**ListUsageRecordDaily**](DefaultApi.md#ListUsageRecordDaily) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Daily.json | +[**ListUsageRecordLastMonth**](DefaultApi.md#ListUsageRecordLastMonth) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/LastMonth.json | +[**ListUsageRecordMonthly**](DefaultApi.md#ListUsageRecordMonthly) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Monthly.json | +[**ListUsageRecordThisMonth**](DefaultApi.md#ListUsageRecordThisMonth) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/ThisMonth.json | +[**ListUsageRecordToday**](DefaultApi.md#ListUsageRecordToday) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Today.json | +[**ListUsageRecordYearly**](DefaultApi.md#ListUsageRecordYearly) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yearly.json | +[**ListUsageRecordYesterday**](DefaultApi.md#ListUsageRecordYesterday) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Records/Yesterday.json | +[**ListUsageTrigger**](DefaultApi.md#ListUsageTrigger) | **Get** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json | +[**UpdateAccount**](DefaultApi.md#UpdateAccount) | **Post** /2010-04-01/Accounts/{Sid}.json | +[**UpdateAddress**](DefaultApi.md#UpdateAddress) | **Post** /2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json | +[**UpdateApplication**](DefaultApi.md#UpdateApplication) | **Post** /2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json | +[**UpdateCall**](DefaultApi.md#UpdateCall) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json | +[**UpdateCallFeedback**](DefaultApi.md#UpdateCallFeedback) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Feedback.json | +[**UpdateCallRecording**](DefaultApi.md#UpdateCallRecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Recordings/{Sid}.json | +[**UpdateConference**](DefaultApi.md#UpdateConference) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json | +[**UpdateConferenceRecording**](DefaultApi.md#UpdateConferenceRecording) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Recordings/{Sid}.json | +[**UpdateConnectApp**](DefaultApi.md#UpdateConnectApp) | **Post** /2010-04-01/Accounts/{AccountSid}/ConnectApps/{Sid}.json | +[**UpdateIncomingPhoneNumber**](DefaultApi.md#UpdateIncomingPhoneNumber) | **Post** /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{Sid}.json | +[**UpdateKey**](DefaultApi.md#UpdateKey) | **Post** /2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json | +[**UpdateMember**](DefaultApi.md#UpdateMember) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues/{QueueSid}/Members/{CallSid}.json | +[**UpdateMessage**](DefaultApi.md#UpdateMessage) | **Post** /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json | +[**UpdateOutgoingCallerId**](DefaultApi.md#UpdateOutgoingCallerId) | **Post** /2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds/{Sid}.json | +[**UpdateParticipant**](DefaultApi.md#UpdateParticipant) | **Post** /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants/{CallSid}.json | +[**UpdatePayments**](DefaultApi.md#UpdatePayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json | +[**UpdateQueue**](DefaultApi.md#UpdateQueue) | **Post** /2010-04-01/Accounts/{AccountSid}/Queues/{Sid}.json | +[**UpdateShortCode**](DefaultApi.md#UpdateShortCode) | **Post** /2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json | +[**UpdateSigningKey**](DefaultApi.md#UpdateSigningKey) | **Post** /2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json | +[**UpdateSipCredential**](DefaultApi.md#UpdateSipCredential) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json | +[**UpdateSipCredentialList**](DefaultApi.md#UpdateSipCredentialList) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{Sid}.json | +[**UpdateSipDomain**](DefaultApi.md#UpdateSipDomain) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json | +[**UpdateSipIpAccessControlList**](DefaultApi.md#UpdateSipIpAccessControlList) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{Sid}.json | +[**UpdateSipIpAddress**](DefaultApi.md#UpdateSipIpAddress) | **Post** /2010-04-01/Accounts/{AccountSid}/SIP/IpAccessControlLists/{IpAccessControlListSid}/IpAddresses/{Sid}.json | +[**UpdateUsageTrigger**](DefaultApi.md#UpdateUsageTrigger) | **Post** /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json | + + + +## CreateAccount + +> ApiV2010Account CreateAccount(ctx, optional) + + + +Create a new Twilio Subaccount from the account making the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateAccountOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAccountOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` | + +### Return type + +[**ApiV2010Account**](api.v2010.account.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAddress + +> ApiV2010AccountAddress CreateAddress(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource. | + **optional** | ***CreateAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AutoCorrectAddress** | **optional.Bool**| Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. | + **City** | **optional.String**| The city of the new address. | + **CustomerName** | **optional.String**| The name to associate with the new address. | + **EmergencyEnabled** | **optional.Bool**| Whether to enable emergency calling on the new address. Can be: `true` or `false`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new address. It can be up to 64 characters long. | + **IsoCountry** | **optional.String**| The ISO country code of the new address. | + **PostalCode** | **optional.String**| The postal code of the new address. | + **Region** | **optional.String**| The state or region of the new address. | + **Street** | **optional.String**| The number and street address of the new address. | + +### Return type + +[**ApiV2010AccountAddress**](api.v2010.account.address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateApplication + +> ApiV2010AccountApplication CreateApplication(ctx, AccountSid, optional) + + + +Create a new application within your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateApplicationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateApplicationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiVersion** | **optional.String**| The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new application. It can be up to 64 characters long. | + **MessageStatusCallback** | **optional.String**| The URL we should call using a POST method to send message status information to your application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. | + **SmsStatusCallback** | **optional.String**| The URL we should call using a POST method to send status information about SMS messages sent by the application. | + **SmsUrl** | **optional.String**| The URL we should call when the phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | + **VoiceUrl** | **optional.String**| The URL we should call when the phone number assigned to this application receives a call. | + +### Return type + +[**ApiV2010AccountApplication**](api.v2010.account.application.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCall + +> ApiV2010AccountCall CreateCall(ctx, AccountSid, optional) + + + +Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateCallOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCallOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApplicationSid** | **optional.String**| The SID of the Application resource that will handle the call, if the call will be handled by an application. | + **AsyncAmd** | **optional.String**| Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. | + **AsyncAmdStatusCallback** | **optional.String**| The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. | + **AsyncAmdStatusCallbackMethod** | **optional.String**| The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. | + **Byoc** | **optional.String**| The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) | + **CallReason** | **optional.String**| The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) | + **CallerId** | **optional.String**| The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. | + **FallbackMethod** | **optional.String**| The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **FallbackUrl** | **optional.String**| The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. | + **From** | **optional.String**| The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. | + **MachineDetection** | **optional.String**| Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). | + **MachineDetectionSilenceTimeout** | **optional.Int32**| The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. | + **MachineDetectionSpeechEndThreshold** | **optional.Int32**| The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. | + **MachineDetectionSpeechThreshold** | **optional.Int32**| The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. | + **MachineDetectionTimeout** | **optional.Int32**| The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. | + **Method** | **optional.String**| The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **Record** | **optional.Bool**| Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. | + **RecordingChannels** | **optional.String**| The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. | + **RecordingStatusCallback** | **optional.String**| The URL that we call when the recording is available to be accessed. | + **RecordingStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. | + **RecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. | + **RecordingTrack** | **optional.String**| The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. | + **SendDigits** | **optional.String**| A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. | + **SipAuthPassword** | **optional.String**| The password required to authenticate the user account specified in `sip_auth_username`. | + **SipAuthUsername** | **optional.String**| The username used to authenticate the caller making a SIP call. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). | + **StatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **Timeout** | **optional.Int32**| The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. | + **To** | **optional.String**| The phone number, SIP address, or client identifier to call. | + **Trim** | **optional.String**| Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. | + **Twiml** | **optional.String**| TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. | + **Url** | **optional.String**| The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). | + +### Return type + +[**ApiV2010AccountCall**](api.v2010.account.call.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCallFeedbackSummary + +> ApiV2010AccountCallCallFeedbackSummary CreateCallFeedbackSummary(ctx, AccountSid, optional) + + + +Create a FeedbackSummary resource for a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | + **optional** | ***CreateCallFeedbackSummaryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCallFeedbackSummaryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EndDate** | **optional.Time**| Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. | + **IncludeSubaccounts** | **optional.Bool**| Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. | + **StartDate** | **optional.Time**| Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. | + **StatusCallback** | **optional.String**| The URL that we will request when the feedback summary is complete. | + **StatusCallbackMethod** | **optional.String**| The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. | + +### Return type + +[**ApiV2010AccountCallCallFeedbackSummary**](api.v2010.account.call.call_feedback_summary.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCallRecording + +> ApiV2010AccountCallCallRecording CreateCallRecording(ctx, AccountSid, CallSid, optional) + + + +Create a recording for the call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**CallSid** | **string**| The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with. | + **optional** | ***CreateCallRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCallRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **RecordingChannels** | **optional.String**| The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. | + **RecordingStatusCallback** | **optional.String**| The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). | + **RecordingStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. | + **RecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. | + **RecordingTrack** | **optional.String**| The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. | + **Trim** | **optional.String**| Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. | + +### Return type + +[**ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIncomingPhoneNumber + +> ApiV2010AccountIncomingPhoneNumber CreateIncomingPhoneNumber(ctx, AccountSid, optional) + + + +Purchase a phone-number for the account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateIncomingPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIncomingPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressSid** | **optional.String**| The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | + **ApiVersion** | **optional.String**| The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | + **AreaCode** | **optional.String**| The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). | + **BundleSid** | **optional.String**| The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | + **EmergencyAddressSid** | **optional.String**| The SID of the emergency address configuration to use for emergency calling from the new phone number. | + **EmergencyStatus** | **optional.String**| The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. | + **IdentitySid** | **optional.String**| The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | + **PhoneNumber** | **optional.String**| The phone number to purchase specified 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. | + **SmsApplicationSid** | **optional.String**| The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when the new phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **TrunkSid** | **optional.String**| The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | + **VoiceApplicationSid** | **optional.String**| The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceReceiveMode** | **optional.String**| The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | + **VoiceUrl** | **optional.String**| The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIncomingPhoneNumberAssignedAddOn + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn CreateIncomingPhoneNumberAssignedAddOn(ctx, AccountSid, ResourceSid, optional) + + + +Assign an Add-on installation to the Number specified. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**ResourceSid** | **string**| The SID of the Phone Number to assign the Add-on. | + **optional** | ***CreateIncomingPhoneNumberAssignedAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIncomingPhoneNumberAssignedAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **InstalledAddOnSid** | **optional.String**| The SID that identifies the Add-on installation. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIncomingPhoneNumberLocal + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal CreateIncomingPhoneNumberLocal(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateIncomingPhoneNumberLocalOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIncomingPhoneNumberLocalOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressSid** | **optional.String**| The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | + **ApiVersion** | **optional.String**| The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | + **BundleSid** | **optional.String**| The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | + **EmergencyAddressSid** | **optional.String**| The SID of the emergency address configuration to use for emergency calling from the new phone number. | + **EmergencyStatus** | **optional.String**| The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | + **IdentitySid** | **optional.String**| The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | + **PhoneNumber** | **optional.String**| The phone number to purchase specified 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. | + **SmsApplicationSid** | **optional.String**| The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when the new phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **TrunkSid** | **optional.String**| The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | + **VoiceApplicationSid** | **optional.String**| The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceReceiveMode** | **optional.String**| The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | + **VoiceUrl** | **optional.String**| The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal**](api.v2010.account.incoming_phone_number.incoming_phone_number_local.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIncomingPhoneNumberMobile + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile CreateIncomingPhoneNumberMobile(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateIncomingPhoneNumberMobileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIncomingPhoneNumberMobileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressSid** | **optional.String**| The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | + **ApiVersion** | **optional.String**| The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | + **BundleSid** | **optional.String**| The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | + **EmergencyAddressSid** | **optional.String**| The SID of the emergency address configuration to use for emergency calling from the new phone number. | + **EmergencyStatus** | **optional.String**| The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. | + **IdentitySid** | **optional.String**| The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. | + **PhoneNumber** | **optional.String**| The phone number to purchase specified 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. | + **SmsApplicationSid** | **optional.String**| The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when the new phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **TrunkSid** | **optional.String**| The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | + **VoiceApplicationSid** | **optional.String**| The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceReceiveMode** | **optional.String**| The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | + **VoiceUrl** | **optional.String**| The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile**](api.v2010.account.incoming_phone_number.incoming_phone_number_mobile.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIncomingPhoneNumberTollFree + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree CreateIncomingPhoneNumberTollFree(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateIncomingPhoneNumberTollFreeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIncomingPhoneNumberTollFreeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressSid** | **optional.String**| The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. | + **ApiVersion** | **optional.String**| The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. | + **BundleSid** | **optional.String**| The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | + **EmergencyAddressSid** | **optional.String**| The SID of the emergency address configuration to use for emergency calling from the new phone number. | + **EmergencyStatus** | **optional.String**| The configuration status parameter that determines whether the new phone number is enabled for emergency calling. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | + **IdentitySid** | **optional.String**| The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. | + **PhoneNumber** | **optional.String**| The phone number to purchase specified 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. | + **SmsApplicationSid** | **optional.String**| The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when the new phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **TrunkSid** | **optional.String**| The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | + **VoiceApplicationSid** | **optional.String**| The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceReceiveMode** | **optional.String**| The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | + **VoiceUrl** | **optional.String**| The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree**](api.v2010.account.incoming_phone_number.incoming_phone_number_toll_free.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessage + +> ApiV2010AccountMessage CreateMessage(ctx, AccountSid, optional) + + + +Send a message from the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressRetention** | **optional.String**| Determines if the address can be stored or obfuscated based on privacy settings | + **ApplicationSid** | **optional.String**| The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. | + **Attempt** | **optional.Int32**| Total number of attempts made ( including this ) to send out the message regardless of the provider used | + **Body** | **optional.String**| The text of the message you want to send. Can be up to 1,600 characters in length. | + **ContentRetention** | **optional.String**| Determines if the message content can be stored or redacted based on privacy settings | + **ForceDelivery** | **optional.Bool**| Reserved | + **From** | **optional.String**| A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. | + **MaxPrice** | **optional.Float32**| The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. | + **MediaUrl** | [**optional.Interface of []string**](string.md)| The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. | + **MessagingServiceSid** | **optional.String**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. | + **PersistentAction** | [**optional.Interface of []string**](string.md)| Rich actions for Channels Messages. | + **ProvideFeedback** | **optional.Bool**| Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. | + **SmartEncoded** | **optional.Bool**| Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. | + **To** | **optional.String**| The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. | + **ValidityPeriod** | **optional.Int32**| How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. | + +### Return type + +[**ApiV2010AccountMessage**](api.v2010.account.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessageFeedback + +> ApiV2010AccountMessageMessageFeedback CreateMessageFeedback(ctx, AccountSid, MessageSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**MessageSid** | **string**| The SID of the Message resource for which the feedback was provided. | + **optional** | ***CreateMessageFeedbackOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageFeedbackOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Outcome** | **optional.String**| Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. | + +### Return type + +[**ApiV2010AccountMessageMessageFeedback**](api.v2010.account.message.message_feedback.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNewKey + +> ApiV2010AccountNewKey CreateNewKey(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. | + **optional** | ***CreateNewKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateNewKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ApiV2010AccountNewKey**](api.v2010.account.new_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNewSigningKey + +> ApiV2010AccountNewSigningKey CreateNewSigningKey(ctx, AccountSid, optional) + + + +Create a new Signing Key for the account making the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource. | + **optional** | ***CreateNewSigningKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateNewSigningKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ApiV2010AccountNewSigningKey**](api.v2010.account.new_signing_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateParticipant + +> ApiV2010AccountConferenceParticipant CreateParticipant(ctx, AccountSid, ConferenceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**ConferenceSid** | **string**| The SID of the participant's conference. | + **optional** | ***CreateParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Beep** | **optional.String**| Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | + **Byoc** | **optional.String**| The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) | + **CallReason** | **optional.String**| The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) | + **CallSidToCoach** | **optional.String**| The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. | + **CallerId** | **optional.String**| The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. | + **Coaching** | **optional.Bool**| Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. | + **ConferenceRecord** | **optional.String**| Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | + **ConferenceRecordingStatusCallback** | **optional.String**| The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | + **ConferenceRecordingStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. | + **ConferenceRecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceStatusCallback** | **optional.String**| The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | + **ConferenceStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values with a space. Defaults to `start end`. | + **ConferenceStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceTrim** | **optional.String**| Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | + **EarlyMedia** | **optional.Bool**| Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. | + **EndConferenceOnExit** | **optional.Bool**| Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. | + **From** | **optional.String**| The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. | + **JitterBufferSize** | **optional.String**| Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. | + **Label** | **optional.String**| A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. | + **MaxParticipants** | **optional.Int32**| The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | + **Muted** | **optional.Bool**| Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. | + **Record** | **optional.Bool**| Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. | + **RecordingChannels** | **optional.String**| The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | + **RecordingStatusCallback** | **optional.String**| The URL that we should call using the `recording_status_callback_method` when the recording status changes. | + **RecordingStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The recording state changes that should generate a call to `recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. | + **RecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **RecordingTrack** | **optional.String**| The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. | + **Region** | **optional.String**| The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | + **SipAuthPassword** | **optional.String**| The SIP password for authentication. | + **SipAuthUsername** | **optional.String**| The SIP username used for authentication. | + **StartConferenceOnEnter** | **optional.Bool**| Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. | + **Timeout** | **optional.Int32**| The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. | + **To** | **optional.String**| The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. | + **WaitMethod** | **optional.String**| The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | + **WaitUrl** | **optional.String**| The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | + +### Return type + +[**ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePayments + +> ApiV2010AccountCallPayments CreatePayments(ctx, AccountSid, CallSid, optional) + + + +create an instance of payments. This will start a new payments session + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**CallSid** | **string**| The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. | + **optional** | ***CreatePaymentsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreatePaymentsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **BankAccountType** | **optional.String**| Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. | + **ChargeAmount** | **optional.Float32**| A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. | + **Currency** | **optional.String**| The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the <Pay> Connector are accepted. | + **Description** | **optional.String**| The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. | + **IdempotencyKey** | **optional.String**| A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. | + **Input** | **optional.String**| A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. | + **MinPostalCodeLength** | **optional.Int32**| A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. | + **Parameter** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A single level JSON string that is required when accepting certain information specific only to ACH payments. The information that has to be included here depends on the <Pay> Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). | + **PaymentConnector** | **optional.String**| This is the unique name corresponding to the Payment Gateway Connector installed in the Twilio Add-ons. Learn more about [<Pay> Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. | + **PaymentMethod** | **optional.String**| Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. | + **PostalCode** | **optional.Bool**| Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. | + **SecurityCode** | **optional.Bool**| Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. | + **StatusCallback** | **optional.String**| Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) | + **Timeout** | **optional.Int32**| The number of seconds that <Pay> should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. | + **TokenType** | **optional.String**| Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. | + **ValidCardTypes** | **optional.String**| Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` | + +### Return type + +[**ApiV2010AccountCallPayments**](api.v2010.account.call.payments.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateQueue + +> ApiV2010AccountQueue CreateQueue(ctx, AccountSid, optional) + + + +Create a queue + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you created to describe this resource. It can be up to 64 characters long. | + **MaxSize** | **optional.Int32**| The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. | + +### Return type + +[**ApiV2010AccountQueue**](api.v2010.account.queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipAuthCallsCredentialListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping CreateSipAuthCallsCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Create a new credential list mapping resource + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**DomainSid** | **string**| The SID of the SIP domain that will contain the new resource. | + **optional** | ***CreateSipAuthCallsCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipAuthCallsCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CredentialListSid** | **optional.String**| The SID of the CredentialList resource to map to the SIP domain. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipAuthCallsIpAccessControlListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping CreateSipAuthCallsIpAccessControlListMapping(ctx, AccountSid, DomainSid, optional) + + + +Create a new IP Access Control List mapping + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**DomainSid** | **string**| The SID of the SIP domain that will contain the new resource. | + **optional** | ***CreateSipAuthCallsIpAccessControlListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipAuthCallsIpAccessControlListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IpAccessControlListSid** | **optional.String**| The SID of the IpAccessControlList resource to map to the SIP domain. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipAuthRegistrationsCredentialListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping CreateSipAuthRegistrationsCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Create a new credential list mapping resource + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | +**DomainSid** | **string**| The SID of the SIP domain that will contain the new resource. | + **optional** | ***CreateSipAuthRegistrationsCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipAuthRegistrationsCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CredentialListSid** | **optional.String**| The SID of the CredentialList resource to map to the SIP domain. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipCredential + +> ApiV2010AccountSipSipCredentialListSipCredential CreateSipCredential(ctx, AccountSid, CredentialListSid, optional) + + + +Create a new credential resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | **string**| The unique id that identifies the credential list to include the created credential. | + **optional** | ***CreateSipCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Password** | **optional.String**| The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) | + **Username** | **optional.String**| The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. | + +### Return type + +[**ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipCredentialList + +> ApiV2010AccountSipSipCredentialList CreateSipCredentialList(ctx, AccountSid, optional) + + + +Create a Credential List + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | + **optional** | ***CreateSipCredentialListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipCredentialListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A human readable descriptive text that describes the CredentialList, up to 64 characters long. | + +### Return type + +[**ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipCredentialListMapping + +> ApiV2010AccountSipSipDomainSipCredentialListMapping CreateSipCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Create a CredentialListMapping resource for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped. | + **optional** | ***CreateSipCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CredentialListSid** | **optional.String**| A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipDomain + +> ApiV2010AccountSipSipDomain CreateSipDomain(ctx, AccountSid, optional) + + + +Create a new Domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateSipDomainOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipDomainOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ByocTrunkSid** | **optional.String**| The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. | + **DomainName** | **optional.String**| The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`. | + **EmergencyCallerSid** | **optional.String**| Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. | + **EmergencyCallingEnabled** | **optional.Bool**| Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the resource. It can be up to 64 characters long. | + **Secure** | **optional.Bool**| Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. | + **SipRegistration** | **optional.Bool**| Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | + **VoiceStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. | + **VoiceStatusCallbackUrl** | **optional.String**| The URL that we should call to pass status parameters (such as call ended) to your application. | + **VoiceUrl** | **optional.String**| The URL we should when the domain receives a call. | + +### Return type + +[**ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipIpAccessControlList + +> ApiV2010AccountSipSipIpAccessControlList CreateSipIpAccessControlList(ctx, AccountSid, optional) + + + +Create a new IpAccessControlList resource + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | + **optional** | ***CreateSipIpAccessControlListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipIpAccessControlListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipIpAccessControlListMapping + +> ApiV2010AccountSipSipDomainSipIpAccessControlListMapping CreateSipIpAccessControlListMapping(ctx, AccountSid, DomainSid, optional) + + + +Create a new IpAccessControlListMapping resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP domain. | + **optional** | ***CreateSipIpAccessControlListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipIpAccessControlListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IpAccessControlListSid** | **optional.String**| The unique id of the IP access control list to map to the SIP domain. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_ip_access_control_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSipIpAddress + +> ApiV2010AccountSipSipIpAccessControlListSipIpAddress CreateSipIpAddress(ctx, AccountSid, IpAccessControlListSid, optional) + + + +Create a new IpAddress resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**IpAccessControlListSid** | **string**| The IpAccessControlList Sid with which to associate the created IpAddress resource. | + **optional** | ***CreateSipIpAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSipIpAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CidrPrefixLength** | **optional.Int32**| An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. | + **FriendlyName** | **optional.String**| A human readable descriptive text for this resource, up to 64 characters long. | + **IpAddress** | **optional.String**| An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateToken + +> ApiV2010AccountToken CreateToken(ctx, AccountSid, optional) + + + +Create a new token for ICE servers + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateTokenOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTokenOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Ttl** | **optional.Int32**| The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). | + +### Return type + +[**ApiV2010AccountToken**](api.v2010.account.token.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUsageTrigger + +> ApiV2010AccountUsageUsageTrigger CreateUsageTrigger(ctx, AccountSid, optional) + + + +Create a new UsageTrigger + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. | + **optional** | ***CreateUsageTriggerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateUsageTriggerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallbackMethod** | **optional.String**| The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. | + **CallbackUrl** | **optional.String**| The URL we should call using `callback_method` when the trigger fires. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **Recurring** | **optional.String**| The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. | + **TriggerBy** | **optional.String**| The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. | + **TriggerValue** | **optional.String**| The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. | + **UsageCategory** | **optional.String**| The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. | + +### Return type + +[**ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateValidationRequest + +> ApiV2010AccountValidationRequest CreateValidationRequest(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource. | + **optional** | ***CreateValidationRequestOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateValidationRequestOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallDelay** | **optional.Int32**| The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. | + **Extension** | **optional.String**| The digits to dial after connecting the verification call. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. | + **PhoneNumber** | **optional.String**| The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information about the verification process to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. | + +### Return type + +[**ApiV2010AccountValidationRequest**](api.v2010.account.validation_request.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAddress + +> DeleteAddress(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Address resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApplication + +> DeleteApplication(ctx, AccountSid, Sid) + + + +Delete the application by the specified application sid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Application resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCall + +> DeleteCall(ctx, AccountSid, Sid) + + + +Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to delete. | +**Sid** | **string**| The Twilio-provided Call SID that uniquely identifies the Call resource to delete | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCallFeedbackSummary + +> DeleteCallFeedbackSummary(ctx, AccountSid, Sid) + + + +Delete a FeedbackSummary resource from a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCallRecording + +> DeleteCallRecording(ctx, AccountSid, CallSid, Sid) + + + +Delete a recording from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConferenceRecording + +> DeleteConferenceRecording(ctx, AccountSid, ConferenceSid, Sid) + + + +Delete a recording from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete. | +**ConferenceSid** | **string**| The Conference SID that identifies the conference associated with the recording to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Conference Recording resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConnectApp + +> DeleteConnectApp(ctx, AccountSid, Sid) + + + +Delete an instance of a connect-app + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteIncomingPhoneNumber + +> DeleteIncomingPhoneNumber(ctx, AccountSid, Sid) + + + +Delete a phone-numbers belonging to the account used to make the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteIncomingPhoneNumberAssignedAddOn + +> DeleteIncomingPhoneNumberAssignedAddOn(ctx, AccountSid, ResourceSid, Sid) + + + +Remove the assignment of an Add-on installation from the Number specified. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to delete. | +**ResourceSid** | **string**| The SID of the Phone Number to which the Add-on is assigned. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteKey + +> DeleteKey(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Key resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMedia + +> DeleteMedia(ctx, AccountSid, MessageSid, Sid) + + + +Delete media from your account. Once delete, you will no longer be billed + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to delete. | +**MessageSid** | **string**| The SID of the Message resource that this Media resource belongs to. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Media resource to delete | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessage + +> DeleteMessage(ctx, AccountSid, Sid) + + + +Deletes a message record from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteOutgoingCallerId + +> DeleteOutgoingCallerId(ctx, AccountSid, Sid) + + + +Delete the caller-id specified from the account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteParticipant + +> DeleteParticipant(ctx, AccountSid, ConferenceSid, CallSid) + + + +Kick a participant from a given conference + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to delete. | +**ConferenceSid** | **string**| The SID of the conference with the participants to delete. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteQueue + +> DeleteQueue(ctx, AccountSid, Sid) + + + +Remove an empty queue + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Queue resource to delete | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecording + +> DeleteRecording(ctx, AccountSid, Sid) + + + +Delete a recording from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecordingAddOnResult + +> DeleteRecordingAddOnResult(ctx, AccountSid, ReferenceSid, Sid) + + + +Delete a result and purge all associated Payloads + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete. | +**ReferenceSid** | **string**| The SID of the recording to which the result to delete belongs. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecordingAddOnResultPayload + +> DeleteRecordingAddOnResultPayload(ctx, AccountSid, ReferenceSid, AddOnResultSid, Sid) + + + +Delete a payload from the result along with all associated Data + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete. | +**ReferenceSid** | **string**| The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs. | +**AddOnResultSid** | **string**| The SID of the AddOnResult to which the payloads to delete belongs. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecordingTranscription + +> DeleteRecordingTranscription(ctx, AccountSid, RecordingSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. | +**RecordingSid** | **string**| The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Transcription resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSigningKey + +> DeleteSigningKey(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipAuthCallsCredentialListMapping + +> DeleteSipAuthCallsCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Delete a credential list mapping from the requested domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipAuthCallsIpAccessControlListMapping + +> DeleteSipAuthCallsIpAccessControlListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Delete an IP Access Control List mapping from the requested domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to delete. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipAuthRegistrationsCredentialListMapping + +> DeleteSipAuthRegistrationsCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Delete a credential list mapping from the requested domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to delete. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipCredential + +> DeleteSipCredential(ctx, AccountSid, CredentialListSid, Sid) + + + +Delete a credential resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | **string**| The unique id that identifies the credential list that contains the desired credentials. | +**Sid** | **string**| The unique id that identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipCredentialList + +> DeleteSipCredentialList(ctx, AccountSid, Sid) + + + +Delete a Credential List + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**Sid** | **string**| The credential list Sid that uniquely identifies this resource | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipCredentialListMapping + +> DeleteSipCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Delete a CredentialListMapping resource from an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipDomain + +> DeleteSipDomain(ctx, AccountSid, Sid) + + + +Delete an instance of a Domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the SipDomain resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipIpAccessControlList + +> DeleteSipIpAccessControlList(ctx, AccountSid, Sid) + + + +Delete an IpAccessControlList from the requested account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipIpAccessControlListMapping + +> DeleteSipIpAccessControlListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Delete an IpAccessControlListMapping resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP domain. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSipIpAddress + +> DeleteSipIpAddress(ctx, AccountSid, IpAccessControlListSid, Sid) + + + +Delete an IpAddress resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**IpAccessControlListSid** | **string**| The IpAccessControlList Sid that identifies the IpAddress resources to delete. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTranscription + +> DeleteTranscription(ctx, AccountSid, Sid) + + + +Delete a transcription from the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Transcription resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUsageTrigger + +> DeleteUsageTrigger(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAccount + +> ApiV2010Account FetchAccount(ctx, Sid) + + + +Fetch the account specified by the provided Account Sid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Account Sid that uniquely identifies the account to fetch | + +### Return type + +[**ApiV2010Account**](api.v2010.account.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAddress + +> ApiV2010AccountAddress FetchAddress(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Address resource to fetch. | + +### Return type + +[**ApiV2010AccountAddress**](api.v2010.account.address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchApplication + +> ApiV2010AccountApplication FetchApplication(ctx, AccountSid, Sid) + + + +Fetch the application specified by the provided sid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Application resource to fetch. | + +### Return type + +[**ApiV2010AccountApplication**](api.v2010.account.application.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAuthorizedConnectApp + +> ApiV2010AccountAuthorizedConnectApp FetchAuthorizedConnectApp(ctx, AccountSid, ConnectAppSid) + + + +Fetch an instance of an authorized-connect-app + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch. | +**ConnectAppSid** | **string**| The SID of the Connect App to fetch. | + +### Return type + +[**ApiV2010AccountAuthorizedConnectApp**](api.v2010.account.authorized_connect_app.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAvailablePhoneNumberCountry + +> ApiV2010AccountAvailablePhoneNumberCountry FetchAvailablePhoneNumberCountry(ctx, AccountSid, CountryCode) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about. | + +### Return type + +[**ApiV2010AccountAvailablePhoneNumberCountry**](api.v2010.account.available_phone_number_country.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBalance + +> ApiV2010AccountBalance FetchBalance(ctx, AccountSid) + + + +Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique SID identifier of the Account. | + +### Return type + +[**ApiV2010AccountBalance**](api.v2010.account.balance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCall + +> ApiV2010AccountCall FetchCall(ctx, AccountSid, Sid) + + + +Fetch the call specified by the provided Call SID + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to fetch. | +**Sid** | **string**| The SID of the Call resource to fetch. | + +### Return type + +[**ApiV2010AccountCall**](api.v2010.account.call.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCallFeedback + +> ApiV2010AccountCallCallFeedback FetchCallFeedback(ctx, AccountSid, CallSid) + + + +Fetch a Feedback resource from a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**CallSid** | **string**| The call sid that uniquely identifies the call | + +### Return type + +[**ApiV2010AccountCallCallFeedback**](api.v2010.account.call.call_feedback.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCallFeedbackSummary + +> ApiV2010AccountCallCallFeedbackSummary FetchCallFeedbackSummary(ctx, AccountSid, Sid) + + + +Fetch a FeedbackSummary resource from a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ApiV2010AccountCallCallFeedbackSummary**](api.v2010.account.call.call_feedback_summary.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCallNotification + +> ApiV2010AccountCallCallNotificationInstance FetchCallNotification(ctx, AccountSid, CallSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Call Notification resource to fetch. | + +### Return type + +[**ApiV2010AccountCallCallNotificationInstance**](api.v2010.account.call.call_notification-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCallRecording + +> ApiV2010AccountCallCallRecording FetchCallRecording(ctx, AccountSid, CallSid, Sid) + + + +Fetch an instance of a recording for a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording resource to fetch. | + +### Return type + +[**ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConference + +> ApiV2010AccountConference FetchConference(ctx, AccountSid, Sid) + + + +Fetch an instance of a conference + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Conference resource to fetch | + +### Return type + +[**ApiV2010AccountConference**](api.v2010.account.conference.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConferenceRecording + +> ApiV2010AccountConferenceConferenceRecording FetchConferenceRecording(ctx, AccountSid, ConferenceSid, Sid) + + + +Fetch an instance of a recording for a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to fetch. | +**ConferenceSid** | **string**| The Conference SID that identifies the conference associated with the recording to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch. | + +### Return type + +[**ApiV2010AccountConferenceConferenceRecording**](api.v2010.account.conference.conference_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConnectApp + +> ApiV2010AccountConnectApp FetchConnectApp(ctx, AccountSid, Sid) + + + +Fetch an instance of a connect-app + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch. | + +### Return type + +[**ApiV2010AccountConnectApp**](api.v2010.account.connect_app.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchIncomingPhoneNumber + +> ApiV2010AccountIncomingPhoneNumber FetchIncomingPhoneNumber(ctx, AccountSid, Sid) + + + +Fetch an incoming-phone-number belonging to the account used to make the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchIncomingPhoneNumberAssignedAddOn + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn FetchIncomingPhoneNumberAssignedAddOn(ctx, AccountSid, ResourceSid, Sid) + + + +Fetch an instance of an Add-on installation currently assigned to this Number. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. | +**ResourceSid** | **string**| The SID of the Phone Number to which the Add-on is assigned. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchIncomingPhoneNumberAssignedAddOnExtension + +> ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension FetchIncomingPhoneNumberAssignedAddOnExtension(ctx, AccountSid, ResourceSid, AssignedAddOnSid, Sid) + + + +Fetch an instance of an Extension for the Assigned Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch. | +**ResourceSid** | **string**| The SID of the Phone Number to which the Add-on is assigned. | +**AssignedAddOnSid** | **string**| The SID that uniquely identifies the assigned Add-on installation. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchKey + +> ApiV2010AccountKey FetchKey(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Key resource to fetch. | + +### Return type + +[**ApiV2010AccountKey**](api.v2010.account.key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMedia + +> ApiV2010AccountMessageMedia FetchMedia(ctx, AccountSid, MessageSid, Sid) + + + +Fetch a single media instance belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to fetch. | +**MessageSid** | **string**| The SID of the Message resource that this Media resource belongs to. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Media resource to fetch | + +### Return type + +[**ApiV2010AccountMessageMedia**](api.v2010.account.message.media.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMember + +> ApiV2010AccountQueueMember FetchMember(ctx, AccountSid, QueueSid, CallSid) + + + +Fetch a specific member from the queue + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch. | +**QueueSid** | **string**| The SID of the Queue in which to find the members to fetch. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch. | + +### Return type + +[**ApiV2010AccountQueueMember**](api.v2010.account.queue.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessage + +> ApiV2010AccountMessage FetchMessage(ctx, AccountSid, Sid) + + + +Fetch a message belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to fetch. | + +### Return type + +[**ApiV2010AccountMessage**](api.v2010.account.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchNotification + +> ApiV2010AccountNotificationInstance FetchNotification(ctx, AccountSid, Sid) + + + +Fetch a notification belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Notification resource to fetch. | + +### Return type + +[**ApiV2010AccountNotificationInstance**](api.v2010.account.notification-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchOutgoingCallerId + +> ApiV2010AccountOutgoingCallerId FetchOutgoingCallerId(ctx, AccountSid, Sid) + + + +Fetch an outgoing-caller-id belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch. | + +### Return type + +[**ApiV2010AccountOutgoingCallerId**](api.v2010.account.outgoing_caller_id.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchParticipant + +> ApiV2010AccountConferenceParticipant FetchParticipant(ctx, AccountSid, ConferenceSid, CallSid) + + + +Fetch an instance of a participant + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resource to fetch. | +**ConferenceSid** | **string**| The SID of the conference with the participant to fetch. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to fetch. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. | + +### Return type + +[**ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchQueue + +> ApiV2010AccountQueue FetchQueue(ctx, AccountSid, Sid) + + + +Fetch an instance of a queue identified by the QueueSid + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Queue resource to fetch | + +### Return type + +[**ApiV2010AccountQueue**](api.v2010.account.queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecording + +> ApiV2010AccountRecording FetchRecording(ctx, AccountSid, Sid) + + + +Fetch an instance of a recording + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording resource to fetch. | + +### Return type + +[**ApiV2010AccountRecording**](api.v2010.account.recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecordingAddOnResult + +> ApiV2010AccountRecordingRecordingAddOnResult FetchRecordingAddOnResult(ctx, AccountSid, ReferenceSid, Sid) + + + +Fetch an instance of an AddOnResult + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resource to fetch. | +**ReferenceSid** | **string**| The SID of the recording to which the result to fetch belongs. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch. | + +### Return type + +[**ApiV2010AccountRecordingRecordingAddOnResult**](api.v2010.account.recording.recording_add_on_result.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecordingAddOnResultPayload + +> ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload FetchRecordingAddOnResultPayload(ctx, AccountSid, ReferenceSid, AddOnResultSid, Sid) + + + +Fetch an instance of a result payload + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch. | +**ReferenceSid** | **string**| The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs. | +**AddOnResultSid** | **string**| The SID of the AddOnResult to which the payload to fetch belongs. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch. | + +### Return type + +[**ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload**](api.v2010.account.recording.recording_add_on_result.recording_add_on_result_payload.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecordingTranscription + +> ApiV2010AccountRecordingRecordingTranscription FetchRecordingTranscription(ctx, AccountSid, RecordingSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. | +**RecordingSid** | **string**| The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Transcription resource to fetch. | + +### Return type + +[**ApiV2010AccountRecordingRecordingTranscription**](api.v2010.account.recording.recording_transcription.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchShortCode + +> ApiV2010AccountShortCode FetchShortCode(ctx, AccountSid, Sid) + + + +Fetch an instance of a short code + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ShortCode resource to fetch | + +### Return type + +[**ApiV2010AccountShortCode**](api.v2010.account.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSigningKey + +> ApiV2010AccountSigningKey FetchSigningKey(ctx, AccountSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**ApiV2010AccountSigningKey**](api.v2010.account.signing_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipAuthCallsCredentialListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping FetchSipAuthCallsCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Fetch a specific instance of a credential list mapping + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipAuthCallsIpAccessControlListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping FetchSipAuthCallsIpAccessControlListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Fetch a specific instance of an IP Access Control List mapping + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource to fetch. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipAuthRegistrationsCredentialListMapping + +> ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping FetchSipAuthRegistrationsCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Fetch a specific instance of a credential list mapping + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipCredential + +> ApiV2010AccountSipSipCredentialListSipCredential FetchSipCredential(ctx, AccountSid, CredentialListSid, Sid) + + + +Fetch a single credential. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | **string**| The unique id that identifies the credential list that contains the desired credential. | +**Sid** | **string**| The unique id that identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipCredentialList + +> ApiV2010AccountSipSipCredentialList FetchSipCredentialList(ctx, AccountSid, Sid) + + + +Get a Credential List + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**Sid** | **string**| The credential list Sid that uniquely identifies this resource | + +### Return type + +[**ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipCredentialListMapping + +> ApiV2010AccountSipSipDomainSipCredentialListMapping FetchSipCredentialListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Fetch a single CredentialListMapping resource from an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_credential_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipDomain + +> ApiV2010AccountSipSipDomain FetchSipDomain(ctx, AccountSid, Sid) + + + +Fetch an instance of a Domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipIpAccessControlList + +> ApiV2010AccountSipSipIpAccessControlList FetchSipIpAccessControlList(ctx, AccountSid, Sid) + + + +Fetch a specific instance of an IpAccessControlList + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipIpAccessControlListMapping + +> ApiV2010AccountSipSipDomainSipIpAccessControlListMapping FetchSipIpAccessControlListMapping(ctx, AccountSid, DomainSid, Sid) + + + +Fetch an IpAccessControlListMapping resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP domain. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipDomainSipIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_ip_access_control_list_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSipIpAddress + +> ApiV2010AccountSipSipIpAccessControlListSipIpAddress FetchSipIpAddress(ctx, AccountSid, IpAccessControlListSid, Sid) + + + +Read one IpAddress resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**IpAccessControlListSid** | **string**| The IpAccessControlList Sid that identifies the IpAddress resources to fetch. | +**Sid** | **string**| A 34 character string that uniquely identifies the IpAddress resource to fetch. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTranscription + +> ApiV2010AccountTranscription FetchTranscription(ctx, AccountSid, Sid) + + + +Fetch an instance of a Transcription + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Transcription resource to fetch. | + +### Return type + +[**ApiV2010AccountTranscription**](api.v2010.account.transcription.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUsageTrigger + +> ApiV2010AccountUsageUsageTrigger FetchUsageTrigger(ctx, AccountSid, Sid) + + + +Fetch and instance of a usage-trigger + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch. | + +### Return type + +[**ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAccount + +> ListAccountResponse ListAccount(ctx, optional) + + + +Retrieves a collection of Accounts belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAccountOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAccountOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| Only return the Account resources with friendly names that exactly match this name. | + **Status** | **optional.String**| Only return Account resources with the given status. Can be `closed`, `suspended` or `active`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAccountResponse**](ListAccountResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAddress + +> ListAddressResponse ListAddress(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to read. | + **optional** | ***ListAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CustomerName** | **optional.String**| The `customer_name` of the Address resources to read. | + **FriendlyName** | **optional.String**| The string that identifies the Address resources to read. | + **IsoCountry** | **optional.String**| The ISO country code of the Address resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAddressResponse**](ListAddressResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApplication + +> ListApplicationResponse ListApplication(ctx, AccountSid, optional) + + + +Retrieve a list of applications representing an application within the requesting account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read. | + **optional** | ***ListApplicationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListApplicationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| The string that identifies the Application resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListApplicationResponse**](ListApplicationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAuthorizedConnectApp + +> ListAuthorizedConnectAppResponse ListAuthorizedConnectApp(ctx, AccountSid, optional) + + + +Retrieve a list of authorized-connect-apps belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resources to read. | + **optional** | ***ListAuthorizedConnectAppOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAuthorizedConnectAppOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAuthorizedConnectAppResponse**](ListAuthorizedConnectAppResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberCountry + +> ListAvailablePhoneNumberCountryResponse ListAvailablePhoneNumberCountry(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resources. | + **optional** | ***ListAvailablePhoneNumberCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberCountryResponse**](ListAvailablePhoneNumberCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberLocal + +> ListAvailablePhoneNumberLocalResponse ListAvailablePhoneNumberLocal(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberLocalOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberLocalOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberLocalResponse**](ListAvailablePhoneNumberLocalResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberMachineToMachine + +> ListAvailablePhoneNumberMachineToMachineResponse ListAvailablePhoneNumberMachineToMachine(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberMachineToMachineOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberMachineToMachineOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberMachineToMachineResponse**](ListAvailablePhoneNumberMachineToMachineResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberMobile + +> ListAvailablePhoneNumberMobileResponse ListAvailablePhoneNumberMobile(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberMobileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberMobileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberMobileResponse**](ListAvailablePhoneNumberMobileResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberNational + +> ListAvailablePhoneNumberNationalResponse ListAvailablePhoneNumberNational(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberNationalOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberNationalOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberNationalResponse**](ListAvailablePhoneNumberNationalResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberSharedCost + +> ListAvailablePhoneNumberSharedCostResponse ListAvailablePhoneNumberSharedCost(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberSharedCostOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberSharedCostOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberSharedCostResponse**](ListAvailablePhoneNumberSharedCostResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberTollFree + +> ListAvailablePhoneNumberTollFreeResponse ListAvailablePhoneNumberTollFree(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberTollFreeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberTollFreeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberTollFreeResponse**](ListAvailablePhoneNumberTollFreeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailablePhoneNumberVoip + +> ListAvailablePhoneNumberVoipResponse ListAvailablePhoneNumberVoip(ctx, AccountSid, CountryCode, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources. | +**CountryCode** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers. | + **optional** | ***ListAvailablePhoneNumberVoipOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailablePhoneNumberVoipOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AreaCode** | **optional.Int32**| The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | + **Contains** | **optional.String**| The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters. | + **SmsEnabled** | **optional.Bool**| Whether the phone numbers can receive text messages. Can be: `true` or `false`. | + **MmsEnabled** | **optional.Bool**| Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | + **VoiceEnabled** | **optional.Bool**| Whether the phone numbers can receive calls. Can be: `true` or `false`. | + **ExcludeAllAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeLocalAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **ExcludeForeignAddressRequired** | **optional.Bool**| Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | + **Beta** | **optional.Bool**| Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **NearNumber** | **optional.String**| Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. | + **NearLatLong** | **optional.String**| Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada. | + **Distance** | **optional.Int32**| The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada. | + **InPostalCode** | **optional.String**| Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. | + **InRegion** | **optional.String**| Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. | + **InRateCenter** | **optional.String**| Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada. | + **InLata** | **optional.String**| Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada. | + **InLocality** | **optional.String**| Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. | + **FaxEnabled** | **optional.Bool**| Whether the phone numbers can receive faxes. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailablePhoneNumberVoipResponse**](ListAvailablePhoneNumberVoipResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCall + +> ListCallResponse ListCall(ctx, AccountSid, optional) + + + +Retrieves a collection of calls made to and from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to read. | + **optional** | ***ListCallOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCallOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **To** | **optional.String**| Only show calls made to this phone number, SIP address, Client identifier or SIM SID. | + **From** | **optional.String**| Only include calls from this phone number, SIP address, Client identifier or SIM SID. | + **ParentCallSid** | **optional.String**| Only include calls spawned by calls with this SID. | + **Status** | **optional.String**| The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`. | + **StartTime** | **optional.Time**| Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. | + **StartTimelesserThan** | **optional.Time**| Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. | + **StartTimegreaterThan** | **optional.Time**| Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date. | + **EndTime** | **optional.Time**| Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. | + **EndTimelesserThan** | **optional.Time**| Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. | + **EndTimegreaterThan** | **optional.Time**| Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCallResponse**](ListCallResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCallEvent + +> ListCallEventResponse ListCallEvent(ctx, AccountSid, CallSid, optional) + + + +Retrieve a list of all events for a call. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique SID identifier of the Account. | +**CallSid** | **string**| The unique SID identifier of the Call. | + **optional** | ***ListCallEventOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCallEventOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCallEventResponse**](ListCallEventResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCallNotification + +> ListCallNotificationResponse ListCallNotification(ctx, AccountSid, CallSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resources to read. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resources to read. | + **optional** | ***ListCallNotificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCallNotificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Log** | **optional.Int32**| Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. | + **MessageDate** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **MessageDatelesserThan** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **MessageDategreaterThan** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCallNotificationResponse**](ListCallNotificationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCallRecording + +> ListCallRecordingResponse ListCallRecording(ctx, AccountSid, CallSid, optional) + + + +Retrieve a list of recordings belonging to the call used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. | + **optional** | ***ListCallRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCallRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DateCreated** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **DateCreatedlesserThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **DateCreatedgreaterThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCallRecordingResponse**](ListCallRecordingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConference + +> ListConferenceResponse ListConference(ctx, AccountSid, optional) + + + +Retrieve a list of conferences belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to read. | + **optional** | ***ListConferenceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConferenceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DateCreated** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. | + **DateCreatedlesserThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. | + **DateCreatedgreaterThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`. | + **DateUpdated** | **optional.Time**| The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. | + **DateUpdatedlesserThan** | **optional.Time**| The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. | + **DateUpdatedgreaterThan** | **optional.Time**| The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`. | + **FriendlyName** | **optional.String**| The string that identifies the Conference resources to read. | + **Status** | **optional.String**| The status of the resources to read. Can be: `init`, `in-progress`, or `completed`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConferenceResponse**](ListConferenceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConferenceRecording + +> ListConferenceRecordingResponse ListConferenceRecording(ctx, AccountSid, ConferenceSid, optional) + + + +Retrieve a list of recordings belonging to the call used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to read. | +**ConferenceSid** | **string**| The Conference SID that identifies the conference associated with the recording to read. | + **optional** | ***ListConferenceRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConferenceRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DateCreated** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **DateCreatedlesserThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **DateCreatedgreaterThan** | **optional.Time**| The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConferenceRecordingResponse**](ListConferenceRecordingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectApp + +> ListConnectAppResponse ListConnectApp(ctx, AccountSid, optional) + + + +Retrieve a list of connect-apps belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to read. | + **optional** | ***ListConnectAppOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConnectAppOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConnectAppResponse**](ListConnectAppResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDependentPhoneNumber + +> ListDependentPhoneNumberResponse ListDependentPhoneNumber(ctx, AccountSid, AddressSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read. | +**AddressSid** | **string**| The SID of the Address resource associated with the phone number. | + **optional** | ***ListDependentPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDependentPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDependentPhoneNumberResponse**](ListDependentPhoneNumberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumber + +> ListIncomingPhoneNumberResponse ListIncomingPhoneNumber(ctx, AccountSid, optional) + + + +Retrieve a list of incoming-phone-numbers belonging to the account used to make the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resources to read. | + **optional** | ***ListIncomingPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Beta** | **optional.Bool**| Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **FriendlyName** | **optional.String**| A string that identifies the IncomingPhoneNumber resources to read. | + **PhoneNumber** | **optional.String**| The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. | + **Origin** | **optional.String**| Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberResponse**](ListIncomingPhoneNumberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumberAssignedAddOn + +> ListIncomingPhoneNumberAssignedAddOnResponse ListIncomingPhoneNumberAssignedAddOn(ctx, AccountSid, ResourceSid, optional) + + + +Retrieve a list of Add-on installations currently assigned to this Number. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. | +**ResourceSid** | **string**| The SID of the Phone Number to which the Add-on is assigned. | + **optional** | ***ListIncomingPhoneNumberAssignedAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberAssignedAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberAssignedAddOnResponse**](ListIncomingPhoneNumberAssignedAddOnResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumberAssignedAddOnExtension + +> ListIncomingPhoneNumberAssignedAddOnExtensionResponse ListIncomingPhoneNumberAssignedAddOnExtension(ctx, AccountSid, ResourceSid, AssignedAddOnSid, optional) + + + +Retrieve a list of Extensions for the Assigned Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. | +**ResourceSid** | **string**| The SID of the Phone Number to which the Add-on is assigned. | +**AssignedAddOnSid** | **string**| The SID that uniquely identifies the assigned Add-on installation. | + **optional** | ***ListIncomingPhoneNumberAssignedAddOnExtensionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberAssignedAddOnExtensionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberAssignedAddOnExtensionResponse**](ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumberLocal + +> ListIncomingPhoneNumberLocalResponse ListIncomingPhoneNumberLocal(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. | + **optional** | ***ListIncomingPhoneNumberLocalOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberLocalOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Beta** | **optional.Bool**| Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **FriendlyName** | **optional.String**| A string that identifies the resources to read. | + **PhoneNumber** | **optional.String**| The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. | + **Origin** | **optional.String**| Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberLocalResponse**](ListIncomingPhoneNumberLocalResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumberMobile + +> ListIncomingPhoneNumberMobileResponse ListIncomingPhoneNumberMobile(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. | + **optional** | ***ListIncomingPhoneNumberMobileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberMobileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Beta** | **optional.Bool**| Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **FriendlyName** | **optional.String**| A string that identifies the resources to read. | + **PhoneNumber** | **optional.String**| The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. | + **Origin** | **optional.String**| Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberMobileResponse**](ListIncomingPhoneNumberMobileResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIncomingPhoneNumberTollFree + +> ListIncomingPhoneNumberTollFreeResponse ListIncomingPhoneNumberTollFree(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resources to read. | + **optional** | ***ListIncomingPhoneNumberTollFreeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIncomingPhoneNumberTollFreeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Beta** | **optional.Bool**| Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`. | + **FriendlyName** | **optional.String**| A string that identifies the resources to read. | + **PhoneNumber** | **optional.String**| The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit. | + **Origin** | **optional.String**| Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIncomingPhoneNumberTollFreeResponse**](ListIncomingPhoneNumberTollFreeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListKey + +> ListKeyResponse ListKey(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to read. | + **optional** | ***ListKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListKeyResponse**](ListKeyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMedia + +> ListMediaResponse ListMedia(ctx, AccountSid, MessageSid, optional) + + + +Retrieve a list of Media resources belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Media resource(s) to read. | +**MessageSid** | **string**| The SID of the Message resource that this Media resource belongs to. | + **optional** | ***ListMediaOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMediaOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DateCreated** | **optional.Time**| Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. | + **DateCreatedlesserThan** | **optional.Time**| Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. | + **DateCreatedgreaterThan** | **optional.Time**| Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMediaResponse**](ListMediaResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMember + +> ListMemberResponse ListMember(ctx, AccountSid, QueueSid, optional) + + + +Retrieve the members of the queue + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to read. | +**QueueSid** | **string**| The SID of the Queue in which to find the members | + **optional** | ***ListMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMemberResponse**](ListMemberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessage + +> ListMessageResponse ListMessage(ctx, AccountSid, optional) + + + +Retrieve a list of messages belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to read. | + **optional** | ***ListMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **To** | **optional.String**| Read messages sent to only this phone number. | + **From** | **optional.String**| Read messages sent from only this phone number or alphanumeric sender ID. | + **DateSent** | **optional.Time**| The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. | + **DateSentlesserThan** | **optional.Time**| The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. | + **DateSentgreaterThan** | **optional.Time**| The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessageResponse**](ListMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNotification + +> ListNotificationResponse ListNotification(ctx, AccountSid, optional) + + + +Retrieve a list of notifications belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resources to read. | + **optional** | ***ListNotificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListNotificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Log** | **optional.Int32**| Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read. | + **MessageDate** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **MessageDatelesserThan** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **MessageDategreaterThan** | **optional.Time**| Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListNotificationResponse**](ListNotificationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListOutgoingCallerId + +> ListOutgoingCallerIdResponse ListOutgoingCallerId(ctx, AccountSid, optional) + + + +Retrieve a list of outgoing-caller-ids belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to read. | + **optional** | ***ListOutgoingCallerIdOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListOutgoingCallerIdOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PhoneNumber** | **optional.String**| The phone number of the OutgoingCallerId resources to read. | + **FriendlyName** | **optional.String**| The string that identifies the OutgoingCallerId resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListOutgoingCallerIdResponse**](ListOutgoingCallerIdResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListParticipant + +> ListParticipantResponse ListParticipant(ctx, AccountSid, ConferenceSid, optional) + + + +Retrieve a list of participants belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to read. | +**ConferenceSid** | **string**| The SID of the conference with the participants to read. | + **optional** | ***ListParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Muted** | **optional.Bool**| Whether to return only participants that are muted. Can be: `true` or `false`. | + **Hold** | **optional.Bool**| Whether to return only participants that are on hold. Can be: `true` or `false`. | + **Coaching** | **optional.Bool**| Whether to return only participants who are coaching another call. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListParticipantResponse**](ListParticipantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListQueue + +> ListQueueResponse ListQueue(ctx, AccountSid, optional) + + + +Retrieve a list of queues belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resources to read. | + **optional** | ***ListQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListQueueResponse**](ListQueueResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecording + +> ListRecordingResponse ListRecording(ctx, AccountSid, optional) + + + +Retrieve a list of recordings belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to read. | + **optional** | ***ListRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DateCreated** | **optional.Time**| Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. | + **DateCreatedlesserThan** | **optional.Time**| Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. | + **DateCreatedgreaterThan** | **optional.Time**| Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date. | + **CallSid** | **optional.String**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read. | + **ConferenceSid** | **optional.String**| The Conference SID that identifies the conference associated with the recording to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRecordingResponse**](ListRecordingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecordingAddOnResult + +> ListRecordingAddOnResultResponse ListRecordingAddOnResult(ctx, AccountSid, ReferenceSid, optional) + + + +Retrieve a list of results belonging to the recording + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to read. | +**ReferenceSid** | **string**| The SID of the recording to which the result to read belongs. | + **optional** | ***ListRecordingAddOnResultOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRecordingAddOnResultOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRecordingAddOnResultResponse**](ListRecordingAddOnResultResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecordingAddOnResultPayload + +> ListRecordingAddOnResultPayloadResponse ListRecordingAddOnResultPayload(ctx, AccountSid, ReferenceSid, AddOnResultSid, optional) + + + +Retrieve a list of payloads belonging to the AddOnResult + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to read. | +**ReferenceSid** | **string**| The SID of the recording to which the AddOnResult resource that contains the payloads to read belongs. | +**AddOnResultSid** | **string**| The SID of the AddOnResult to which the payloads to read belongs. | + **optional** | ***ListRecordingAddOnResultPayloadOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRecordingAddOnResultPayloadOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRecordingAddOnResultPayloadResponse**](ListRecordingAddOnResultPayloadResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecordingTranscription + +> ListRecordingTranscriptionResponse ListRecordingTranscription(ctx, AccountSid, RecordingSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. | +**RecordingSid** | **string**| The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcriptions to read. | + **optional** | ***ListRecordingTranscriptionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRecordingTranscriptionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRecordingTranscriptionResponse**](ListRecordingTranscriptionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListShortCode + +> ListShortCodeResponse ListShortCode(ctx, AccountSid, optional) + + + +Retrieve a list of short-codes belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to read. | + **optional** | ***ListShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| The string that identifies the ShortCode resources to read. | + **ShortCode** | **optional.String**| Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListShortCodeResponse**](ListShortCodeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSigningKey + +> ListSigningKeyResponse ListSigningKey(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| | + **optional** | ***ListSigningKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSigningKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSigningKeyResponse**](ListSigningKeyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipAuthCallsCredentialListMapping + +> ListSipAuthCallsCredentialListMappingResponse ListSipAuthCallsCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Retrieve a list of credential list mappings belonging to the domain used in the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resources to read. | + **optional** | ***ListSipAuthCallsCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipAuthCallsCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipAuthCallsCredentialListMappingResponse**](ListSipAuthCallsCredentialListMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipAuthCallsIpAccessControlListMapping + +> ListSipAuthCallsIpAccessControlListMappingResponse ListSipAuthCallsIpAccessControlListMapping(ctx, AccountSid, DomainSid, optional) + + + +Retrieve a list of IP Access Control List mappings belonging to the domain used in the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resources to read. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resources to read. | + **optional** | ***ListSipAuthCallsIpAccessControlListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipAuthCallsIpAccessControlListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipAuthCallsIpAccessControlListMappingResponse**](ListSipAuthCallsIpAccessControlListMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipAuthRegistrationsCredentialListMapping + +> ListSipAuthRegistrationsCredentialListMappingResponse ListSipAuthRegistrationsCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Retrieve a list of credential list mappings belonging to the domain used in the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resources to read. | +**DomainSid** | **string**| The SID of the SIP domain that contains the resources to read. | + **optional** | ***ListSipAuthRegistrationsCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipAuthRegistrationsCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipAuthRegistrationsCredentialListMappingResponse**](ListSipAuthRegistrationsCredentialListMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipCredential + +> ListSipCredentialResponse ListSipCredential(ctx, AccountSid, CredentialListSid, optional) + + + +Retrieve a list of credentials. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | **string**| The unique id that identifies the credential list that contains the desired credentials. | + **optional** | ***ListSipCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipCredentialResponse**](ListSipCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipCredentialList + +> ListSipCredentialListResponse ListSipCredentialList(ctx, AccountSid, optional) + + + +Get All Credential Lists + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | + **optional** | ***ListSipCredentialListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipCredentialListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipCredentialListResponse**](ListSipCredentialListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipCredentialListMapping + +> ListSipCredentialListMappingResponse ListSipCredentialListMapping(ctx, AccountSid, DomainSid, optional) + + + +Read multiple CredentialListMapping resources from an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP Domain that includes the resource to read. | + **optional** | ***ListSipCredentialListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipCredentialListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipCredentialListMappingResponse**](ListSipCredentialListMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipDomain + +> ListSipDomainResponse ListSipDomain(ctx, AccountSid, optional) + + + +Retrieve a list of domains belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read. | + **optional** | ***ListSipDomainOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipDomainOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipDomainResponse**](ListSipDomainResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipIpAccessControlList + +> ListSipIpAccessControlListResponse ListSipIpAccessControlList(ctx, AccountSid, optional) + + + +Retrieve a list of IpAccessControlLists that belong to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | + **optional** | ***ListSipIpAccessControlListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipIpAccessControlListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipIpAccessControlListResponse**](ListSipIpAccessControlListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipIpAccessControlListMapping + +> ListSipIpAccessControlListMappingResponse ListSipIpAccessControlListMapping(ctx, AccountSid, DomainSid, optional) + + + +Retrieve a list of IpAccessControlListMapping resources. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**DomainSid** | **string**| A 34 character string that uniquely identifies the SIP domain. | + **optional** | ***ListSipIpAccessControlListMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipIpAccessControlListMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipIpAccessControlListMappingResponse**](ListSipIpAccessControlListMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSipIpAddress + +> ListSipIpAddressResponse ListSipIpAddress(ctx, AccountSid, IpAccessControlListSid, optional) + + + +Read multiple IpAddress resources. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**IpAccessControlListSid** | **string**| The IpAccessControlList Sid that identifies the IpAddress resources to read. | + **optional** | ***ListSipIpAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSipIpAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSipIpAddressResponse**](ListSipIpAddressResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTranscription + +> ListTranscriptionResponse ListTranscription(ctx, AccountSid, optional) + + + +Retrieve a list of transcriptions belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to read. | + **optional** | ***ListTranscriptionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTranscriptionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTranscriptionResponse**](ListTranscriptionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecord + +> ListUsageRecordResponse ListUsageRecord(ctx, AccountSid, optional) + + + +Retrieve a list of usage-records belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordResponse**](ListUsageRecordResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordAllTime + +> ListUsageRecordAllTimeResponse ListUsageRecordAllTime(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordAllTimeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordAllTimeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordAllTimeResponse**](ListUsageRecordAllTimeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordDaily + +> ListUsageRecordDailyResponse ListUsageRecordDaily(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordDailyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordDailyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordDailyResponse**](ListUsageRecordDailyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordLastMonth + +> ListUsageRecordLastMonthResponse ListUsageRecordLastMonth(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordLastMonthOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordLastMonthOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordLastMonthResponse**](ListUsageRecordLastMonthResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordMonthly + +> ListUsageRecordMonthlyResponse ListUsageRecordMonthly(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordMonthlyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordMonthlyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordMonthlyResponse**](ListUsageRecordMonthlyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordThisMonth + +> ListUsageRecordThisMonthResponse ListUsageRecordThisMonth(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordThisMonthOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordThisMonthOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordThisMonthResponse**](ListUsageRecordThisMonthResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordToday + +> ListUsageRecordTodayResponse ListUsageRecordToday(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordTodayOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordTodayOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordTodayResponse**](ListUsageRecordTodayResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordYearly + +> ListUsageRecordYearlyResponse ListUsageRecordYearly(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordYearlyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordYearlyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordYearlyResponse**](ListUsageRecordYearlyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecordYesterday + +> ListUsageRecordYesterdayResponse ListUsageRecordYesterday(ctx, AccountSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read. | + **optional** | ***ListUsageRecordYesterdayOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordYesterdayOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Category** | **optional.String**| The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved. | + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date. | + **IncludeSubaccounts** | **optional.Bool**| Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordYesterdayResponse**](ListUsageRecordYesterdayResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageTrigger + +> ListUsageTriggerResponse ListUsageTrigger(ctx, AccountSid, optional) + + + +Retrieve a list of usage-triggers belonging to the account used to make the request + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to read. | + **optional** | ***ListUsageTriggerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageTriggerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Recurring** | **optional.String**| The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers. | + **TriggerBy** | **optional.String**| The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). | + **UsageCategory** | **optional.String**| The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories). | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageTriggerResponse**](ListUsageTriggerResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccount + +> ApiV2010Account UpdateAccount(ctx, Sid, optional) + + + +Modify the properties of a given Account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Account Sid that uniquely identifies the account to update | + **optional** | ***UpdateAccountOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAccountOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| Update the human-readable description of this Account | + **Status** | **optional.String**| Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. | + +### Return type + +[**ApiV2010Account**](api.v2010.account.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAddress + +> ApiV2010AccountAddress UpdateAddress(ctx, AccountSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is responsible for the Address resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Address resource to update. | + **optional** | ***UpdateAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AutoCorrectAddress** | **optional.Bool**| Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. | + **City** | **optional.String**| The city of the address. | + **CustomerName** | **optional.String**| The name to associate with the address. | + **EmergencyEnabled** | **optional.Bool**| Whether to enable emergency calling on the address. Can be: `true` or `false`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the address. It can be up to 64 characters long. | + **PostalCode** | **optional.String**| The postal code of the address. | + **Region** | **optional.String**| The state or region of the address. | + **Street** | **optional.String**| The number and street address of the address. | + +### Return type + +[**ApiV2010AccountAddress**](api.v2010.account.address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplication + +> ApiV2010AccountApplication UpdateApplication(ctx, AccountSid, Sid, optional) + + + +Updates the application's properties + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Application resource to update. | + **optional** | ***UpdateApplicationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateApplicationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ApiVersion** | **optional.String**| The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **MessageStatusCallback** | **optional.String**| The URL we should call using a POST method to send message status information to your application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. | + **SmsStatusCallback** | **optional.String**| Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. | + **SmsUrl** | **optional.String**| The URL we should call when the phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | + **VoiceUrl** | **optional.String**| The URL we should call when the phone number assigned to this application receives a call. | + +### Return type + +[**ApiV2010AccountApplication**](api.v2010.account.application.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCall + +> ApiV2010AccountCall UpdateCall(ctx, AccountSid, Sid, optional) + + + +Initiates a call redirect or terminates a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Call resource to update | + **optional** | ***UpdateCallOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCallOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FallbackMethod** | **optional.String**| The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **FallbackUrl** | **optional.String**| The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. | + **Method** | **optional.String**| The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **Status** | **optional.String**| The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | + **Twiml** | **optional.String**| TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive | + **Url** | **optional.String**| The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). | + +### Return type + +[**ApiV2010AccountCall**](api.v2010.account.call.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCallFeedback + +> ApiV2010AccountCallCallFeedback UpdateCallFeedback(ctx, AccountSid, CallSid, optional) + + + +Update a Feedback resource for a call + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**CallSid** | **string**| The call sid that uniquely identifies the call | + **optional** | ***UpdateCallFeedbackOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCallFeedbackOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Issue** | [**optional.Interface of []string**](string.md)| One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. | + **QualityScore** | **optional.Int32**| The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. | + +### Return type + +[**ApiV2010AccountCallCallFeedback**](api.v2010.account.call.call_feedback.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCallRecording + +> ApiV2010AccountCallCallRecording UpdateCallRecording(ctx, AccountSid, CallSid, Sid, optional) + + + +Changes the status of the recording to paused, stopped, or in-progress. Note: Pass `Twilio.CURRENT` instead of recording sid to reference current active recording. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resource to update. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Recording resource to update. | + **optional** | ***UpdateCallRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCallRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PauseBehavior** | **optional.String**| Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. | + **Status** | **optional.String**| The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. | + +### Return type + +[**ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConference + +> ApiV2010AccountConference UpdateConference(ctx, AccountSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Conference resource to update | + **optional** | ***UpdateConferenceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConferenceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AnnounceMethod** | **optional.String**| The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` | + **AnnounceUrl** | **optional.String**| The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `<Play>` or `<Say>`. | + **Status** | **optional.String**| The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants | + +### Return type + +[**ApiV2010AccountConference**](api.v2010.account.conference.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConferenceRecording + +> ApiV2010AccountConferenceConferenceRecording UpdateConferenceRecording(ctx, AccountSid, ConferenceSid, Sid, optional) + + + +Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as recording sid. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resource to update. | +**ConferenceSid** | **string**| The Conference SID that identifies the conference associated with the recording to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Conference Recording resource to update. Use `Twilio.CURRENT` to reference the current active recording. | + **optional** | ***UpdateConferenceRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConferenceRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PauseBehavior** | **optional.String**| Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. | + **Status** | **optional.String**| The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. | + +### Return type + +[**ApiV2010AccountConferenceConferenceRecording**](api.v2010.account.conference.conference_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConnectApp + +> ApiV2010AccountConnectApp UpdateConnectApp(ctx, AccountSid, Sid, optional) + + + +Update a connect-app with the specified parameters + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ConnectApp resource to update. | + **optional** | ***UpdateConnectAppOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConnectAppOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AuthorizeRedirectUrl** | **optional.String**| The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. | + **CompanyName** | **optional.String**| The company name to set for the Connect App. | + **DeauthorizeCallbackMethod** | **optional.String**| The HTTP method to use when calling `deauthorize_callback_url`. | + **DeauthorizeCallbackUrl** | **optional.String**| The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. | + **Description** | **optional.String**| A description of the Connect App. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **HomepageUrl** | **optional.String**| A public URL where users can obtain more information about this Connect App. | + **Permissions** | [**optional.Interface of []string**](string.md)| A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. | + +### Return type + +[**ApiV2010AccountConnectApp**](api.v2010.account.connect_app.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateIncomingPhoneNumber + +> ApiV2010AccountIncomingPhoneNumber UpdateIncomingPhoneNumber(ctx, AccountSid, Sid, optional) + + + +Update an incoming-phone-number instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update. | + **optional** | ***UpdateIncomingPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateIncomingPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AccountSid** | **optional.String**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). | + **AddressSid** | **optional.String**| The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. | + **ApiVersion** | **optional.String**| The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. | + **BundleSid** | **optional.String**| The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | + **EmergencyAddressSid** | **optional.String**| The SID of the emergency address configuration to use for emergency calling from this phone number. | + **EmergencyStatus** | **optional.String**| The configuration status parameter that determines whether the phone number is enabled for emergency calling. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | + **IdentitySid** | **optional.String**| The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. | + **SmsApplicationSid** | **optional.String**| The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when the phone number receives an incoming SMS message. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **TrunkSid** | **optional.String**| The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | + **VoiceApplicationSid** | **optional.String**| The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | + **VoiceCallerIdLookup** | **optional.Bool**| Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | + **VoiceMethod** | **optional.String**| The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **VoiceReceiveMode** | **optional.String**| The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | + **VoiceUrl** | **optional.String**| The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | + +### Return type + +[**ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateKey + +> ApiV2010AccountKey UpdateKey(ctx, AccountSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Key resource to update. | + **optional** | ***UpdateKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ApiV2010AccountKey**](api.v2010.account.key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMember + +> ApiV2010AccountQueueMember UpdateMember(ctx, AccountSid, QueueSid, CallSid, optional) + + + +Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to update. | +**QueueSid** | **string**| The SID of the Queue in which to find the members to update. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to update. | + **optional** | ***UpdateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Method** | **optional.String**| How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. | + **Url** | **optional.String**| The absolute URL of the Queue resource. | + +### Return type + +[**ApiV2010AccountQueueMember**](api.v2010.account.queue.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessage + +> ApiV2010AccountMessage UpdateMessage(ctx, AccountSid, Sid, optional) + + + +To redact a message-body from a post-flight message record, post to the message instance resource with an empty body + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Message resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to update. | + **optional** | ***UpdateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Body** | **optional.String**| The text of the message you want to send. Can be up to 1,600 characters long. | + +### Return type + +[**ApiV2010AccountMessage**](api.v2010.account.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateOutgoingCallerId + +> ApiV2010AccountOutgoingCallerId UpdateOutgoingCallerId(ctx, AccountSid, Sid, optional) + + + +Updates the caller-id + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to update. | + **optional** | ***UpdateOutgoingCallerIdOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateOutgoingCallerIdOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ApiV2010AccountOutgoingCallerId**](api.v2010.account.outgoing_caller_id.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateParticipant + +> ApiV2010AccountConferenceParticipant UpdateParticipant(ctx, AccountSid, ConferenceSid, CallSid, optional) + + + +Update the properties of the participant + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to update. | +**ConferenceSid** | **string**| The SID of the conference with the participant to update. | +**CallSid** | **string**| The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to update. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20. | + **optional** | ***UpdateParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **AnnounceMethod** | **optional.String**| The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. | + **AnnounceUrl** | **optional.String**| The URL we call using the `announce_method` for an announcement to the participant. The URL must return an MP3 file, a WAV file, or a TwiML document that contains `<Play>` or `<Say>` commands. | + **BeepOnExit** | **optional.Bool**| Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. | + **CallSidToCoach** | **optional.String**| The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. | + **Coaching** | **optional.Bool**| Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. | + **EndConferenceOnExit** | **optional.Bool**| Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. | + **Hold** | **optional.Bool**| Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. | + **HoldMethod** | **optional.String**| The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. | + **HoldUrl** | **optional.String**| The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains the `<Play>`, `<Say>` or `<Redirect>` commands. | + **Muted** | **optional.Bool**| Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. | + **WaitMethod** | **optional.String**| The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | + **WaitUrl** | **optional.String**| The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | + +### Return type + +[**ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePayments + +> ApiV2010AccountCallPayments UpdatePayments(ctx, AccountSid, CallSid, Sid, optional) + + + +update an instance of payments with different phases of payment flows. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will update the resource. | +**CallSid** | **string**| The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource. | +**Sid** | **string**| The SID of Payments session that needs to be updated. | + **optional** | ***UpdatePaymentsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdatePaymentsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Capture** | **optional.String**| The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. | + **IdempotencyKey** | **optional.String**| A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. | + **Status** | **optional.String**| Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected <Pay> connector for processing. | + **StatusCallback** | **optional.String**| Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. | + +### Return type + +[**ApiV2010AccountCallPayments**](api.v2010.account.call.payments.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateQueue + +> ApiV2010AccountQueue UpdateQueue(ctx, AccountSid, Sid, optional) + + + +Update the queue with the new parameters + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Queue resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Queue resource to update | + **optional** | ***UpdateQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you created to describe this resource. It can be up to 64 characters long. | + **MaxSize** | **optional.Int32**| The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. | + +### Return type + +[**ApiV2010AccountQueue**](api.v2010.account.queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateShortCode + +> ApiV2010AccountShortCode UpdateShortCode(ctx, AccountSid, Sid, optional) + + + +Update a short code with the following parameters + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ShortCode resource to update | + **optional** | ***UpdateShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ApiVersion** | **optional.String**| The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. | + **SmsUrl** | **optional.String**| The URL we should call when receiving an incoming SMS message to this short code. | + +### Return type + +[**ApiV2010AccountShortCode**](api.v2010.account.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSigningKey + +> ApiV2010AccountSigningKey UpdateSigningKey(ctx, AccountSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateSigningKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSigningKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| | + +### Return type + +[**ApiV2010AccountSigningKey**](api.v2010.account.signing_key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSipCredential + +> ApiV2010AccountSipSipCredentialListSipCredential UpdateSipCredential(ctx, AccountSid, CredentialListSid, Sid, optional) + + + +Update a credential resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**CredentialListSid** | **string**| The unique id that identifies the credential list that includes this credential. | +**Sid** | **string**| The unique id that identifies the resource to update. | + **optional** | ***UpdateSipCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSipCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Password** | **optional.String**| The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) | + +### Return type + +[**ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSipCredentialList + +> ApiV2010AccountSipSipCredentialList UpdateSipCredentialList(ctx, AccountSid, Sid, optional) + + + +Update a Credential List + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the Account that is responsible for this resource. | +**Sid** | **string**| The credential list Sid that uniquely identifies this resource | + **optional** | ***UpdateSipCredentialListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSipCredentialListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A human readable descriptive text for a CredentialList, up to 64 characters long. | + +### Return type + +[**ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSipDomain + +> ApiV2010AccountSipSipDomain UpdateSipDomain(ctx, AccountSid, Sid, optional) + + + +Update the attributes of a domain + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the SipDomain resource to update. | + **optional** | ***UpdateSipDomainOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSipDomainOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ByocTrunkSid** | **optional.String**| The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. | + **DomainName** | **optional.String**| The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`. | + **EmergencyCallerSid** | **optional.String**| Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. | + **EmergencyCallingEnabled** | **optional.Bool**| Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. | + **FriendlyName** | **optional.String**| A descriptive string that you created to describe the resource. It can be up to 64 characters long. | + **Secure** | **optional.Bool**| Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. | + **SipRegistration** | **optional.Bool**| Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url` | + **VoiceStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. | + **VoiceStatusCallbackUrl** | **optional.String**| The URL that we should call to pass status parameters (such as call ended) to your application. | + **VoiceUrl** | **optional.String**| The URL we should call when the domain receives a call. | + +### Return type + +[**ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSipIpAccessControlList + +> ApiV2010AccountSipSipIpAccessControlList UpdateSipIpAccessControlList(ctx, AccountSid, Sid, optional) + + + +Rename an IpAccessControlList + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**Sid** | **string**| A 34 character string that uniquely identifies the resource to udpate. | + **optional** | ***UpdateSipIpAccessControlListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSipIpAccessControlListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A human readable descriptive text, up to 64 characters long. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSipIpAddress + +> ApiV2010AccountSipSipIpAccessControlListSipIpAddress UpdateSipIpAddress(ctx, AccountSid, IpAccessControlListSid, Sid, optional) + + + +Update an IpAddress resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource. | +**IpAccessControlListSid** | **string**| The IpAccessControlList Sid that identifies the IpAddress resources to update. | +**Sid** | **string**| A 34 character string that identifies the IpAddress resource to update. | + **optional** | ***UpdateSipIpAddressOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSipIpAddressOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **CidrPrefixLength** | **optional.Int32**| An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. | + **FriendlyName** | **optional.String**| A human readable descriptive text for this resource, up to 64 characters long. | + **IpAddress** | **optional.String**| An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. | + +### Return type + +[**ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUsageTrigger + +> ApiV2010AccountUsageUsageTrigger UpdateUsageTrigger(ctx, AccountSid, Sid, optional) + + + +Update an instance of a usage trigger + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountSid** | **string**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageTrigger resources to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the UsageTrigger resource to update. | + **optional** | ***UpdateUsageTriggerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUsageTriggerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CallbackMethod** | **optional.String**| The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. | + **CallbackUrl** | **optional.String**| The URL we should call using `callback_method` when the trigger fires. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v2010/docs/ListAccountResponse.md b/rest/api/v2010/docs/ListAccountResponse.md new file mode 100644 index 000000000..89ee9e6b6 --- /dev/null +++ b/rest/api/v2010/docs/ListAccountResponse.md @@ -0,0 +1,19 @@ +# ListAccountResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Accounts** | [**[]ApiV2010Account**](api.v2010.account.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAddressResponse.md b/rest/api/v2010/docs/ListAddressResponse.md new file mode 100644 index 000000000..38c53eab9 --- /dev/null +++ b/rest/api/v2010/docs/ListAddressResponse.md @@ -0,0 +1,19 @@ +# ListAddressResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Addresses** | [**[]ApiV2010AccountAddress**](api.v2010.account.address.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListApplicationResponse.md b/rest/api/v2010/docs/ListApplicationResponse.md new file mode 100644 index 000000000..9b32d0e8f --- /dev/null +++ b/rest/api/v2010/docs/ListApplicationResponse.md @@ -0,0 +1,19 @@ +# ListApplicationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Applications** | [**[]ApiV2010AccountApplication**](api.v2010.account.application.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md b/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md new file mode 100644 index 000000000..f120b5074 --- /dev/null +++ b/rest/api/v2010/docs/ListAuthorizedConnectAppResponse.md @@ -0,0 +1,19 @@ +# ListAuthorizedConnectAppResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizedConnectApps** | [**[]ApiV2010AccountAuthorizedConnectApp**](api.v2010.account.authorized_connect_app.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md new file mode 100644 index 000000000..0ef76f237 --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberCountryResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]ApiV2010AccountAvailablePhoneNumberCountry**](api.v2010.account.available_phone_number_country.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md new file mode 100644 index 000000000..91dcc1f27 --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberLocalResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberLocalResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal**](api.v2010.account.available_phone_number_country.available_phone_number_local.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md new file mode 100644 index 000000000..c94c1b09a --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberMachineToMachineResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberMachineToMachineResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine**](api.v2010.account.available_phone_number_country.available_phone_number_machine_to_machine.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md new file mode 100644 index 000000000..a93082007 --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberMobileResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberMobileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile**](api.v2010.account.available_phone_number_country.available_phone_number_mobile.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md new file mode 100644 index 000000000..8fb3c2df7 --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberNationalResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberNationalResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational**](api.v2010.account.available_phone_number_country.available_phone_number_national.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md new file mode 100644 index 000000000..662fccbbb --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberSharedCostResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberSharedCostResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost**](api.v2010.account.available_phone_number_country.available_phone_number_shared_cost.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md new file mode 100644 index 000000000..22d503444 --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberTollFreeResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberTollFreeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree**](api.v2010.account.available_phone_number_country.available_phone_number_toll_free.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md b/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md new file mode 100644 index 000000000..3bb1b8ebc --- /dev/null +++ b/rest/api/v2010/docs/ListAvailablePhoneNumberVoipResponse.md @@ -0,0 +1,19 @@ +# ListAvailablePhoneNumberVoipResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailablePhoneNumbers** | [**[]ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip**](api.v2010.account.available_phone_number_country.available_phone_number_voip.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListCallEventResponse.md b/rest/api/v2010/docs/ListCallEventResponse.md new file mode 100644 index 000000000..c88189774 --- /dev/null +++ b/rest/api/v2010/docs/ListCallEventResponse.md @@ -0,0 +1,19 @@ +# ListCallEventResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**Events** | [**[]ApiV2010AccountCallCallEvent**](api.v2010.account.call.call_event.md) | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListCallNotificationResponse.md b/rest/api/v2010/docs/ListCallNotificationResponse.md new file mode 100644 index 000000000..7c6f757e9 --- /dev/null +++ b/rest/api/v2010/docs/ListCallNotificationResponse.md @@ -0,0 +1,19 @@ +# ListCallNotificationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Notifications** | [**[]ApiV2010AccountCallCallNotification**](api.v2010.account.call.call_notification.md) | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListCallRecordingResponse.md b/rest/api/v2010/docs/ListCallRecordingResponse.md new file mode 100644 index 000000000..a9914d456 --- /dev/null +++ b/rest/api/v2010/docs/ListCallRecordingResponse.md @@ -0,0 +1,19 @@ +# ListCallRecordingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Recordings** | [**[]ApiV2010AccountCallCallRecording**](api.v2010.account.call.call_recording.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListCallResponse.md b/rest/api/v2010/docs/ListCallResponse.md new file mode 100644 index 000000000..d4832acff --- /dev/null +++ b/rest/api/v2010/docs/ListCallResponse.md @@ -0,0 +1,19 @@ +# ListCallResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Calls** | [**[]ApiV2010AccountCall**](api.v2010.account.call.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListConferenceRecordingResponse.md b/rest/api/v2010/docs/ListConferenceRecordingResponse.md new file mode 100644 index 000000000..a7ea565bc --- /dev/null +++ b/rest/api/v2010/docs/ListConferenceRecordingResponse.md @@ -0,0 +1,19 @@ +# ListConferenceRecordingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Recordings** | [**[]ApiV2010AccountConferenceConferenceRecording**](api.v2010.account.conference.conference_recording.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListConferenceResponse.md b/rest/api/v2010/docs/ListConferenceResponse.md new file mode 100644 index 000000000..106d7062b --- /dev/null +++ b/rest/api/v2010/docs/ListConferenceResponse.md @@ -0,0 +1,19 @@ +# ListConferenceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conferences** | [**[]ApiV2010AccountConference**](api.v2010.account.conference.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListConnectAppResponse.md b/rest/api/v2010/docs/ListConnectAppResponse.md new file mode 100644 index 000000000..b65e1eee0 --- /dev/null +++ b/rest/api/v2010/docs/ListConnectAppResponse.md @@ -0,0 +1,19 @@ +# ListConnectAppResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectApps** | [**[]ApiV2010AccountConnectApp**](api.v2010.account.connect_app.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md b/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md new file mode 100644 index 000000000..f688574fd --- /dev/null +++ b/rest/api/v2010/docs/ListDependentPhoneNumberResponse.md @@ -0,0 +1,19 @@ +# ListDependentPhoneNumberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DependentPhoneNumbers** | [**[]ApiV2010AccountAddressDependentPhoneNumber**](api.v2010.account.address.dependent_phone_number.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md new file mode 100644 index 000000000..2a8ef0813 --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnExtensionResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberAssignedAddOnExtensionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**Extensions** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.incoming_phone_number_assigned_add_on_extension.md) | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md new file mode 100644 index 000000000..2bfd4ba3a --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberAssignedAddOnResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberAssignedAddOnResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignedAddOns** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn**](api.v2010.account.incoming_phone_number.incoming_phone_number_assigned_add_on.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md new file mode 100644 index 000000000..893c38274 --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberLocalResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberLocalResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal**](api.v2010.account.incoming_phone_number.incoming_phone_number_local.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md new file mode 100644 index 000000000..367e928d4 --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberMobileResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberMobileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile**](api.v2010.account.incoming_phone_number.incoming_phone_number_mobile.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md new file mode 100644 index 000000000..7fcfd3739 --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumber**](api.v2010.account.incoming_phone_number.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md b/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md new file mode 100644 index 000000000..ad4a9a913 --- /dev/null +++ b/rest/api/v2010/docs/ListIncomingPhoneNumberTollFreeResponse.md @@ -0,0 +1,19 @@ +# ListIncomingPhoneNumberTollFreeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IncomingPhoneNumbers** | [**[]ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree**](api.v2010.account.incoming_phone_number.incoming_phone_number_toll_free.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListKeyResponse.md b/rest/api/v2010/docs/ListKeyResponse.md new file mode 100644 index 000000000..7a761a4e0 --- /dev/null +++ b/rest/api/v2010/docs/ListKeyResponse.md @@ -0,0 +1,19 @@ +# ListKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**Keys** | [**[]ApiV2010AccountKey**](api.v2010.account.key.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListMediaResponse.md b/rest/api/v2010/docs/ListMediaResponse.md new file mode 100644 index 000000000..85bfc12c2 --- /dev/null +++ b/rest/api/v2010/docs/ListMediaResponse.md @@ -0,0 +1,19 @@ +# ListMediaResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**MediaList** | [**[]ApiV2010AccountMessageMedia**](api.v2010.account.message.media.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListMemberResponse.md b/rest/api/v2010/docs/ListMemberResponse.md new file mode 100644 index 000000000..3550375bf --- /dev/null +++ b/rest/api/v2010/docs/ListMemberResponse.md @@ -0,0 +1,19 @@ +# ListMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**QueueMembers** | [**[]ApiV2010AccountQueueMember**](api.v2010.account.queue.member.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListMessageResponse.md b/rest/api/v2010/docs/ListMessageResponse.md new file mode 100644 index 000000000..7f92827e1 --- /dev/null +++ b/rest/api/v2010/docs/ListMessageResponse.md @@ -0,0 +1,19 @@ +# ListMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**Messages** | [**[]ApiV2010AccountMessage**](api.v2010.account.message.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListNotificationResponse.md b/rest/api/v2010/docs/ListNotificationResponse.md new file mode 100644 index 000000000..ed8b5ace1 --- /dev/null +++ b/rest/api/v2010/docs/ListNotificationResponse.md @@ -0,0 +1,19 @@ +# ListNotificationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Notifications** | [**[]ApiV2010AccountNotification**](api.v2010.account.notification.md) | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md b/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md new file mode 100644 index 000000000..dcbdab8cb --- /dev/null +++ b/rest/api/v2010/docs/ListOutgoingCallerIdResponse.md @@ -0,0 +1,19 @@ +# ListOutgoingCallerIdResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**OutgoingCallerIds** | [**[]ApiV2010AccountOutgoingCallerId**](api.v2010.account.outgoing_caller_id.md) | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListParticipantResponse.md b/rest/api/v2010/docs/ListParticipantResponse.md new file mode 100644 index 000000000..3cd1c5015 --- /dev/null +++ b/rest/api/v2010/docs/ListParticipantResponse.md @@ -0,0 +1,19 @@ +# ListParticipantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**Participants** | [**[]ApiV2010AccountConferenceParticipant**](api.v2010.account.conference.participant.md) | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListQueueResponse.md b/rest/api/v2010/docs/ListQueueResponse.md new file mode 100644 index 000000000..a8ddba31c --- /dev/null +++ b/rest/api/v2010/docs/ListQueueResponse.md @@ -0,0 +1,19 @@ +# ListQueueResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Queues** | [**[]ApiV2010AccountQueue**](api.v2010.account.queue.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md b/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md new file mode 100644 index 000000000..66e8fa141 --- /dev/null +++ b/rest/api/v2010/docs/ListRecordingAddOnResultPayloadResponse.md @@ -0,0 +1,19 @@ +# ListRecordingAddOnResultPayloadResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**Payloads** | [**[]ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload**](api.v2010.account.recording.recording_add_on_result.recording_add_on_result_payload.md) | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md b/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md new file mode 100644 index 000000000..021ed52ab --- /dev/null +++ b/rest/api/v2010/docs/ListRecordingAddOnResultResponse.md @@ -0,0 +1,19 @@ +# ListRecordingAddOnResultResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddOnResults** | [**[]ApiV2010AccountRecordingRecordingAddOnResult**](api.v2010.account.recording.recording_add_on_result.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListRecordingResponse.md b/rest/api/v2010/docs/ListRecordingResponse.md new file mode 100644 index 000000000..833d0217b --- /dev/null +++ b/rest/api/v2010/docs/ListRecordingResponse.md @@ -0,0 +1,19 @@ +# ListRecordingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Recordings** | [**[]ApiV2010AccountRecording**](api.v2010.account.recording.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md b/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md new file mode 100644 index 000000000..da8e28b04 --- /dev/null +++ b/rest/api/v2010/docs/ListRecordingTranscriptionResponse.md @@ -0,0 +1,19 @@ +# ListRecordingTranscriptionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Transcriptions** | [**[]ApiV2010AccountRecordingRecordingTranscription**](api.v2010.account.recording.recording_transcription.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListShortCodeResponse.md b/rest/api/v2010/docs/ListShortCodeResponse.md new file mode 100644 index 000000000..ed3e7631a --- /dev/null +++ b/rest/api/v2010/docs/ListShortCodeResponse.md @@ -0,0 +1,19 @@ +# ListShortCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**ShortCodes** | [**[]ApiV2010AccountShortCode**](api.v2010.account.short_code.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSigningKeyResponse.md b/rest/api/v2010/docs/ListSigningKeyResponse.md new file mode 100644 index 000000000..9c486fb8e --- /dev/null +++ b/rest/api/v2010/docs/ListSigningKeyResponse.md @@ -0,0 +1,19 @@ +# ListSigningKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**SigningKeys** | [**[]ApiV2010AccountSigningKey**](api.v2010.account.signing_key.md) | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md b/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md new file mode 100644 index 000000000..1d0b69ba0 --- /dev/null +++ b/rest/api/v2010/docs/ListSipAuthCallsCredentialListMappingResponse.md @@ -0,0 +1,19 @@ +# ListSipAuthCallsCredentialListMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_credential_list_mapping.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md b/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md new file mode 100644 index 000000000..652ca9b58 --- /dev/null +++ b/rest/api/v2010/docs/ListSipAuthCallsIpAccessControlListMappingResponse.md @@ -0,0 +1,19 @@ +# ListSipAuthCallsIpAccessControlListMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_calls.sip_auth_calls_ip_access_control_list_mapping.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md b/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md new file mode 100644 index 000000000..ebbe65b83 --- /dev/null +++ b/rest/api/v2010/docs/ListSipAuthRegistrationsCredentialListMappingResponse.md @@ -0,0 +1,19 @@ +# ListSipAuthRegistrationsCredentialListMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contents** | [**[]ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_auth.sip_auth_registrations.sip_auth_registrations_credential_list_mapping.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md b/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md new file mode 100644 index 000000000..aaecda8b7 --- /dev/null +++ b/rest/api/v2010/docs/ListSipCredentialListMappingResponse.md @@ -0,0 +1,19 @@ +# ListSipCredentialListMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListMappings** | [**[]ApiV2010AccountSipSipDomainSipCredentialListMapping**](api.v2010.account.sip.sip_domain.sip_credential_list_mapping.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipCredentialListResponse.md b/rest/api/v2010/docs/ListSipCredentialListResponse.md new file mode 100644 index 000000000..85e81dca9 --- /dev/null +++ b/rest/api/v2010/docs/ListSipCredentialListResponse.md @@ -0,0 +1,19 @@ +# ListSipCredentialListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialLists** | [**[]ApiV2010AccountSipSipCredentialList**](api.v2010.account.sip.sip_credential_list.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipCredentialResponse.md b/rest/api/v2010/docs/ListSipCredentialResponse.md new file mode 100644 index 000000000..ca7e635c1 --- /dev/null +++ b/rest/api/v2010/docs/ListSipCredentialResponse.md @@ -0,0 +1,19 @@ +# ListSipCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ApiV2010AccountSipSipCredentialListSipCredential**](api.v2010.account.sip.sip_credential_list.sip_credential.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipDomainResponse.md b/rest/api/v2010/docs/ListSipDomainResponse.md new file mode 100644 index 000000000..2b680abc6 --- /dev/null +++ b/rest/api/v2010/docs/ListSipDomainResponse.md @@ -0,0 +1,19 @@ +# ListSipDomainResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domains** | [**[]ApiV2010AccountSipSipDomain**](api.v2010.account.sip.sip_domain.md) | | [optional] +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md b/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md new file mode 100644 index 000000000..232056eea --- /dev/null +++ b/rest/api/v2010/docs/ListSipIpAccessControlListMappingResponse.md @@ -0,0 +1,19 @@ +# ListSipIpAccessControlListMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IpAccessControlListMappings** | [**[]ApiV2010AccountSipSipDomainSipIpAccessControlListMapping**](api.v2010.account.sip.sip_domain.sip_ip_access_control_list_mapping.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md b/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md new file mode 100644 index 000000000..ea6381bc0 --- /dev/null +++ b/rest/api/v2010/docs/ListSipIpAccessControlListResponse.md @@ -0,0 +1,19 @@ +# ListSipIpAccessControlListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IpAccessControlLists** | [**[]ApiV2010AccountSipSipIpAccessControlList**](api.v2010.account.sip.sip_ip_access_control_list.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListSipIpAddressResponse.md b/rest/api/v2010/docs/ListSipIpAddressResponse.md new file mode 100644 index 000000000..ee68a1f93 --- /dev/null +++ b/rest/api/v2010/docs/ListSipIpAddressResponse.md @@ -0,0 +1,19 @@ +# ListSipIpAddressResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**IpAddresses** | [**[]ApiV2010AccountSipSipIpAccessControlListSipIpAddress**](api.v2010.account.sip.sip_ip_access_control_list.sip_ip_address.md) | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListTranscriptionResponse.md b/rest/api/v2010/docs/ListTranscriptionResponse.md new file mode 100644 index 000000000..1f7338394 --- /dev/null +++ b/rest/api/v2010/docs/ListTranscriptionResponse.md @@ -0,0 +1,19 @@ +# ListTranscriptionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Transcriptions** | [**[]ApiV2010AccountTranscription**](api.v2010.account.transcription.md) | | [optional] +**Uri** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md b/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md new file mode 100644 index 000000000..2760ae88e --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordAllTimeResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordAllTimeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordAllTime**](api.v2010.account.usage.usage_record.usage_record_all_time.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordDailyResponse.md b/rest/api/v2010/docs/ListUsageRecordDailyResponse.md new file mode 100644 index 000000000..6b1772a14 --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordDailyResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordDailyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordDaily**](api.v2010.account.usage.usage_record.usage_record_daily.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md b/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md new file mode 100644 index 000000000..25b845704 --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordLastMonthResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordLastMonthResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordLastMonth**](api.v2010.account.usage.usage_record.usage_record_last_month.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md b/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md new file mode 100644 index 000000000..82fc8e66e --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordMonthlyResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordMonthlyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordMonthly**](api.v2010.account.usage.usage_record.usage_record_monthly.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordResponse.md b/rest/api/v2010/docs/ListUsageRecordResponse.md new file mode 100644 index 000000000..eb29141a6 --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecord**](api.v2010.account.usage.usage_record.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md b/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md new file mode 100644 index 000000000..2501fecc1 --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordThisMonthResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordThisMonthResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordThisMonth**](api.v2010.account.usage.usage_record.usage_record_this_month.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordTodayResponse.md b/rest/api/v2010/docs/ListUsageRecordTodayResponse.md new file mode 100644 index 000000000..1c89b7a53 --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordTodayResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordTodayResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordToday**](api.v2010.account.usage.usage_record.usage_record_today.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md b/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md new file mode 100644 index 000000000..d4601e62f --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordYearlyResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordYearlyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYearly**](api.v2010.account.usage.usage_record.usage_record_yearly.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md b/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md new file mode 100644 index 000000000..901f4c88a --- /dev/null +++ b/rest/api/v2010/docs/ListUsageRecordYesterdayResponse.md @@ -0,0 +1,19 @@ +# ListUsageRecordYesterdayResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageRecords** | [**[]ApiV2010AccountUsageUsageRecordUsageRecordYesterday**](api.v2010.account.usage.usage_record.usage_record_yesterday.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/ListUsageTriggerResponse.md b/rest/api/v2010/docs/ListUsageTriggerResponse.md new file mode 100644 index 000000000..a949851bf --- /dev/null +++ b/rest/api/v2010/docs/ListUsageTriggerResponse.md @@ -0,0 +1,19 @@ +# ListUsageTriggerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**End** | **int32** | | [optional] +**FirstPageUri** | **string** | | [optional] +**NextPageUri** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUri** | **string** | | [optional] +**Start** | **int32** | | [optional] +**Uri** | **string** | | [optional] +**UsageTriggers** | [**[]ApiV2010AccountUsageUsageTrigger**](api.v2010.account.usage.usage_trigger.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateAccountRequest.md b/rest/api/v2010/docs/UpdateAccountRequest.md new file mode 100644 index 000000000..17f07790b --- /dev/null +++ b/rest/api/v2010/docs/UpdateAccountRequest.md @@ -0,0 +1,12 @@ +# UpdateAccountRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | Update the human-readable description of this Account | [optional] +**Status** | **string** | Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateAddressRequest.md b/rest/api/v2010/docs/UpdateAddressRequest.md new file mode 100644 index 000000000..90b9edeba --- /dev/null +++ b/rest/api/v2010/docs/UpdateAddressRequest.md @@ -0,0 +1,18 @@ +# UpdateAddressRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AutoCorrectAddress** | **bool** | Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. | [optional] +**City** | **string** | The city of the address. | [optional] +**CustomerName** | **string** | The name to associate with the address. | [optional] +**EmergencyEnabled** | **bool** | Whether to enable emergency calling on the address. Can be: `true` or `false`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the address. It can be up to 64 characters long. | [optional] +**PostalCode** | **string** | The postal code of the address. | [optional] +**Region** | **string** | The state or region of the address. | [optional] +**Street** | **string** | The number and street address of the address. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateApplicationRequest.md b/rest/api/v2010/docs/UpdateApplicationRequest.md new file mode 100644 index 000000000..d1e973ed0 --- /dev/null +++ b/rest/api/v2010/docs/UpdateApplicationRequest.md @@ -0,0 +1,25 @@ +# UpdateApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiVersion** | **string** | The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**MessageStatusCallback** | **string** | The URL we should call using a POST method to send message status information to your application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. | [optional] +**SmsStatusCallback** | **string** | Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. | [optional] +**SmsUrl** | **string** | The URL we should call when the phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | [optional] +**VoiceUrl** | **string** | The URL we should call when the phone number assigned to this application receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateCallFeedbackRequest.md b/rest/api/v2010/docs/UpdateCallFeedbackRequest.md new file mode 100644 index 000000000..cb9749cb1 --- /dev/null +++ b/rest/api/v2010/docs/UpdateCallFeedbackRequest.md @@ -0,0 +1,12 @@ +# UpdateCallFeedbackRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Issue** | **[]string** | One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. | [optional] +**QualityScore** | **int32** | The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateCallRecordingRequest.md b/rest/api/v2010/docs/UpdateCallRecordingRequest.md new file mode 100644 index 000000000..a3a179074 --- /dev/null +++ b/rest/api/v2010/docs/UpdateCallRecordingRequest.md @@ -0,0 +1,12 @@ +# UpdateCallRecordingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PauseBehavior** | **string** | Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. | [optional] +**Status** | **string** | The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateCallRequest.md b/rest/api/v2010/docs/UpdateCallRequest.md new file mode 100644 index 000000000..f5e9156ec --- /dev/null +++ b/rest/api/v2010/docs/UpdateCallRequest.md @@ -0,0 +1,18 @@ +# UpdateCallRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FallbackMethod** | **string** | The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**FallbackUrl** | **string** | The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**Method** | **string** | The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**Status** | **string** | The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. | [optional] +**Twiml** | **string** | TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive | [optional] +**Url** | **string** | The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateConferenceRecordingRequest.md b/rest/api/v2010/docs/UpdateConferenceRecordingRequest.md new file mode 100644 index 000000000..5775f2976 --- /dev/null +++ b/rest/api/v2010/docs/UpdateConferenceRecordingRequest.md @@ -0,0 +1,12 @@ +# UpdateConferenceRecordingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PauseBehavior** | **string** | Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. | [optional] +**Status** | **string** | The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateConferenceRequest.md b/rest/api/v2010/docs/UpdateConferenceRequest.md new file mode 100644 index 000000000..02f75b1f4 --- /dev/null +++ b/rest/api/v2010/docs/UpdateConferenceRequest.md @@ -0,0 +1,13 @@ +# UpdateConferenceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AnnounceMethod** | **string** | The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` | [optional] +**AnnounceUrl** | **string** | The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `<Play>` or `<Say>`. | [optional] +**Status** | **string** | The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateConnectAppRequest.md b/rest/api/v2010/docs/UpdateConnectAppRequest.md new file mode 100644 index 000000000..74bc22f41 --- /dev/null +++ b/rest/api/v2010/docs/UpdateConnectAppRequest.md @@ -0,0 +1,18 @@ +# UpdateConnectAppRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizeRedirectUrl** | **string** | The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. | [optional] +**CompanyName** | **string** | The company name to set for the Connect App. | [optional] +**DeauthorizeCallbackMethod** | **string** | The HTTP method to use when calling `deauthorize_callback_url`. | [optional] +**DeauthorizeCallbackUrl** | **string** | The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. | [optional] +**Description** | **string** | A description of the Connect App. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**HomepageUrl** | **string** | A public URL where users can obtain more information about this Connect App. | [optional] +**Permissions** | **[]string** | A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateIncomingPhoneNumberRequest.md b/rest/api/v2010/docs/UpdateIncomingPhoneNumberRequest.md new file mode 100644 index 000000000..e5d5c5cf9 --- /dev/null +++ b/rest/api/v2010/docs/UpdateIncomingPhoneNumberRequest.md @@ -0,0 +1,33 @@ +# UpdateIncomingPhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). | [optional] +**AddressSid** | **string** | The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. | [optional] +**ApiVersion** | **string** | The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. | [optional] +**BundleSid** | **string** | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. | [optional] +**EmergencyAddressSid** | **string** | The SID of the emergency address configuration to use for emergency calling from this phone number. | [optional] +**EmergencyStatus** | **string** | The configuration status parameter that determines whether the phone number is enabled for emergency calling. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. | [optional] +**IdentitySid** | **string** | The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. | [optional] +**SmsApplicationSid** | **string** | The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when the phone number receives an incoming SMS message. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**TrunkSid** | **string** | The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. | [optional] +**VoiceApplicationSid** | **string** | The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. | [optional] +**VoiceCallerIdLookup** | **bool** | Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. | [optional] +**VoiceMethod** | **string** | The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**VoiceReceiveMode** | **string** | The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. | [optional] +**VoiceUrl** | **string** | The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateKeyRequest.md b/rest/api/v2010/docs/UpdateKeyRequest.md new file mode 100644 index 000000000..d1d7f3713 --- /dev/null +++ b/rest/api/v2010/docs/UpdateKeyRequest.md @@ -0,0 +1,11 @@ +# UpdateKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateMemberRequest.md b/rest/api/v2010/docs/UpdateMemberRequest.md new file mode 100644 index 000000000..3b0e1d818 --- /dev/null +++ b/rest/api/v2010/docs/UpdateMemberRequest.md @@ -0,0 +1,12 @@ +# UpdateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | **string** | How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. | [optional] +**Url** | **string** | The absolute URL of the Queue resource. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateMessageRequest.md b/rest/api/v2010/docs/UpdateMessageRequest.md new file mode 100644 index 000000000..6bf17c714 --- /dev/null +++ b/rest/api/v2010/docs/UpdateMessageRequest.md @@ -0,0 +1,11 @@ +# UpdateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Body** | **string** | The text of the message you want to send. Can be up to 1,600 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateOutgoingCallerIdRequest.md b/rest/api/v2010/docs/UpdateOutgoingCallerIdRequest.md new file mode 100644 index 000000000..ffb3dc5c2 --- /dev/null +++ b/rest/api/v2010/docs/UpdateOutgoingCallerIdRequest.md @@ -0,0 +1,11 @@ +# UpdateOutgoingCallerIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateParticipantRequest.md b/rest/api/v2010/docs/UpdateParticipantRequest.md new file mode 100644 index 000000000..09437fd09 --- /dev/null +++ b/rest/api/v2010/docs/UpdateParticipantRequest.md @@ -0,0 +1,22 @@ +# UpdateParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AnnounceMethod** | **string** | The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**AnnounceUrl** | **string** | The URL we call using the `announce_method` for an announcement to the participant. The URL must return an MP3 file, a WAV file, or a TwiML document that contains `<Play>` or `<Say>` commands. | [optional] +**BeepOnExit** | **bool** | Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. | [optional] +**CallSidToCoach** | **string** | The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. | [optional] +**Coaching** | **bool** | Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. | [optional] +**EndConferenceOnExit** | **bool** | Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. | [optional] +**Hold** | **bool** | Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. | [optional] +**HoldMethod** | **string** | The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. | [optional] +**HoldUrl** | **string** | The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains the `<Play>`, `<Say>` or `<Redirect>` commands. | [optional] +**Muted** | **bool** | Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. | [optional] +**WaitMethod** | **string** | The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | [optional] +**WaitUrl** | **string** | The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdatePaymentsRequest.md b/rest/api/v2010/docs/UpdatePaymentsRequest.md new file mode 100644 index 000000000..15045c2d9 --- /dev/null +++ b/rest/api/v2010/docs/UpdatePaymentsRequest.md @@ -0,0 +1,14 @@ +# UpdatePaymentsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Capture** | **string** | The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. | [optional] +**IdempotencyKey** | **string** | A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. | +**Status** | **string** | Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected <Pay> connector for processing. | [optional] +**StatusCallback** | **string** | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateQueueRequest.md b/rest/api/v2010/docs/UpdateQueueRequest.md new file mode 100644 index 000000000..f99fd271a --- /dev/null +++ b/rest/api/v2010/docs/UpdateQueueRequest.md @@ -0,0 +1,12 @@ +# UpdateQueueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you created to describe this resource. It can be up to 64 characters long. | [optional] +**MaxSize** | **int32** | The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateShortCodeRequest.md b/rest/api/v2010/docs/UpdateShortCodeRequest.md new file mode 100644 index 000000000..a54284107 --- /dev/null +++ b/rest/api/v2010/docs/UpdateShortCodeRequest.md @@ -0,0 +1,16 @@ +# UpdateShortCodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiVersion** | **string** | The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call when receiving an incoming SMS message to this short code. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSigningKeyRequest.md b/rest/api/v2010/docs/UpdateSigningKeyRequest.md new file mode 100644 index 000000000..35c58ef9d --- /dev/null +++ b/rest/api/v2010/docs/UpdateSigningKeyRequest.md @@ -0,0 +1,11 @@ +# UpdateSigningKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSipCredentialListRequest.md b/rest/api/v2010/docs/UpdateSipCredentialListRequest.md new file mode 100644 index 000000000..c3d94e562 --- /dev/null +++ b/rest/api/v2010/docs/UpdateSipCredentialListRequest.md @@ -0,0 +1,11 @@ +# UpdateSipCredentialListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A human readable descriptive text for a CredentialList, up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSipCredentialRequest.md b/rest/api/v2010/docs/UpdateSipCredentialRequest.md new file mode 100644 index 000000000..0557ea061 --- /dev/null +++ b/rest/api/v2010/docs/UpdateSipCredentialRequest.md @@ -0,0 +1,11 @@ +# UpdateSipCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | **string** | The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSipDomainRequest.md b/rest/api/v2010/docs/UpdateSipDomainRequest.md new file mode 100644 index 000000000..660de924f --- /dev/null +++ b/rest/api/v2010/docs/UpdateSipDomainRequest.md @@ -0,0 +1,23 @@ +# UpdateSipDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ByocTrunkSid** | **string** | The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. | [optional] +**DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \"-\" and must end with `sip.twilio.com`. | [optional] +**EmergencyCallerSid** | **string** | Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. | [optional] +**EmergencyCallingEnabled** | **bool** | Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. | [optional] +**FriendlyName** | **string** | A descriptive string that you created to describe the resource. It can be up to 64 characters long. | [optional] +**Secure** | **bool** | Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. | [optional] +**SipRegistration** | **bool** | Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url` | [optional] +**VoiceStatusCallbackMethod** | **string** | The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceStatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. | [optional] +**VoiceUrl** | **string** | The URL we should call when the domain receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSipIpAccessControlListRequest.md b/rest/api/v2010/docs/UpdateSipIpAccessControlListRequest.md new file mode 100644 index 000000000..846b74465 --- /dev/null +++ b/rest/api/v2010/docs/UpdateSipIpAccessControlListRequest.md @@ -0,0 +1,11 @@ +# UpdateSipIpAccessControlListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A human readable descriptive text, up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateSipIpAddressRequest.md b/rest/api/v2010/docs/UpdateSipIpAddressRequest.md new file mode 100644 index 000000000..35496c908 --- /dev/null +++ b/rest/api/v2010/docs/UpdateSipIpAddressRequest.md @@ -0,0 +1,13 @@ +# UpdateSipIpAddressRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CidrPrefixLength** | **int32** | An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. | [optional] +**FriendlyName** | **string** | A human readable descriptive text for this resource, up to 64 characters long. | [optional] +**IpAddress** | **string** | An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/docs/UpdateUsageTriggerRequest.md b/rest/api/v2010/docs/UpdateUsageTriggerRequest.md new file mode 100644 index 000000000..1e10b6eda --- /dev/null +++ b/rest/api/v2010/docs/UpdateUsageTriggerRequest.md @@ -0,0 +1,13 @@ +# UpdateUsageTriggerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**CallbackUrl** | **string** | The URL we should call using `callback_method` when the trigger fires. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v2010/model_api_v2010_account.go b/rest/api/v2010/model_api_v2010_account.go new file mode 100644 index 000000000..7dbdefb81 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account.go @@ -0,0 +1,24 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010Account struct for ApiV2010Account +type ApiV2010Account struct { + AuthToken string `json:"AuthToken,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + OwnerAccountSid string `json:"OwnerAccountSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Type string `json:"Type,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_address.go b/rest/api/v2010/model_api_v2010_account_address.go new file mode 100644 index 000000000..d71ca7f47 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_address.go @@ -0,0 +1,29 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAddress struct for ApiV2010AccountAddress +type ApiV2010AccountAddress struct { + AccountSid string `json:"AccountSid,omitempty"` + City string `json:"City,omitempty"` + CustomerName string `json:"CustomerName,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyEnabled bool `json:"EmergencyEnabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + Region string `json:"Region,omitempty"` + Sid string `json:"Sid,omitempty"` + Street string `json:"Street,omitempty"` + Uri string `json:"Uri,omitempty"` + Validated bool `json:"Validated,omitempty"` + Verified bool `json:"Verified,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go b/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go new file mode 100644 index 000000000..97baaadc9 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_address_dependent_phone_number.go @@ -0,0 +1,40 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAddressDependentPhoneNumber struct for ApiV2010AccountAddressDependentPhoneNumber +type ApiV2010AccountAddressDependentPhoneNumber struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_application.go b/rest/api/v2010/model_api_v2010_account_application.go new file mode 100644 index 000000000..a7415bc58 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_application.go @@ -0,0 +1,34 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountApplication struct for ApiV2010AccountApplication +type ApiV2010AccountApplication struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + MessageStatusCallback string `json:"MessageStatusCallback,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsStatusCallback string `json:"SmsStatusCallback,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go b/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go new file mode 100644 index 000000000..a71197120 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_authorized_connect_app.go @@ -0,0 +1,24 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAuthorizedConnectApp struct for ApiV2010AccountAuthorizedConnectApp +type ApiV2010AccountAuthorizedConnectApp struct { + AccountSid string `json:"AccountSid,omitempty"` + ConnectAppCompanyName string `json:"ConnectAppCompanyName,omitempty"` + ConnectAppDescription string `json:"ConnectAppDescription,omitempty"` + ConnectAppFriendlyName string `json:"ConnectAppFriendlyName,omitempty"` + ConnectAppHomepageUrl string `json:"ConnectAppHomepageUrl,omitempty"` + ConnectAppSid string `json:"ConnectAppSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go new file mode 100644 index 000000000..48c7a90f9 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountry struct for ApiV2010AccountAvailablePhoneNumberCountry +type ApiV2010AccountAvailablePhoneNumberCountry struct { + Beta bool `json:"Beta,omitempty"` + Country string `json:"Country,omitempty"` + CountryCode string `json:"CountryCode,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go new file mode 100644 index 000000000..b425d195e --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_local.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go new file mode 100644 index 000000000..69fecc900 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_machine_to_machine.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go new file mode 100644 index 000000000..c46f9d140 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_mobile.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go new file mode 100644 index 000000000..d3f16c43b --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_national.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go new file mode 100644 index 000000000..f85779358 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_shared_cost.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go new file mode 100644 index 000000000..55892f300 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_toll_free.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go new file mode 100644 index 000000000..77ec510fd --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_available_phone_number_country_available_phone_number_voip.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct for ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip +type ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip struct { + AddressRequirements string `json:"AddressRequirements,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Lata string `json:"Lata,omitempty"` + Latitude float32 `json:"Latitude,omitempty"` + Locality string `json:"Locality,omitempty"` + Longitude float32 `json:"Longitude,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PostalCode string `json:"PostalCode,omitempty"` + RateCenter string `json:"RateCenter,omitempty"` + Region string `json:"Region,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_balance.go b/rest/api/v2010/model_api_v2010_account_balance.go new file mode 100644 index 000000000..02a779b4a --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_balance.go @@ -0,0 +1,17 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountBalance struct for ApiV2010AccountBalance +type ApiV2010AccountBalance struct { + AccountSid string `json:"AccountSid,omitempty"` + Balance string `json:"Balance,omitempty"` + Currency string `json:"Currency,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call.go b/rest/api/v2010/model_api_v2010_account_call.go new file mode 100644 index 000000000..6f31875b1 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call.go @@ -0,0 +1,41 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCall struct for ApiV2010AccountCall +type ApiV2010AccountCall struct { + AccountSid string `json:"AccountSid,omitempty"` + Annotation string `json:"Annotation,omitempty"` + AnsweredBy string `json:"AnsweredBy,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallerName string `json:"CallerName,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Direction *string `json:"Direction,omitempty"` + Duration string `json:"Duration,omitempty"` + EndTime string `json:"EndTime,omitempty"` + ForwardedFrom string `json:"ForwardedFrom,omitempty"` + From string `json:"From,omitempty"` + FromFormatted string `json:"FromFormatted,omitempty"` + GroupSid string `json:"GroupSid,omitempty"` + ParentCallSid string `json:"ParentCallSid,omitempty"` + PhoneNumberSid string `json:"PhoneNumberSid,omitempty"` + Price *string `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + QueueTime string `json:"QueueTime,omitempty"` + Sid string `json:"Sid,omitempty"` + StartTime string `json:"StartTime,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + To string `json:"To,omitempty"` + ToFormatted string `json:"ToFormatted,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_event.go b/rest/api/v2010/model_api_v2010_account_call_call_event.go new file mode 100644 index 000000000..a94eafeba --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_event.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallCallEvent struct for ApiV2010AccountCallCallEvent +type ApiV2010AccountCallCallEvent struct { + Request map[string]interface{} `json:"Request,omitempty"` + Response map[string]interface{} `json:"Response,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_feedback.go b/rest/api/v2010/model_api_v2010_account_call_call_feedback.go new file mode 100644 index 000000000..4dfb907fe --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_feedback.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallCallFeedback struct for ApiV2010AccountCallCallFeedback +type ApiV2010AccountCallCallFeedback struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Issues []string `json:"Issues,omitempty"` + QualityScore int32 `json:"QualityScore,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go b/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go new file mode 100644 index 000000000..d37725dec --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_feedback_summary.go @@ -0,0 +1,31 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountCallCallFeedbackSummary struct for ApiV2010AccountCallCallFeedbackSummary +type ApiV2010AccountCallCallFeedbackSummary struct { + AccountSid string `json:"AccountSid,omitempty"` + CallCount int32 `json:"CallCount,omitempty"` + CallFeedbackCount int32 `json:"CallFeedbackCount,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + IncludeSubaccounts bool `json:"IncludeSubaccounts,omitempty"` + Issues []map[string]interface{} `json:"Issues,omitempty"` + QualityScoreAverage float32 `json:"QualityScoreAverage,omitempty"` + QualityScoreMedian float32 `json:"QualityScoreMedian,omitempty"` + QualityScoreStandardDeviation float32 `json:"QualityScoreStandardDeviation,omitempty"` + Sid string `json:"Sid,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + Status string `json:"Status,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_notification.go b/rest/api/v2010/model_api_v2010_account_call_call_notification.go new file mode 100644 index 000000000..38535627b --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_notification.go @@ -0,0 +1,28 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallCallNotification struct for ApiV2010AccountCallCallNotification +type ApiV2010AccountCallCallNotification struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + Log string `json:"Log,omitempty"` + MessageDate string `json:"MessageDate,omitempty"` + MessageText string `json:"MessageText,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go b/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go new file mode 100644 index 000000000..8a66dc59f --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_notification_instance.go @@ -0,0 +1,31 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallCallNotificationInstance struct for ApiV2010AccountCallCallNotificationInstance +type ApiV2010AccountCallCallNotificationInstance struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + Log string `json:"Log,omitempty"` + MessageDate string `json:"MessageDate,omitempty"` + MessageText string `json:"MessageText,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + RequestVariables string `json:"RequestVariables,omitempty"` + ResponseBody string `json:"ResponseBody,omitempty"` + ResponseHeaders string `json:"ResponseHeaders,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_call_recording.go b/rest/api/v2010/model_api_v2010_account_call_call_recording.go new file mode 100644 index 000000000..af36b8b12 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_call_recording.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallCallRecording struct for ApiV2010AccountCallCallRecording +type ApiV2010AccountCallCallRecording struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + Channels int32 `json:"Channels,omitempty"` + ConferenceSid string `json:"ConferenceSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Duration string `json:"Duration,omitempty"` + EncryptionDetails map[string]interface{} `json:"EncryptionDetails,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Sid string `json:"Sid,omitempty"` + Source string `json:"Source,omitempty"` + StartTime string `json:"StartTime,omitempty"` + Status string `json:"Status,omitempty"` + Track string `json:"Track,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_call_payments.go b/rest/api/v2010/model_api_v2010_account_call_payments.go new file mode 100644 index 000000000..f761aaf30 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_call_payments.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountCallPayments struct for ApiV2010AccountCallPayments +type ApiV2010AccountCallPayments struct { + AccountSid string `json:"AccountSid,omitempty"` + CallSid string `json:"CallSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_conference.go b/rest/api/v2010/model_api_v2010_account_conference.go new file mode 100644 index 000000000..9f49522f8 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_conference.go @@ -0,0 +1,26 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountConference struct for ApiV2010AccountConference +type ApiV2010AccountConference struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSidEndingConference string `json:"CallSidEndingConference,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ReasonConferenceEnded string `json:"ReasonConferenceEnded,omitempty"` + Region string `json:"Region,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go b/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go new file mode 100644 index 000000000..87cd4de85 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_conference_conference_recording.go @@ -0,0 +1,31 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountConferenceConferenceRecording struct for ApiV2010AccountConferenceConferenceRecording +type ApiV2010AccountConferenceConferenceRecording struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + Channels int32 `json:"Channels,omitempty"` + ConferenceSid string `json:"ConferenceSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Duration string `json:"Duration,omitempty"` + EncryptionDetails map[string]interface{} `json:"EncryptionDetails,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Sid string `json:"Sid,omitempty"` + Source string `json:"Source,omitempty"` + StartTime string `json:"StartTime,omitempty"` + Status string `json:"Status,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_conference_participant.go b/rest/api/v2010/model_api_v2010_account_conference_participant.go new file mode 100644 index 000000000..44a2bb824 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_conference_participant.go @@ -0,0 +1,28 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountConferenceParticipant struct for ApiV2010AccountConferenceParticipant +type ApiV2010AccountConferenceParticipant struct { + AccountSid string `json:"AccountSid,omitempty"` + CallSid string `json:"CallSid,omitempty"` + CallSidToCoach string `json:"CallSidToCoach,omitempty"` + Coaching bool `json:"Coaching,omitempty"` + ConferenceSid string `json:"ConferenceSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EndConferenceOnExit bool `json:"EndConferenceOnExit,omitempty"` + Hold bool `json:"Hold,omitempty"` + Label string `json:"Label,omitempty"` + Muted bool `json:"Muted,omitempty"` + StartConferenceOnEnter bool `json:"StartConferenceOnEnter,omitempty"` + Status string `json:"Status,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_connect_app.go b/rest/api/v2010/model_api_v2010_account_connect_app.go new file mode 100644 index 000000000..7bbaedc76 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_connect_app.go @@ -0,0 +1,25 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountConnectApp struct for ApiV2010AccountConnectApp +type ApiV2010AccountConnectApp struct { + AccountSid string `json:"AccountSid,omitempty"` + AuthorizeRedirectUrl string `json:"AuthorizeRedirectUrl,omitempty"` + CompanyName string `json:"CompanyName,omitempty"` + DeauthorizeCallbackMethod string `json:"DeauthorizeCallbackMethod,omitempty"` + DeauthorizeCallbackUrl string `json:"DeauthorizeCallbackUrl,omitempty"` + Description string `json:"Description,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + HomepageUrl string `json:"HomepageUrl,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go new file mode 100644 index 000000000..94a957d8e --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number.go @@ -0,0 +1,47 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumber struct for ApiV2010AccountIncomingPhoneNumber +type ApiV2010AccountIncomingPhoneNumber struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Beta bool `json:"Beta,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IdentitySid string `json:"IdentitySid,omitempty"` + Origin string `json:"Origin,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go new file mode 100644 index 000000000..d45e24918 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on.go @@ -0,0 +1,25 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn +type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn struct { + AccountSid string `json:"AccountSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go new file mode 100644 index 000000000..d1e37f86d --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_assigned_add_on_incoming_phone_number_assigned_add_on_extension.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension +type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension struct { + AccountSid string `json:"AccountSid,omitempty"` + AssignedAddOnSid string `json:"AssignedAddOnSid,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ProductName string `json:"ProductName,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go new file mode 100644 index 000000000..ef2e69def --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_local.go @@ -0,0 +1,47 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal +type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Beta bool `json:"Beta,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IdentitySid string `json:"IdentitySid,omitempty"` + Origin string `json:"Origin,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go new file mode 100644 index 000000000..b0847196c --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_mobile.go @@ -0,0 +1,47 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile +type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Beta bool `json:"Beta,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IdentitySid string `json:"IdentitySid,omitempty"` + Origin string `json:"Origin,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go new file mode 100644 index 000000000..4b4eaa356 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_incoming_phone_number_incoming_phone_number_toll_free.go @@ -0,0 +1,47 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct for ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree +type ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Beta bool `json:"Beta,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IdentitySid string `json:"IdentitySid,omitempty"` + Origin string `json:"Origin,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_key.go b/rest/api/v2010/model_api_v2010_account_key.go new file mode 100644 index 000000000..61c71b87d --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_key.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountKey struct for ApiV2010AccountKey +type ApiV2010AccountKey struct { + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_message.go b/rest/api/v2010/model_api_v2010_account_message.go new file mode 100644 index 000000000..cb1c3346f --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_message.go @@ -0,0 +1,34 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountMessage struct for ApiV2010AccountMessage +type ApiV2010AccountMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Body string `json:"Body,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateSent string `json:"DateSent,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Direction string `json:"Direction,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + ErrorMessage string `json:"ErrorMessage,omitempty"` + From string `json:"From,omitempty"` + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + NumMedia string `json:"NumMedia,omitempty"` + NumSegments string `json:"NumSegments,omitempty"` + Price string `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + To string `json:"To,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_message_media.go b/rest/api/v2010/model_api_v2010_account_message_media.go new file mode 100644 index 000000000..73d592aff --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_message_media.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountMessageMedia struct for ApiV2010AccountMessageMedia +type ApiV2010AccountMessageMedia struct { + AccountSid string `json:"AccountSid,omitempty"` + ContentType string `json:"ContentType,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ParentSid string `json:"ParentSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_message_message_feedback.go b/rest/api/v2010/model_api_v2010_account_message_message_feedback.go new file mode 100644 index 000000000..95a6bc2fd --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_message_message_feedback.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountMessageMessageFeedback struct for ApiV2010AccountMessageMessageFeedback +type ApiV2010AccountMessageMessageFeedback struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + MessageSid string `json:"MessageSid,omitempty"` + Outcome string `json:"Outcome,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_new_key.go b/rest/api/v2010/model_api_v2010_account_new_key.go new file mode 100644 index 000000000..c48cb313b --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_new_key.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountNewKey struct for ApiV2010AccountNewKey +type ApiV2010AccountNewKey struct { + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Secret string `json:"Secret,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_new_signing_key.go b/rest/api/v2010/model_api_v2010_account_new_signing_key.go new file mode 100644 index 000000000..0a2a0d5c8 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_new_signing_key.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountNewSigningKey struct for ApiV2010AccountNewSigningKey +type ApiV2010AccountNewSigningKey struct { + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Secret string `json:"Secret,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_notification.go b/rest/api/v2010/model_api_v2010_account_notification.go new file mode 100644 index 000000000..a29c9839e --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_notification.go @@ -0,0 +1,28 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountNotification struct for ApiV2010AccountNotification +type ApiV2010AccountNotification struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + Log string `json:"Log,omitempty"` + MessageDate string `json:"MessageDate,omitempty"` + MessageText string `json:"MessageText,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_notification_instance.go b/rest/api/v2010/model_api_v2010_account_notification_instance.go new file mode 100644 index 000000000..9542a9e28 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_notification_instance.go @@ -0,0 +1,31 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountNotificationInstance struct for ApiV2010AccountNotificationInstance +type ApiV2010AccountNotificationInstance struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + Log string `json:"Log,omitempty"` + MessageDate string `json:"MessageDate,omitempty"` + MessageText string `json:"MessageText,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + RequestVariables string `json:"RequestVariables,omitempty"` + ResponseBody string `json:"ResponseBody,omitempty"` + ResponseHeaders string `json:"ResponseHeaders,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go b/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go new file mode 100644 index 000000000..bfa9a483d --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_outgoing_caller_id.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountOutgoingCallerId struct for ApiV2010AccountOutgoingCallerId +type ApiV2010AccountOutgoingCallerId struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_queue.go b/rest/api/v2010/model_api_v2010_account_queue.go new file mode 100644 index 000000000..c7be73759 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_queue.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountQueue struct for ApiV2010AccountQueue +type ApiV2010AccountQueue struct { + AccountSid string `json:"AccountSid,omitempty"` + AverageWaitTime int32 `json:"AverageWaitTime,omitempty"` + CurrentSize int32 `json:"CurrentSize,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + MaxSize int32 `json:"MaxSize,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_queue_member.go b/rest/api/v2010/model_api_v2010_account_queue_member.go new file mode 100644 index 000000000..b6f309ffd --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_queue_member.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountQueueMember struct for ApiV2010AccountQueueMember +type ApiV2010AccountQueueMember struct { + CallSid string `json:"CallSid,omitempty"` + DateEnqueued string `json:"DateEnqueued,omitempty"` + Position int32 `json:"Position,omitempty"` + QueueSid string `json:"QueueSid,omitempty"` + Uri string `json:"Uri,omitempty"` + WaitTime int32 `json:"WaitTime,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_recording.go b/rest/api/v2010/model_api_v2010_account_recording.go new file mode 100644 index 000000000..b522b3b78 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_recording.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountRecording struct for ApiV2010AccountRecording +type ApiV2010AccountRecording struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallSid string `json:"CallSid,omitempty"` + Channels int32 `json:"Channels,omitempty"` + ConferenceSid string `json:"ConferenceSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Duration string `json:"Duration,omitempty"` + EncryptionDetails map[string]interface{} `json:"EncryptionDetails,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + Price string `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Sid string `json:"Sid,omitempty"` + Source string `json:"Source,omitempty"` + StartTime string `json:"StartTime,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go b/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go new file mode 100644 index 000000000..f282cb46d --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result.go @@ -0,0 +1,24 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountRecordingRecordingAddOnResult struct for ApiV2010AccountRecordingRecordingAddOnResult +type ApiV2010AccountRecordingRecordingAddOnResult struct { + AccountSid string `json:"AccountSid,omitempty"` + AddOnConfigurationSid string `json:"AddOnConfigurationSid,omitempty"` + AddOnSid string `json:"AddOnSid,omitempty"` + DateCompleted string `json:"DateCompleted,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + ReferenceSid string `json:"ReferenceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go b/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go new file mode 100644 index 000000000..21998821f --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_recording_recording_add_on_result_recording_add_on_result_payload.go @@ -0,0 +1,25 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct for ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload +type ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload struct { + AccountSid string `json:"AccountSid,omitempty"` + AddOnConfigurationSid string `json:"AddOnConfigurationSid,omitempty"` + AddOnResultSid string `json:"AddOnResultSid,omitempty"` + AddOnSid string `json:"AddOnSid,omitempty"` + ContentType string `json:"ContentType,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Label string `json:"Label,omitempty"` + ReferenceSid string `json:"ReferenceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go b/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go new file mode 100644 index 000000000..e3811902b --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_recording_recording_transcription.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountRecordingRecordingTranscription struct for ApiV2010AccountRecordingRecordingTranscription +type ApiV2010AccountRecordingRecordingTranscription struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Duration string `json:"Duration,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + RecordingSid string `json:"RecordingSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + TranscriptionText string `json:"TranscriptionText,omitempty"` + Type string `json:"Type,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_short_code.go b/rest/api/v2010/model_api_v2010_account_short_code.go new file mode 100644 index 000000000..232c07444 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_short_code.go @@ -0,0 +1,26 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountShortCode struct for ApiV2010AccountShortCode +type ApiV2010AccountShortCode struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ShortCode string `json:"ShortCode,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_signing_key.go b/rest/api/v2010/model_api_v2010_account_signing_key.go new file mode 100644 index 000000000..d1b5aeddd --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_signing_key.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSigningKey struct for ApiV2010AccountSigningKey +type ApiV2010AccountSigningKey struct { + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go b/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go new file mode 100644 index 000000000..270c2cc68 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipCredentialList struct for ApiV2010AccountSipSipCredentialList +type ApiV2010AccountSipSipCredentialList struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go b/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go new file mode 100644 index 000000000..f472ba4aa --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_credential_list_sip_credential.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipCredentialListSipCredential struct for ApiV2010AccountSipSipCredentialListSipCredential +type ApiV2010AccountSipSipCredentialListSipCredential struct { + AccountSid string `json:"AccountSid,omitempty"` + CredentialListSid string `json:"CredentialListSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` + Username string `json:"Username,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go new file mode 100644 index 000000000..33da85620 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain.go @@ -0,0 +1,35 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomain struct for ApiV2010AccountSipSipDomain +type ApiV2010AccountSipSipDomain struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AuthType string `json:"AuthType,omitempty"` + ByocTrunkSid string `json:"ByocTrunkSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + DomainName string `json:"DomainName,omitempty"` + EmergencyCallerSid string `json:"EmergencyCallerSid,omitempty"` + EmergencyCallingEnabled bool `json:"EmergencyCallingEnabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Secure bool `json:"Secure,omitempty"` + Sid string `json:"Sid,omitempty"` + SipRegistration bool `json:"SipRegistration,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceStatusCallbackMethod string `json:"VoiceStatusCallbackMethod,omitempty"` + VoiceStatusCallbackUrl string `json:"VoiceStatusCallbackUrl,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go new file mode 100644 index 000000000..efa5b204f --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_credential_list_mapping.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping +type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go new file mode 100644 index 000000000..795157d89 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_calls_sip_auth_calls_ip_access_control_list_mapping.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping +type ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go new file mode 100644 index 000000000..193cd4173 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_auth_sip_auth_registrations_sip_auth_registrations_credential_list_mapping.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct for ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping +type ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go new file mode 100644 index 000000000..413f903cf --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_credential_list_mapping.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomainSipCredentialListMapping struct for ApiV2010AccountSipSipDomainSipCredentialListMapping +type ApiV2010AccountSipSipDomainSipCredentialListMapping struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go new file mode 100644 index 000000000..d002a0e45 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_domain_sip_ip_access_control_list_mapping.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct for ApiV2010AccountSipSipDomainSipIpAccessControlListMapping +type ApiV2010AccountSipSipDomainSipIpAccessControlListMapping struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go b/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go new file mode 100644 index 000000000..d28fbbe10 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipIpAccessControlList struct for ApiV2010AccountSipSipIpAccessControlList +type ApiV2010AccountSipSipIpAccessControlList struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go b/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go new file mode 100644 index 000000000..e287fd413 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_sip_sip_ip_access_control_list_sip_ip_address.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct for ApiV2010AccountSipSipIpAccessControlListSipIpAddress +type ApiV2010AccountSipSipIpAccessControlListSipIpAddress struct { + AccountSid string `json:"AccountSid,omitempty"` + CidrPrefixLength int32 `json:"CidrPrefixLength,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IpAccessControlListSid string `json:"IpAccessControlListSid,omitempty"` + IpAddress string `json:"IpAddress,omitempty"` + Sid string `json:"Sid,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_token.go b/rest/api/v2010/model_api_v2010_account_token.go new file mode 100644 index 000000000..74a5c4f90 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_token.go @@ -0,0 +1,21 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountToken struct for ApiV2010AccountToken +type ApiV2010AccountToken struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + IceServers []map[string]interface{} `json:"IceServers,omitempty"` + Password string `json:"Password,omitempty"` + Ttl string `json:"Ttl,omitempty"` + Username string `json:"Username,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_transcription.go b/rest/api/v2010/model_api_v2010_account_transcription.go new file mode 100644 index 000000000..c30e2bb39 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_transcription.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountTranscription struct for ApiV2010AccountTranscription +type ApiV2010AccountTranscription struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + Duration string `json:"Duration,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + RecordingSid string `json:"RecordingSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + TranscriptionText string `json:"TranscriptionText,omitempty"` + Type string `json:"Type,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record.go new file mode 100644 index 000000000..1b2afaf4b --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecord struct for ApiV2010AccountUsageUsageRecord +type ApiV2010AccountUsageUsageRecord struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go new file mode 100644 index 000000000..88a28a32a --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_all_time.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct for ApiV2010AccountUsageUsageRecordUsageRecordAllTime +type ApiV2010AccountUsageUsageRecordUsageRecordAllTime struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go new file mode 100644 index 000000000..ecb0b060d --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_daily.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordDaily struct for ApiV2010AccountUsageUsageRecordUsageRecordDaily +type ApiV2010AccountUsageUsageRecordUsageRecordDaily struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go new file mode 100644 index 000000000..350d3dffc --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_last_month.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordLastMonth +type ApiV2010AccountUsageUsageRecordUsageRecordLastMonth struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go new file mode 100644 index 000000000..5bb65b562 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_monthly.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct for ApiV2010AccountUsageUsageRecordUsageRecordMonthly +type ApiV2010AccountUsageUsageRecordUsageRecordMonthly struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go new file mode 100644 index 000000000..4bbbef6f9 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_this_month.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct for ApiV2010AccountUsageUsageRecordUsageRecordThisMonth +type ApiV2010AccountUsageUsageRecordUsageRecordThisMonth struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go new file mode 100644 index 000000000..a32fab2c0 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_today.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordToday struct for ApiV2010AccountUsageUsageRecordUsageRecordToday +type ApiV2010AccountUsageUsageRecordUsageRecordToday struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go new file mode 100644 index 000000000..e89519cd9 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yearly.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordYearly struct for ApiV2010AccountUsageUsageRecordUsageRecordYearly +type ApiV2010AccountUsageUsageRecordUsageRecordYearly struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go new file mode 100644 index 000000000..b078af1bf --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_record_usage_record_yesterday.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct for ApiV2010AccountUsageUsageRecordUsageRecordYesterday +type ApiV2010AccountUsageUsageRecordUsageRecordYesterday struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + AsOf string `json:"AsOf,omitempty"` + Category string `json:"Category,omitempty"` + Count string `json:"Count,omitempty"` + CountUnit string `json:"CountUnit,omitempty"` + Description string `json:"Description,omitempty"` + EndDate time.Time `json:"EndDate,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + StartDate time.Time `json:"StartDate,omitempty"` + SubresourceUris map[string]interface{} `json:"SubresourceUris,omitempty"` + Uri string `json:"Uri,omitempty"` + Usage string `json:"Usage,omitempty"` + UsageUnit string `json:"UsageUnit,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go b/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go new file mode 100644 index 000000000..6801df8b3 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_usage_usage_trigger.go @@ -0,0 +1,30 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountUsageUsageTrigger struct for ApiV2010AccountUsageUsageTrigger +type ApiV2010AccountUsageUsageTrigger struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + CallbackMethod string `json:"CallbackMethod,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + CurrentValue string `json:"CurrentValue,omitempty"` + DateCreated string `json:"DateCreated,omitempty"` + DateFired string `json:"DateFired,omitempty"` + DateUpdated string `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Recurring string `json:"Recurring,omitempty"` + Sid string `json:"Sid,omitempty"` + TriggerBy string `json:"TriggerBy,omitempty"` + TriggerValue string `json:"TriggerValue,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageCategory string `json:"UsageCategory,omitempty"` + UsageRecordUri string `json:"UsageRecordUri,omitempty"` +} diff --git a/rest/api/v2010/model_api_v2010_account_validation_request.go b/rest/api/v2010/model_api_v2010_account_validation_request.go new file mode 100644 index 000000000..6ef0d8ef5 --- /dev/null +++ b/rest/api/v2010/model_api_v2010_account_validation_request.go @@ -0,0 +1,19 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ApiV2010AccountValidationRequest struct for ApiV2010AccountValidationRequest +type ApiV2010AccountValidationRequest struct { + AccountSid string `json:"AccountSid,omitempty"` + CallSid string `json:"CallSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + ValidationCode string `json:"ValidationCode,omitempty"` +} diff --git a/rest/api/v2010/model_create_account_request.go b/rest/api/v2010/model_create_account_request.go new file mode 100644 index 000000000..be960ac47 --- /dev/null +++ b/rest/api/v2010/model_create_account_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAccountRequest struct for CreateAccountRequest +type CreateAccountRequest struct { + // A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_create_address_request.go b/rest/api/v2010/model_create_address_request.go new file mode 100644 index 000000000..b1bbbf72e --- /dev/null +++ b/rest/api/v2010/model_create_address_request.go @@ -0,0 +1,32 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAddressRequest struct for CreateAddressRequest +type CreateAddressRequest struct { + // Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + AutoCorrectAddress bool `json:"AutoCorrectAddress,omitempty"` + // The city of the new address. + City string `json:"City"` + // The name to associate with the new address. + CustomerName string `json:"CustomerName"` + // Whether to enable emergency calling on the new address. Can be: `true` or `false`. + EmergencyEnabled bool `json:"EmergencyEnabled,omitempty"` + // A descriptive string that you create to describe the new address. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The ISO country code of the new address. + IsoCountry string `json:"IsoCountry"` + // The postal code of the new address. + PostalCode string `json:"PostalCode"` + // The state or region of the new address. + Region string `json:"Region"` + // The number and street address of the new address. + Street string `json:"Street"` +} diff --git a/rest/api/v2010/model_create_application_request.go b/rest/api/v2010/model_create_application_request.go new file mode 100644 index 000000000..e462078e6 --- /dev/null +++ b/rest/api/v2010/model_create_application_request.go @@ -0,0 +1,44 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateApplicationRequest struct for CreateApplicationRequest +type CreateApplicationRequest struct { + // The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version. + ApiVersion string `json:"ApiVersion,omitempty"` + // A descriptive string that you create to describe the new application. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The URL we should call using a POST method to send message status information to your application. + MessageStatusCallback string `json:"MessageStatusCallback,omitempty"` + // The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call using a POST method to send status information about SMS messages sent by the application. + SmsStatusCallback string `json:"SmsStatusCallback,omitempty"` + // The URL we should call when the phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The URL we should call when the phone number assigned to this application receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_call_feedback_summary_request.go b/rest/api/v2010/model_create_call_feedback_summary_request.go new file mode 100644 index 000000000..92db7c4bc --- /dev/null +++ b/rest/api/v2010/model_create_call_feedback_summary_request.go @@ -0,0 +1,27 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateCallFeedbackSummaryRequest struct for CreateCallFeedbackSummaryRequest +type CreateCallFeedbackSummaryRequest struct { + // Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC. + EndDate time.Time `json:"EndDate"` + // Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account. + IncludeSubaccounts bool `json:"IncludeSubaccounts,omitempty"` + // Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC. + StartDate time.Time `json:"StartDate"` + // The URL that we will request when the feedback summary is complete. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` +} diff --git a/rest/api/v2010/model_create_call_recording_request.go b/rest/api/v2010/model_create_call_recording_request.go new file mode 100644 index 000000000..f4705e1c4 --- /dev/null +++ b/rest/api/v2010/model_create_call_recording_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCallRecordingRequest struct for CreateCallRecordingRequest +type CreateCallRecordingRequest struct { + // The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels. + RecordingChannels string `json:"RecordingChannels,omitempty"` + // The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback). + RecordingStatusCallback string `json:"RecordingStatusCallback,omitempty"` + // The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space. + RecordingStatusCallbackEvent []string `json:"RecordingStatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`. + RecordingStatusCallbackMethod string `json:"RecordingStatusCallbackMethod,omitempty"` + // The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + RecordingTrack string `json:"RecordingTrack,omitempty"` + // Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not. + Trim string `json:"Trim,omitempty"` +} diff --git a/rest/api/v2010/model_create_call_request.go b/rest/api/v2010/model_create_call_request.go new file mode 100644 index 000000000..389fb6b84 --- /dev/null +++ b/rest/api/v2010/model_create_call_request.go @@ -0,0 +1,80 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCallRequest struct for CreateCallRequest +type CreateCallRequest struct { + // The SID of the Application resource that will handle the call, if the call will be handled by an application. + ApplicationSid string `json:"ApplicationSid,omitempty"` + // Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`. + AsyncAmd string `json:"AsyncAmd,omitempty"` + // The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax. + AsyncAmdStatusCallback string `json:"AsyncAmdStatusCallback,omitempty"` + // The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + AsyncAmdStatusCallbackMethod string `json:"AsyncAmdStatusCallbackMethod,omitempty"` + // The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + Byoc string `json:"Byoc,omitempty"` + // The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + CallReason string `json:"CallReason,omitempty"` + // The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. + CallerId string `json:"CallerId,omitempty"` + // The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + FallbackMethod string `json:"FallbackMethod,omitempty"` + // The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + FallbackUrl string `json:"FallbackUrl,omitempty"` + // The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number. + From string `json:"From"` + // Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection). + MachineDetection string `json:"MachineDetection,omitempty"` + // The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000. + MachineDetectionSilenceTimeout int32 `json:"MachineDetectionSilenceTimeout,omitempty"` + // The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200. + MachineDetectionSpeechEndThreshold int32 `json:"MachineDetectionSpeechEndThreshold,omitempty"` + // The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400. + MachineDetectionSpeechThreshold int32 `json:"MachineDetectionSpeechThreshold,omitempty"` + // The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. + MachineDetectionTimeout int32 `json:"MachineDetectionTimeout,omitempty"` + // The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + Method string `json:"Method,omitempty"` + // Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL. + Record bool `json:"Record,omitempty"` + // The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call. + RecordingChannels string `json:"RecordingChannels,omitempty"` + // The URL that we call when the recording is available to be accessed. + RecordingStatusCallback string `json:"RecordingStatusCallback,omitempty"` + // The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space. + RecordingStatusCallbackEvent []string `json:"RecordingStatusCallbackEvent,omitempty"` + // The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. + RecordingStatusCallbackMethod string `json:"RecordingStatusCallbackMethod,omitempty"` + // The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio. + RecordingTrack string `json:"RecordingTrack,omitempty"` + // A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. + SendDigits string `json:"SendDigits,omitempty"` + // The password required to authenticate the user account specified in `sip_auth_username`. + SipAuthPassword string `json:"SipAuthPassword,omitempty"` + // The username used to authenticate the caller making a SIP call. + SipAuthUsername string `json:"SipAuthUsername,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + StatusCallback string `json:"StatusCallback,omitempty"` + // The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored. + StatusCallbackEvent []string `json:"StatusCallbackEvent,omitempty"` + // The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. + Timeout int32 `json:"Timeout,omitempty"` + // The phone number, SIP address, or client identifier to call. + To string `json:"To"` + // Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. + Trim string `json:"Trim,omitempty"` + // TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. + Twiml string `json:"Twiml,omitempty"` + // The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + Url string `json:"Url,omitempty"` +} diff --git a/rest/api/v2010/model_create_incoming_phone_number_assigned_add_on_request.go b/rest/api/v2010/model_create_incoming_phone_number_assigned_add_on_request.go new file mode 100644 index 000000000..4f67b17be --- /dev/null +++ b/rest/api/v2010/model_create_incoming_phone_number_assigned_add_on_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIncomingPhoneNumberAssignedAddOnRequest struct for CreateIncomingPhoneNumberAssignedAddOnRequest +type CreateIncomingPhoneNumberAssignedAddOnRequest struct { + // The SID that identifies the Add-on installation. + InstalledAddOnSid string `json:"InstalledAddOnSid"` +} diff --git a/rest/api/v2010/model_create_incoming_phone_number_local_request.go b/rest/api/v2010/model_create_incoming_phone_number_local_request.go new file mode 100644 index 000000000..b731077ab --- /dev/null +++ b/rest/api/v2010/model_create_incoming_phone_number_local_request.go @@ -0,0 +1,60 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIncomingPhoneNumberLocalRequest struct for CreateIncomingPhoneNumberLocalRequest +type CreateIncomingPhoneNumberLocalRequest struct { + // The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + AddressSid string `json:"AddressSid,omitempty"` + // The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + BundleSid string `json:"BundleSid,omitempty"` + // The SID of the emergency address configuration to use for emergency calling from the new phone number. + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + // The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + // A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + IdentitySid string `json:"IdentitySid,omitempty"` + // The phone number to purchase specified 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"` + // The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when the new phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + TrunkSid string `json:"TrunkSid,omitempty"` + // The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + // The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_incoming_phone_number_mobile_request.go b/rest/api/v2010/model_create_incoming_phone_number_mobile_request.go new file mode 100644 index 000000000..45e581984 --- /dev/null +++ b/rest/api/v2010/model_create_incoming_phone_number_mobile_request.go @@ -0,0 +1,60 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIncomingPhoneNumberMobileRequest struct for CreateIncomingPhoneNumberMobileRequest +type CreateIncomingPhoneNumberMobileRequest struct { + // The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + AddressSid string `json:"AddressSid,omitempty"` + // The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + BundleSid string `json:"BundleSid,omitempty"` + // The SID of the emergency address configuration to use for emergency calling from the new phone number. + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + // The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + // A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + IdentitySid string `json:"IdentitySid,omitempty"` + // The phone number to purchase specified 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"` + // The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when the new phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + TrunkSid string `json:"TrunkSid,omitempty"` + // The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + // The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_incoming_phone_number_request.go b/rest/api/v2010/model_create_incoming_phone_number_request.go new file mode 100644 index 000000000..59dae6062 --- /dev/null +++ b/rest/api/v2010/model_create_incoming_phone_number_request.go @@ -0,0 +1,62 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIncomingPhoneNumberRequest struct for CreateIncomingPhoneNumberRequest +type CreateIncomingPhoneNumberRequest struct { + // The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + AddressSid string `json:"AddressSid,omitempty"` + // The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only). + AreaCode string `json:"AreaCode,omitempty"` + // The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + BundleSid string `json:"BundleSid,omitempty"` + // The SID of the emergency address configuration to use for emergency calling from the new phone number. + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + // The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + // A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations. + IdentitySid string `json:"IdentitySid,omitempty"` + // The phone number to purchase specified 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 the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when the new phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + TrunkSid string `json:"TrunkSid,omitempty"` + // The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + // The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_incoming_phone_number_toll_free_request.go b/rest/api/v2010/model_create_incoming_phone_number_toll_free_request.go new file mode 100644 index 000000000..94f8b8114 --- /dev/null +++ b/rest/api/v2010/model_create_incoming_phone_number_toll_free_request.go @@ -0,0 +1,60 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIncomingPhoneNumberTollFreeRequest struct for CreateIncomingPhoneNumberTollFreeRequest +type CreateIncomingPhoneNumberTollFreeRequest struct { + // The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations. + AddressSid string `json:"AddressSid,omitempty"` + // The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + BundleSid string `json:"BundleSid,omitempty"` + // The SID of the emergency address configuration to use for emergency calling from the new phone number. + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + // The configuration status parameter that determines whether the new phone number is enabled for emergency calling. + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + // A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations. + IdentitySid string `json:"IdentitySid,omitempty"` + // The phone number to purchase specified 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"` + // The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when the new phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + TrunkSid string `json:"TrunkSid,omitempty"` + // The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + // The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_message_feedback_request.go b/rest/api/v2010/model_create_message_feedback_request.go new file mode 100644 index 000000000..38e681f97 --- /dev/null +++ b/rest/api/v2010/model_create_message_feedback_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMessageFeedbackRequest struct for CreateMessageFeedbackRequest +type CreateMessageFeedbackRequest struct { + // Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`. + Outcome string `json:"Outcome,omitempty"` +} diff --git a/rest/api/v2010/model_create_message_request.go b/rest/api/v2010/model_create_message_request.go new file mode 100644 index 000000000..af9f97b54 --- /dev/null +++ b/rest/api/v2010/model_create_message_request.go @@ -0,0 +1,46 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMessageRequest struct for CreateMessageRequest +type CreateMessageRequest struct { + // Determines if the address can be stored or obfuscated based on privacy settings + AddressRetention string `json:"AddressRetention,omitempty"` + // The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used. + ApplicationSid string `json:"ApplicationSid,omitempty"` + // Total number of attempts made ( including this ) to send out the message regardless of the provider used + Attempt int32 `json:"Attempt,omitempty"` + // The text of the message you want to send. Can be up to 1,600 characters in length. + Body string `json:"Body,omitempty"` + // Determines if the message content can be stored or redacted based on privacy settings + ContentRetention string `json:"ContentRetention,omitempty"` + // Reserved + ForceDelivery bool `json:"ForceDelivery,omitempty"` + // A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty. + From string `json:"From,omitempty"` + // The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked. + MaxPrice float32 `json:"MaxPrice,omitempty"` + // The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada. + MediaUrl []string `json:"MediaUrl,omitempty"` + // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + // Rich actions for Channels Messages. + PersistentAction []string `json:"PersistentAction,omitempty"` + // Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default. + ProvideFeedback bool `json:"ProvideFeedback,omitempty"` + // Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`. + SmartEncoded bool `json:"SmartEncoded,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed. + StatusCallback string `json:"StatusCallback,omitempty"` + // The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format for SMS/MMS or [Channel user address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other 3rd-party channels. + To string `json:"To"` + // How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds. + ValidityPeriod int32 `json:"ValidityPeriod,omitempty"` +} diff --git a/rest/api/v2010/model_create_new_key_request.go b/rest/api/v2010/model_create_new_key_request.go new file mode 100644 index 000000000..545f26c0b --- /dev/null +++ b/rest/api/v2010/model_create_new_key_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateNewKeyRequest struct for CreateNewKeyRequest +type CreateNewKeyRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_create_new_signing_key_request.go b/rest/api/v2010/model_create_new_signing_key_request.go new file mode 100644 index 000000000..ef3f19700 --- /dev/null +++ b/rest/api/v2010/model_create_new_signing_key_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateNewSigningKeyRequest struct for CreateNewSigningKeyRequest +type CreateNewSigningKeyRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_create_participant_request.go b/rest/api/v2010/model_create_participant_request.go new file mode 100644 index 000000000..33d2ae686 --- /dev/null +++ b/rest/api/v2010/model_create_participant_request.go @@ -0,0 +1,90 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateParticipantRequest struct for CreateParticipantRequest +type CreateParticipantRequest struct { + // Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + Beep string `json:"Beep,omitempty"` + // The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta) + Byoc string `json:"Byoc,omitempty"` + // The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta) + CallReason string `json:"CallReason,omitempty"` + // The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + CallSidToCoach string `json:"CallSidToCoach,omitempty"` + // The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint. + CallerId string `json:"CallerId,omitempty"` + // Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + Coaching bool `json:"Coaching,omitempty"` + // Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + ConferenceRecord string `json:"ConferenceRecord,omitempty"` + // The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + ConferenceRecordingStatusCallback string `json:"ConferenceRecordingStatusCallback,omitempty"` + // The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. + ConferenceRecordingStatusCallbackEvent []string `json:"ConferenceRecordingStatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceRecordingStatusCallbackMethod string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + // The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + ConferenceStatusCallback string `json:"ConferenceStatusCallback,omitempty"` + // The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values with a space. Defaults to `start end`. + ConferenceStatusCallbackEvent []string `json:"ConferenceStatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceStatusCallbackMethod string `json:"ConferenceStatusCallbackMethod,omitempty"` + // Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + ConferenceTrim string `json:"ConferenceTrim,omitempty"` + // Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`. + EarlyMedia bool `json:"EarlyMedia,omitempty"` + // Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + EndConferenceOnExit bool `json:"EndConferenceOnExit,omitempty"` + // The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint. + From string `json:"From"` + // Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`. + JitterBufferSize string `json:"JitterBufferSize,omitempty"` + // A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant. + Label string `json:"Label,omitempty"` + // The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + MaxParticipants int32 `json:"MaxParticipants,omitempty"` + // Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`. + Muted bool `json:"Muted,omitempty"` + // Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + Record bool `json:"Record,omitempty"` + // The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + RecordingChannels string `json:"RecordingChannels,omitempty"` + // The URL that we should call using the `recording_status_callback_method` when the recording status changes. + RecordingStatusCallback string `json:"RecordingStatusCallback,omitempty"` + // The recording state changes that should generate a call to `recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`. + RecordingStatusCallbackEvent []string `json:"RecordingStatusCallbackEvent,omitempty"` + // The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + RecordingStatusCallbackMethod string `json:"RecordingStatusCallbackMethod,omitempty"` + // The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio. + RecordingTrack string `json:"RecordingTrack,omitempty"` + // The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + Region string `json:"Region,omitempty"` + // The SIP password for authentication. + SipAuthPassword string `json:"SipAuthPassword,omitempty"` + // The SIP username used for authentication. + SipAuthUsername string `json:"SipAuthUsername,omitempty"` + // Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + StartConferenceOnEnter bool `json:"StartConferenceOnEnter,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`. + StatusCallbackEvent []string `json:"StatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds. + Timeout int32 `json:"Timeout,omitempty"` + // The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified. + To string `json:"To"` + // The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + WaitMethod string `json:"WaitMethod,omitempty"` + // The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitUrl string `json:"WaitUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_payments_request.go b/rest/api/v2010/model_create_payments_request.go new file mode 100644 index 000000000..cfb3415dd --- /dev/null +++ b/rest/api/v2010/model_create_payments_request.go @@ -0,0 +1,46 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreatePaymentsRequest struct for CreatePaymentsRequest +type CreatePaymentsRequest struct { + // Type of bank account if payment source is ACH. One of `consumer-checking`, `consumer-savings`, or `commercial-checking`. The default value is `consumer-checking`. + BankAccountType string `json:"BankAccountType,omitempty"` + // A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. + ChargeAmount float32 `json:"ChargeAmount,omitempty"` + // The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Connector are accepted. + Currency string `json:"Currency,omitempty"` + // The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. + Description string `json:"Description,omitempty"` + // A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + IdempotencyKey string `json:"IdempotencyKey"` + // A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. + Input string `json:"Input,omitempty"` + // A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. + MinPostalCodeLength int32 `json:"MinPostalCodeLength,omitempty"` + // A single level JSON string that is required when accepting certain information specific only to ACH payments. The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). + Parameter map[string]interface{} `json:"Parameter,omitempty"` + // This is the unique name corresponding to the Payment Gateway Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. + PaymentConnector string `json:"PaymentConnector,omitempty"` + // Type of payment being captured. One of `credit-card` or `ach-debit`. The default value is `credit-card`. + PaymentMethod string `json:"PaymentMethod,omitempty"` + // Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. + PostalCode bool `json:"PostalCode,omitempty"` + // Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. + SecurityCode bool `json:"SecurityCode,omitempty"` + // Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) + StatusCallback string `json:"StatusCallback"` + // The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. + Timeout int32 `json:"Timeout,omitempty"` + // Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token. The default value is `reusable`. Do not enter a charge amount when tokenizing. If a charge amount is entered, the payment method will be charged and not tokenized. + TokenType string `json:"TokenType,omitempty"` + // Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` + ValidCardTypes string `json:"ValidCardTypes,omitempty"` +} diff --git a/rest/api/v2010/model_create_queue_request.go b/rest/api/v2010/model_create_queue_request.go new file mode 100644 index 000000000..78e023c27 --- /dev/null +++ b/rest/api/v2010/model_create_queue_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateQueueRequest struct for CreateQueueRequest +type CreateQueueRequest struct { + // A descriptive string that you created to describe this resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. + MaxSize int32 `json:"MaxSize,omitempty"` +} diff --git a/rest/api/v2010/model_create_sip_auth_calls_credential_list_mapping_request.go b/rest/api/v2010/model_create_sip_auth_calls_credential_list_mapping_request.go new file mode 100644 index 000000000..f52132871 --- /dev/null +++ b/rest/api/v2010/model_create_sip_auth_calls_credential_list_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipAuthCallsCredentialListMappingRequest struct for CreateSipAuthCallsCredentialListMappingRequest +type CreateSipAuthCallsCredentialListMappingRequest struct { + // The SID of the CredentialList resource to map to the SIP domain. + CredentialListSid string `json:"CredentialListSid"` +} diff --git a/rest/api/v2010/model_create_sip_auth_calls_ip_access_control_list_mapping_request.go b/rest/api/v2010/model_create_sip_auth_calls_ip_access_control_list_mapping_request.go new file mode 100644 index 000000000..1b1a113d4 --- /dev/null +++ b/rest/api/v2010/model_create_sip_auth_calls_ip_access_control_list_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipAuthCallsIpAccessControlListMappingRequest struct for CreateSipAuthCallsIpAccessControlListMappingRequest +type CreateSipAuthCallsIpAccessControlListMappingRequest struct { + // The SID of the IpAccessControlList resource to map to the SIP domain. + IpAccessControlListSid string `json:"IpAccessControlListSid"` +} diff --git a/rest/api/v2010/model_create_sip_auth_registrations_credential_list_mapping_request.go b/rest/api/v2010/model_create_sip_auth_registrations_credential_list_mapping_request.go new file mode 100644 index 000000000..8b2238e73 --- /dev/null +++ b/rest/api/v2010/model_create_sip_auth_registrations_credential_list_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipAuthRegistrationsCredentialListMappingRequest struct for CreateSipAuthRegistrationsCredentialListMappingRequest +type CreateSipAuthRegistrationsCredentialListMappingRequest struct { + // The SID of the CredentialList resource to map to the SIP domain. + CredentialListSid string `json:"CredentialListSid"` +} diff --git a/rest/api/v2010/model_create_sip_credential_list_mapping_request.go b/rest/api/v2010/model_create_sip_credential_list_mapping_request.go new file mode 100644 index 000000000..00afb0688 --- /dev/null +++ b/rest/api/v2010/model_create_sip_credential_list_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipCredentialListMappingRequest struct for CreateSipCredentialListMappingRequest +type CreateSipCredentialListMappingRequest struct { + // A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain. + CredentialListSid string `json:"CredentialListSid"` +} diff --git a/rest/api/v2010/model_create_sip_credential_list_request.go b/rest/api/v2010/model_create_sip_credential_list_request.go new file mode 100644 index 000000000..a45d836f9 --- /dev/null +++ b/rest/api/v2010/model_create_sip_credential_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipCredentialListRequest struct for CreateSipCredentialListRequest +type CreateSipCredentialListRequest struct { + // A human readable descriptive text that describes the CredentialList, up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/api/v2010/model_create_sip_credential_request.go b/rest/api/v2010/model_create_sip_credential_request.go new file mode 100644 index 000000000..a61b1a1be --- /dev/null +++ b/rest/api/v2010/model_create_sip_credential_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipCredentialRequest struct for CreateSipCredentialRequest +type CreateSipCredentialRequest struct { + // The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + Password string `json:"Password"` + // The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long. + Username string `json:"Username"` +} diff --git a/rest/api/v2010/model_create_sip_domain_request.go b/rest/api/v2010/model_create_sip_domain_request.go new file mode 100644 index 000000000..631bde0fa --- /dev/null +++ b/rest/api/v2010/model_create_sip_domain_request.go @@ -0,0 +1,40 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipDomainRequest struct for CreateSipDomainRequest +type CreateSipDomainRequest struct { + // The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + ByocTrunkSid string `json:"ByocTrunkSid,omitempty"` + // The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \"-\" and must end with `sip.twilio.com`. + DomainName string `json:"DomainName"` + // Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + EmergencyCallerSid string `json:"EmergencyCallerSid,omitempty"` + // Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + EmergencyCallingEnabled bool `json:"EmergencyCallingEnabled,omitempty"` + // A descriptive string that you created to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + Secure bool `json:"Secure,omitempty"` + // Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + SipRegistration bool `json:"SipRegistration,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + VoiceStatusCallbackMethod string `json:"VoiceStatusCallbackMethod,omitempty"` + // The URL that we should call to pass status parameters (such as call ended) to your application. + VoiceStatusCallbackUrl string `json:"VoiceStatusCallbackUrl,omitempty"` + // The URL we should when the domain receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_create_sip_ip_access_control_list_mapping_request.go b/rest/api/v2010/model_create_sip_ip_access_control_list_mapping_request.go new file mode 100644 index 000000000..270bded6f --- /dev/null +++ b/rest/api/v2010/model_create_sip_ip_access_control_list_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipIpAccessControlListMappingRequest struct for CreateSipIpAccessControlListMappingRequest +type CreateSipIpAccessControlListMappingRequest struct { + // The unique id of the IP access control list to map to the SIP domain. + IpAccessControlListSid string `json:"IpAccessControlListSid"` +} diff --git a/rest/api/v2010/model_create_sip_ip_access_control_list_request.go b/rest/api/v2010/model_create_sip_ip_access_control_list_request.go new file mode 100644 index 000000000..bad23cc61 --- /dev/null +++ b/rest/api/v2010/model_create_sip_ip_access_control_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipIpAccessControlListRequest struct for CreateSipIpAccessControlListRequest +type CreateSipIpAccessControlListRequest struct { + // A human readable descriptive text that describes the IpAccessControlList, up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/api/v2010/model_create_sip_ip_address_request.go b/rest/api/v2010/model_create_sip_ip_address_request.go new file mode 100644 index 000000000..02a8ede3d --- /dev/null +++ b/rest/api/v2010/model_create_sip_ip_address_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSipIpAddressRequest struct for CreateSipIpAddressRequest +type CreateSipIpAddressRequest struct { + // An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + CidrPrefixLength int32 `json:"CidrPrefixLength,omitempty"` + // A human readable descriptive text for this resource, up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + IpAddress string `json:"IpAddress"` +} diff --git a/rest/api/v2010/model_create_token_request.go b/rest/api/v2010/model_create_token_request.go new file mode 100644 index 000000000..c32a43ac3 --- /dev/null +++ b/rest/api/v2010/model_create_token_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTokenRequest struct for CreateTokenRequest +type CreateTokenRequest struct { + // The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours). + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/api/v2010/model_create_usage_trigger_request.go b/rest/api/v2010/model_create_usage_trigger_request.go new file mode 100644 index 000000000..249055756 --- /dev/null +++ b/rest/api/v2010/model_create_usage_trigger_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateUsageTriggerRequest struct for CreateUsageTriggerRequest +type CreateUsageTriggerRequest struct { + // The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we should call using `callback_method` when the trigger fires. + CallbackUrl string `json:"CallbackUrl"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT. + Recurring string `json:"Recurring,omitempty"` + // The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`. + TriggerBy string `json:"TriggerBy,omitempty"` + // The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`. + TriggerValue string `json:"TriggerValue"` + // The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value. + UsageCategory string `json:"UsageCategory"` +} diff --git a/rest/api/v2010/model_create_validation_request_request.go b/rest/api/v2010/model_create_validation_request_request.go new file mode 100644 index 000000000..66ab293e2 --- /dev/null +++ b/rest/api/v2010/model_create_validation_request_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateValidationRequestRequest struct for CreateValidationRequestRequest +type CreateValidationRequestRequest struct { + // The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`. + CallDelay int32 `json:"CallDelay,omitempty"` + // The digits to dial after connecting the verification call. + Extension string `json:"Extension,omitempty"` + // A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + PhoneNumber string `json:"PhoneNumber"` + // The URL we should call using the `status_callback_method` to send status information about the verification process to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` +} diff --git a/rest/api/v2010/model_list_account_response.go b/rest/api/v2010/model_list_account_response.go new file mode 100644 index 000000000..b5f9fa672 --- /dev/null +++ b/rest/api/v2010/model_list_account_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAccountResponse struct for ListAccountResponse +type ListAccountResponse struct { + Accounts []ApiV2010Account `json:"Accounts,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_address_response.go b/rest/api/v2010/model_list_address_response.go new file mode 100644 index 000000000..d80599b03 --- /dev/null +++ b/rest/api/v2010/model_list_address_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAddressResponse struct for ListAddressResponse +type ListAddressResponse struct { + Addresses []ApiV2010AccountAddress `json:"Addresses,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_application_response.go b/rest/api/v2010/model_list_application_response.go new file mode 100644 index 000000000..ed4d7a7c7 --- /dev/null +++ b/rest/api/v2010/model_list_application_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListApplicationResponse struct for ListApplicationResponse +type ListApplicationResponse struct { + Applications []ApiV2010AccountApplication `json:"Applications,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_authorized_connect_app_response.go b/rest/api/v2010/model_list_authorized_connect_app_response.go new file mode 100644 index 000000000..fb9eccd76 --- /dev/null +++ b/rest/api/v2010/model_list_authorized_connect_app_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAuthorizedConnectAppResponse struct for ListAuthorizedConnectAppResponse +type ListAuthorizedConnectAppResponse struct { + AuthorizedConnectApps []ApiV2010AccountAuthorizedConnectApp `json:"AuthorizedConnectApps,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_country_response.go b/rest/api/v2010/model_list_available_phone_number_country_response.go new file mode 100644 index 000000000..965da5f0b --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_country_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberCountryResponse struct for ListAvailablePhoneNumberCountryResponse +type ListAvailablePhoneNumberCountryResponse struct { + Countries []ApiV2010AccountAvailablePhoneNumberCountry `json:"Countries,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_local_response.go b/rest/api/v2010/model_list_available_phone_number_local_response.go new file mode 100644 index 000000000..efa07272a --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_local_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberLocalResponse struct for ListAvailablePhoneNumberLocalResponse +type ListAvailablePhoneNumberLocalResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go b/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go new file mode 100644 index 000000000..f50d8e6c0 --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_machine_to_machine_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberMachineToMachineResponse struct for ListAvailablePhoneNumberMachineToMachineResponse +type ListAvailablePhoneNumberMachineToMachineResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_mobile_response.go b/rest/api/v2010/model_list_available_phone_number_mobile_response.go new file mode 100644 index 000000000..7c18697ef --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_mobile_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberMobileResponse struct for ListAvailablePhoneNumberMobileResponse +type ListAvailablePhoneNumberMobileResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_national_response.go b/rest/api/v2010/model_list_available_phone_number_national_response.go new file mode 100644 index 000000000..0b5cd825f --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_national_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberNationalResponse struct for ListAvailablePhoneNumberNationalResponse +type ListAvailablePhoneNumberNationalResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go b/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go new file mode 100644 index 000000000..f0d591e76 --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_shared_cost_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberSharedCostResponse struct for ListAvailablePhoneNumberSharedCostResponse +type ListAvailablePhoneNumberSharedCostResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_toll_free_response.go b/rest/api/v2010/model_list_available_phone_number_toll_free_response.go new file mode 100644 index 000000000..b1de97855 --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_toll_free_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberTollFreeResponse struct for ListAvailablePhoneNumberTollFreeResponse +type ListAvailablePhoneNumberTollFreeResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_available_phone_number_voip_response.go b/rest/api/v2010/model_list_available_phone_number_voip_response.go new file mode 100644 index 000000000..b9caa7724 --- /dev/null +++ b/rest/api/v2010/model_list_available_phone_number_voip_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailablePhoneNumberVoipResponse struct for ListAvailablePhoneNumberVoipResponse +type ListAvailablePhoneNumberVoipResponse struct { + AvailablePhoneNumbers []ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip `json:"AvailablePhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_call_event_response.go b/rest/api/v2010/model_list_call_event_response.go new file mode 100644 index 000000000..ebf1c1583 --- /dev/null +++ b/rest/api/v2010/model_list_call_event_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCallEventResponse struct for ListCallEventResponse +type ListCallEventResponse struct { + End int32 `json:"End,omitempty"` + Events []ApiV2010AccountCallCallEvent `json:"Events,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_call_notification_response.go b/rest/api/v2010/model_list_call_notification_response.go new file mode 100644 index 000000000..70a92f7dd --- /dev/null +++ b/rest/api/v2010/model_list_call_notification_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCallNotificationResponse struct for ListCallNotificationResponse +type ListCallNotificationResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountCallCallNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_call_recording_response.go b/rest/api/v2010/model_list_call_recording_response.go new file mode 100644 index 000000000..bd2bd26f7 --- /dev/null +++ b/rest/api/v2010/model_list_call_recording_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCallRecordingResponse struct for ListCallRecordingResponse +type ListCallRecordingResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountCallCallRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_call_response.go b/rest/api/v2010/model_list_call_response.go new file mode 100644 index 000000000..1b8f24387 --- /dev/null +++ b/rest/api/v2010/model_list_call_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCallResponse struct for ListCallResponse +type ListCallResponse struct { + Calls []ApiV2010AccountCall `json:"Calls,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_conference_recording_response.go b/rest/api/v2010/model_list_conference_recording_response.go new file mode 100644 index 000000000..f7f06b97c --- /dev/null +++ b/rest/api/v2010/model_list_conference_recording_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConferenceRecordingResponse struct for ListConferenceRecordingResponse +type ListConferenceRecordingResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountConferenceConferenceRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_conference_response.go b/rest/api/v2010/model_list_conference_response.go new file mode 100644 index 000000000..141bc25fc --- /dev/null +++ b/rest/api/v2010/model_list_conference_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConferenceResponse struct for ListConferenceResponse +type ListConferenceResponse struct { + Conferences []ApiV2010AccountConference `json:"Conferences,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_connect_app_response.go b/rest/api/v2010/model_list_connect_app_response.go new file mode 100644 index 000000000..c1ba77079 --- /dev/null +++ b/rest/api/v2010/model_list_connect_app_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConnectAppResponse struct for ListConnectAppResponse +type ListConnectAppResponse struct { + ConnectApps []ApiV2010AccountConnectApp `json:"ConnectApps,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_dependent_phone_number_response.go b/rest/api/v2010/model_list_dependent_phone_number_response.go new file mode 100644 index 000000000..48bf91e34 --- /dev/null +++ b/rest/api/v2010/model_list_dependent_phone_number_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDependentPhoneNumberResponse struct for ListDependentPhoneNumberResponse +type ListDependentPhoneNumberResponse struct { + DependentPhoneNumbers []ApiV2010AccountAddressDependentPhoneNumber `json:"DependentPhoneNumbers,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go b/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go new file mode 100644 index 000000000..f3476487e --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_extension_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct for ListIncomingPhoneNumberAssignedAddOnExtensionResponse +type ListIncomingPhoneNumberAssignedAddOnExtensionResponse struct { + End int32 `json:"End,omitempty"` + Extensions []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension `json:"Extensions,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go b/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go new file mode 100644 index 000000000..d15ae29c9 --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_assigned_add_on_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberAssignedAddOnResponse struct for ListIncomingPhoneNumberAssignedAddOnResponse +type ListIncomingPhoneNumberAssignedAddOnResponse struct { + AssignedAddOns []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn `json:"AssignedAddOns,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_local_response.go b/rest/api/v2010/model_list_incoming_phone_number_local_response.go new file mode 100644 index 000000000..acc8f84f9 --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_local_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberLocalResponse struct for ListIncomingPhoneNumberLocalResponse +type ListIncomingPhoneNumberLocalResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal `json:"IncomingPhoneNumbers,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go b/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go new file mode 100644 index 000000000..8b1fb90ae --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_mobile_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberMobileResponse struct for ListIncomingPhoneNumberMobileResponse +type ListIncomingPhoneNumberMobileResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile `json:"IncomingPhoneNumbers,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_response.go b/rest/api/v2010/model_list_incoming_phone_number_response.go new file mode 100644 index 000000000..ec7dd9e09 --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberResponse struct for ListIncomingPhoneNumberResponse +type ListIncomingPhoneNumberResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumber `json:"IncomingPhoneNumbers,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go b/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go new file mode 100644 index 000000000..cdab6920a --- /dev/null +++ b/rest/api/v2010/model_list_incoming_phone_number_toll_free_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIncomingPhoneNumberTollFreeResponse struct for ListIncomingPhoneNumberTollFreeResponse +type ListIncomingPhoneNumberTollFreeResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IncomingPhoneNumbers []ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree `json:"IncomingPhoneNumbers,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_key_response.go b/rest/api/v2010/model_list_key_response.go new file mode 100644 index 000000000..74ba87d5f --- /dev/null +++ b/rest/api/v2010/model_list_key_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListKeyResponse struct for ListKeyResponse +type ListKeyResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Keys []ApiV2010AccountKey `json:"Keys,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_media_response.go b/rest/api/v2010/model_list_media_response.go new file mode 100644 index 000000000..0c210035d --- /dev/null +++ b/rest/api/v2010/model_list_media_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMediaResponse struct for ListMediaResponse +type ListMediaResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + MediaList []ApiV2010AccountMessageMedia `json:"MediaList,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_member_response.go b/rest/api/v2010/model_list_member_response.go new file mode 100644 index 000000000..0f2d63d37 --- /dev/null +++ b/rest/api/v2010/model_list_member_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMemberResponse struct for ListMemberResponse +type ListMemberResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + QueueMembers []ApiV2010AccountQueueMember `json:"QueueMembers,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_message_response.go b/rest/api/v2010/model_list_message_response.go new file mode 100644 index 000000000..d7205d823 --- /dev/null +++ b/rest/api/v2010/model_list_message_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessageResponse struct for ListMessageResponse +type ListMessageResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + Messages []ApiV2010AccountMessage `json:"Messages,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_notification_response.go b/rest/api/v2010/model_list_notification_response.go new file mode 100644 index 000000000..875997433 --- /dev/null +++ b/rest/api/v2010/model_list_notification_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListNotificationResponse struct for ListNotificationResponse +type ListNotificationResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Notifications []ApiV2010AccountNotification `json:"Notifications,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_outgoing_caller_id_response.go b/rest/api/v2010/model_list_outgoing_caller_id_response.go new file mode 100644 index 000000000..3a00eed39 --- /dev/null +++ b/rest/api/v2010/model_list_outgoing_caller_id_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListOutgoingCallerIdResponse struct for ListOutgoingCallerIdResponse +type ListOutgoingCallerIdResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + OutgoingCallerIds []ApiV2010AccountOutgoingCallerId `json:"OutgoingCallerIds,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_participant_response.go b/rest/api/v2010/model_list_participant_response.go new file mode 100644 index 000000000..a197b8f7e --- /dev/null +++ b/rest/api/v2010/model_list_participant_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListParticipantResponse struct for ListParticipantResponse +type ListParticipantResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Participants []ApiV2010AccountConferenceParticipant `json:"Participants,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_queue_response.go b/rest/api/v2010/model_list_queue_response.go new file mode 100644 index 000000000..3a23f4a14 --- /dev/null +++ b/rest/api/v2010/model_list_queue_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListQueueResponse struct for ListQueueResponse +type ListQueueResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Queues []ApiV2010AccountQueue `json:"Queues,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_recording_add_on_result_payload_response.go b/rest/api/v2010/model_list_recording_add_on_result_payload_response.go new file mode 100644 index 000000000..4ec4521a5 --- /dev/null +++ b/rest/api/v2010/model_list_recording_add_on_result_payload_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRecordingAddOnResultPayloadResponse struct for ListRecordingAddOnResultPayloadResponse +type ListRecordingAddOnResultPayloadResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + Payloads []ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload `json:"Payloads,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_recording_add_on_result_response.go b/rest/api/v2010/model_list_recording_add_on_result_response.go new file mode 100644 index 000000000..cf8d5dada --- /dev/null +++ b/rest/api/v2010/model_list_recording_add_on_result_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRecordingAddOnResultResponse struct for ListRecordingAddOnResultResponse +type ListRecordingAddOnResultResponse struct { + AddOnResults []ApiV2010AccountRecordingRecordingAddOnResult `json:"AddOnResults,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_recording_response.go b/rest/api/v2010/model_list_recording_response.go new file mode 100644 index 000000000..0407bd8b2 --- /dev/null +++ b/rest/api/v2010/model_list_recording_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRecordingResponse struct for ListRecordingResponse +type ListRecordingResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Recordings []ApiV2010AccountRecording `json:"Recordings,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_recording_transcription_response.go b/rest/api/v2010/model_list_recording_transcription_response.go new file mode 100644 index 000000000..5aa239016 --- /dev/null +++ b/rest/api/v2010/model_list_recording_transcription_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRecordingTranscriptionResponse struct for ListRecordingTranscriptionResponse +type ListRecordingTranscriptionResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountRecordingRecordingTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_short_code_response.go b/rest/api/v2010/model_list_short_code_response.go new file mode 100644 index 000000000..f812bc579 --- /dev/null +++ b/rest/api/v2010/model_list_short_code_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListShortCodeResponse struct for ListShortCodeResponse +type ListShortCodeResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + ShortCodes []ApiV2010AccountShortCode `json:"ShortCodes,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_signing_key_response.go b/rest/api/v2010/model_list_signing_key_response.go new file mode 100644 index 000000000..a3b1a9f52 --- /dev/null +++ b/rest/api/v2010/model_list_signing_key_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSigningKeyResponse struct for ListSigningKeyResponse +type ListSigningKeyResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + SigningKeys []ApiV2010AccountSigningKey `json:"SigningKeys,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go b/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go new file mode 100644 index 000000000..44c04ff31 --- /dev/null +++ b/rest/api/v2010/model_list_sip_auth_calls_credential_list_mapping_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipAuthCallsCredentialListMappingResponse struct for ListSipAuthCallsCredentialListMappingResponse +type ListSipAuthCallsCredentialListMappingResponse struct { + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go b/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go new file mode 100644 index 000000000..29617a9da --- /dev/null +++ b/rest/api/v2010/model_list_sip_auth_calls_ip_access_control_list_mapping_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipAuthCallsIpAccessControlListMappingResponse struct for ListSipAuthCallsIpAccessControlListMappingResponse +type ListSipAuthCallsIpAccessControlListMappingResponse struct { + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go b/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go new file mode 100644 index 000000000..5d6bc551b --- /dev/null +++ b/rest/api/v2010/model_list_sip_auth_registrations_credential_list_mapping_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipAuthRegistrationsCredentialListMappingResponse struct for ListSipAuthRegistrationsCredentialListMappingResponse +type ListSipAuthRegistrationsCredentialListMappingResponse struct { + Contents []ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping `json:"Contents,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_credential_list_mapping_response.go b/rest/api/v2010/model_list_sip_credential_list_mapping_response.go new file mode 100644 index 000000000..f5ae67a99 --- /dev/null +++ b/rest/api/v2010/model_list_sip_credential_list_mapping_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipCredentialListMappingResponse struct for ListSipCredentialListMappingResponse +type ListSipCredentialListMappingResponse struct { + CredentialListMappings []ApiV2010AccountSipSipDomainSipCredentialListMapping `json:"CredentialListMappings,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_credential_list_response.go b/rest/api/v2010/model_list_sip_credential_list_response.go new file mode 100644 index 000000000..1d5d20050 --- /dev/null +++ b/rest/api/v2010/model_list_sip_credential_list_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipCredentialListResponse struct for ListSipCredentialListResponse +type ListSipCredentialListResponse struct { + CredentialLists []ApiV2010AccountSipSipCredentialList `json:"CredentialLists,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_credential_response.go b/rest/api/v2010/model_list_sip_credential_response.go new file mode 100644 index 000000000..b55d3e7d0 --- /dev/null +++ b/rest/api/v2010/model_list_sip_credential_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipCredentialResponse struct for ListSipCredentialResponse +type ListSipCredentialResponse struct { + Credentials []ApiV2010AccountSipSipCredentialListSipCredential `json:"Credentials,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_domain_response.go b/rest/api/v2010/model_list_sip_domain_response.go new file mode 100644 index 000000000..5fb1c1173 --- /dev/null +++ b/rest/api/v2010/model_list_sip_domain_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipDomainResponse struct for ListSipDomainResponse +type ListSipDomainResponse struct { + Domains []ApiV2010AccountSipSipDomain `json:"Domains,omitempty"` + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go b/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go new file mode 100644 index 000000000..fdf991074 --- /dev/null +++ b/rest/api/v2010/model_list_sip_ip_access_control_list_mapping_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipIpAccessControlListMappingResponse struct for ListSipIpAccessControlListMappingResponse +type ListSipIpAccessControlListMappingResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IpAccessControlListMappings []ApiV2010AccountSipSipDomainSipIpAccessControlListMapping `json:"IpAccessControlListMappings,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_ip_access_control_list_response.go b/rest/api/v2010/model_list_sip_ip_access_control_list_response.go new file mode 100644 index 000000000..a9e4480ab --- /dev/null +++ b/rest/api/v2010/model_list_sip_ip_access_control_list_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipIpAccessControlListResponse struct for ListSipIpAccessControlListResponse +type ListSipIpAccessControlListResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IpAccessControlLists []ApiV2010AccountSipSipIpAccessControlList `json:"IpAccessControlLists,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_sip_ip_address_response.go b/rest/api/v2010/model_list_sip_ip_address_response.go new file mode 100644 index 000000000..d0caf3b45 --- /dev/null +++ b/rest/api/v2010/model_list_sip_ip_address_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSipIpAddressResponse struct for ListSipIpAddressResponse +type ListSipIpAddressResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + IpAddresses []ApiV2010AccountSipSipIpAccessControlListSipIpAddress `json:"IpAddresses,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_transcription_response.go b/rest/api/v2010/model_list_transcription_response.go new file mode 100644 index 000000000..138fece66 --- /dev/null +++ b/rest/api/v2010/model_list_transcription_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTranscriptionResponse struct for ListTranscriptionResponse +type ListTranscriptionResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Transcriptions []ApiV2010AccountTranscription `json:"Transcriptions,omitempty"` + Uri string `json:"Uri,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_all_time_response.go b/rest/api/v2010/model_list_usage_record_all_time_response.go new file mode 100644 index 000000000..7ef29fe97 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_all_time_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordAllTimeResponse struct for ListUsageRecordAllTimeResponse +type ListUsageRecordAllTimeResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordAllTime `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_daily_response.go b/rest/api/v2010/model_list_usage_record_daily_response.go new file mode 100644 index 000000000..35b97ec52 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_daily_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordDailyResponse struct for ListUsageRecordDailyResponse +type ListUsageRecordDailyResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordDaily `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_last_month_response.go b/rest/api/v2010/model_list_usage_record_last_month_response.go new file mode 100644 index 000000000..19aec2c4c --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_last_month_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordLastMonthResponse struct for ListUsageRecordLastMonthResponse +type ListUsageRecordLastMonthResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordLastMonth `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_monthly_response.go b/rest/api/v2010/model_list_usage_record_monthly_response.go new file mode 100644 index 000000000..b49729518 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_monthly_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordMonthlyResponse struct for ListUsageRecordMonthlyResponse +type ListUsageRecordMonthlyResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordMonthly `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_response.go b/rest/api/v2010/model_list_usage_record_response.go new file mode 100644 index 000000000..9188d39f6 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordResponse struct for ListUsageRecordResponse +type ListUsageRecordResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecord `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_this_month_response.go b/rest/api/v2010/model_list_usage_record_this_month_response.go new file mode 100644 index 000000000..6ae8c6f8c --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_this_month_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordThisMonthResponse struct for ListUsageRecordThisMonthResponse +type ListUsageRecordThisMonthResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordThisMonth `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_today_response.go b/rest/api/v2010/model_list_usage_record_today_response.go new file mode 100644 index 000000000..a35abeb52 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_today_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordTodayResponse struct for ListUsageRecordTodayResponse +type ListUsageRecordTodayResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordToday `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_yearly_response.go b/rest/api/v2010/model_list_usage_record_yearly_response.go new file mode 100644 index 000000000..32fb975de --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_yearly_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordYearlyResponse struct for ListUsageRecordYearlyResponse +type ListUsageRecordYearlyResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYearly `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_record_yesterday_response.go b/rest/api/v2010/model_list_usage_record_yesterday_response.go new file mode 100644 index 000000000..1300b93b2 --- /dev/null +++ b/rest/api/v2010/model_list_usage_record_yesterday_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordYesterdayResponse struct for ListUsageRecordYesterdayResponse +type ListUsageRecordYesterdayResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageRecords []ApiV2010AccountUsageUsageRecordUsageRecordYesterday `json:"UsageRecords,omitempty"` +} diff --git a/rest/api/v2010/model_list_usage_trigger_response.go b/rest/api/v2010/model_list_usage_trigger_response.go new file mode 100644 index 000000000..ca279fa86 --- /dev/null +++ b/rest/api/v2010/model_list_usage_trigger_response.go @@ -0,0 +1,23 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageTriggerResponse struct for ListUsageTriggerResponse +type ListUsageTriggerResponse struct { + End int32 `json:"End,omitempty"` + FirstPageUri string `json:"FirstPageUri,omitempty"` + NextPageUri string `json:"NextPageUri,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUri string `json:"PreviousPageUri,omitempty"` + Start int32 `json:"Start,omitempty"` + Uri string `json:"Uri,omitempty"` + UsageTriggers []ApiV2010AccountUsageUsageTrigger `json:"UsageTriggers,omitempty"` +} diff --git a/rest/api/v2010/model_update_account_request.go b/rest/api/v2010/model_update_account_request.go new file mode 100644 index 000000000..ccec46825 --- /dev/null +++ b/rest/api/v2010/model_update_account_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAccountRequest struct for UpdateAccountRequest +type UpdateAccountRequest struct { + // Update the human-readable description of this Account + FriendlyName string `json:"FriendlyName,omitempty"` + // Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it. + Status string `json:"Status,omitempty"` +} diff --git a/rest/api/v2010/model_update_address_request.go b/rest/api/v2010/model_update_address_request.go new file mode 100644 index 000000000..bc03e2e75 --- /dev/null +++ b/rest/api/v2010/model_update_address_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAddressRequest struct for UpdateAddressRequest +type UpdateAddressRequest struct { + // Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide. + AutoCorrectAddress bool `json:"AutoCorrectAddress,omitempty"` + // The city of the address. + City string `json:"City,omitempty"` + // The name to associate with the address. + CustomerName string `json:"CustomerName,omitempty"` + // Whether to enable emergency calling on the address. Can be: `true` or `false`. + EmergencyEnabled bool `json:"EmergencyEnabled,omitempty"` + // A descriptive string that you create to describe the address. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The postal code of the address. + PostalCode string `json:"PostalCode,omitempty"` + // The state or region of the address. + Region string `json:"Region,omitempty"` + // The number and street address of the address. + Street string `json:"Street,omitempty"` +} diff --git a/rest/api/v2010/model_update_application_request.go b/rest/api/v2010/model_update_application_request.go new file mode 100644 index 000000000..5bab4d43d --- /dev/null +++ b/rest/api/v2010/model_update_application_request.go @@ -0,0 +1,44 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateApplicationRequest struct for UpdateApplicationRequest +type UpdateApplicationRequest struct { + // The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version. + ApiVersion string `json:"ApiVersion,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The URL we should call using a POST method to send message status information to your application. + MessageStatusCallback string `json:"MessageStatusCallback,omitempty"` + // The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility. + SmsStatusCallback string `json:"SmsStatusCallback,omitempty"` + // The URL we should call when the phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The URL we should call when the phone number assigned to this application receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_update_call_feedback_request.go b/rest/api/v2010/model_update_call_feedback_request.go new file mode 100644 index 000000000..26fa5654f --- /dev/null +++ b/rest/api/v2010/model_update_call_feedback_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCallFeedbackRequest struct for UpdateCallFeedbackRequest +type UpdateCallFeedbackRequest struct { + // One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`. + Issue []string `json:"Issue,omitempty"` + // The call quality expressed as an integer from `1` to `5` where `1` represents very poor call quality and `5` represents a perfect call. + QualityScore int32 `json:"QualityScore"` +} diff --git a/rest/api/v2010/model_update_call_recording_request.go b/rest/api/v2010/model_update_call_recording_request.go new file mode 100644 index 000000000..86ca454f3 --- /dev/null +++ b/rest/api/v2010/model_update_call_recording_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCallRecordingRequest struct for UpdateCallRecordingRequest +type UpdateCallRecordingRequest struct { + // Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + PauseBehavior string `json:"PauseBehavior,omitempty"` + // The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. + Status string `json:"Status"` +} diff --git a/rest/api/v2010/model_update_call_request.go b/rest/api/v2010/model_update_call_request.go new file mode 100644 index 000000000..409416b7d --- /dev/null +++ b/rest/api/v2010/model_update_call_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCallRequest struct for UpdateCallRequest +type UpdateCallRequest struct { + // The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + FallbackMethod string `json:"FallbackMethod,omitempty"` + // The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored. + FallbackUrl string `json:"FallbackUrl,omitempty"` + // The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + Method string `json:"Method,omitempty"` + // The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress. + Status string `json:"Status,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted). + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive + Twiml string `json:"Twiml,omitempty"` + // The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls). + Url string `json:"Url,omitempty"` +} diff --git a/rest/api/v2010/model_update_conference_recording_request.go b/rest/api/v2010/model_update_conference_recording_request.go new file mode 100644 index 000000000..6e33b5e0f --- /dev/null +++ b/rest/api/v2010/model_update_conference_recording_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConferenceRecordingRequest struct for UpdateConferenceRecordingRequest +type UpdateConferenceRecordingRequest struct { + // Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`. + PauseBehavior string `json:"PauseBehavior,omitempty"` + // The new status of the recording. Can be: `stopped`, `paused`, `in-progress`. + Status string `json:"Status"` +} diff --git a/rest/api/v2010/model_update_conference_request.go b/rest/api/v2010/model_update_conference_request.go new file mode 100644 index 000000000..640433bce --- /dev/null +++ b/rest/api/v2010/model_update_conference_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConferenceRequest struct for UpdateConferenceRequest +type UpdateConferenceRequest struct { + // The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST` + AnnounceMethod string `json:"AnnounceMethod,omitempty"` + // The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `` or ``. + AnnounceUrl string `json:"AnnounceUrl,omitempty"` + // The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants + Status string `json:"Status,omitempty"` +} diff --git a/rest/api/v2010/model_update_connect_app_request.go b/rest/api/v2010/model_update_connect_app_request.go new file mode 100644 index 000000000..be450121c --- /dev/null +++ b/rest/api/v2010/model_update_connect_app_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConnectAppRequest struct for UpdateConnectAppRequest +type UpdateConnectAppRequest struct { + // The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App. + AuthorizeRedirectUrl string `json:"AuthorizeRedirectUrl,omitempty"` + // The company name to set for the Connect App. + CompanyName string `json:"CompanyName,omitempty"` + // The HTTP method to use when calling `deauthorize_callback_url`. + DeauthorizeCallbackMethod string `json:"DeauthorizeCallbackMethod,omitempty"` + // The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App. + DeauthorizeCallbackUrl string `json:"DeauthorizeCallbackUrl,omitempty"` + // A description of the Connect App. + Description string `json:"Description,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A public URL where users can obtain more information about this Connect App. + HomepageUrl string `json:"HomepageUrl,omitempty"` + // A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`. + Permissions []string `json:"Permissions,omitempty"` +} diff --git a/rest/api/v2010/model_update_incoming_phone_number_request.go b/rest/api/v2010/model_update_incoming_phone_number_request.go new file mode 100644 index 000000000..bf8f6c770 --- /dev/null +++ b/rest/api/v2010/model_update_incoming_phone_number_request.go @@ -0,0 +1,60 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateIncomingPhoneNumberRequest struct for UpdateIncomingPhoneNumberRequest +type UpdateIncomingPhoneNumberRequest struct { + // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers). + AccountSid string `json:"AccountSid,omitempty"` + // The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations. + AddressSid string `json:"AddressSid,omitempty"` + // The API version to use for incoming calls made to the phone number. The default is `2010-04-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. + BundleSid string `json:"BundleSid,omitempty"` + // The SID of the emergency address configuration to use for emergency calling from this phone number. + EmergencyAddressSid string `json:"EmergencyAddressSid,omitempty"` + // The configuration status parameter that determines whether the phone number is enabled for emergency calling. + EmergencyStatus string `json:"EmergencyStatus,omitempty"` + // A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations. + IdentitySid string `json:"IdentitySid,omitempty"` + // The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when the phone number receives an incoming SMS message. + SmsUrl string `json:"SmsUrl,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. + TrunkSid string `json:"TrunkSid,omitempty"` + // The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + // Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`. + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + // The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`. + VoiceReceiveMode string `json:"VoiceReceiveMode,omitempty"` + // The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_update_key_request.go b/rest/api/v2010/model_update_key_request.go new file mode 100644 index 000000000..9daaabdb8 --- /dev/null +++ b/rest/api/v2010/model_update_key_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateKeyRequest struct for UpdateKeyRequest +type UpdateKeyRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_update_member_request.go b/rest/api/v2010/model_update_member_request.go new file mode 100644 index 000000000..d6cc0ee54 --- /dev/null +++ b/rest/api/v2010/model_update_member_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateMemberRequest struct for UpdateMemberRequest +type UpdateMemberRequest struct { + // How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters. + Method string `json:"Method,omitempty"` + // The absolute URL of the Queue resource. + Url string `json:"Url"` +} diff --git a/rest/api/v2010/model_update_message_request.go b/rest/api/v2010/model_update_message_request.go new file mode 100644 index 000000000..f245883b8 --- /dev/null +++ b/rest/api/v2010/model_update_message_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateMessageRequest struct for UpdateMessageRequest +type UpdateMessageRequest struct { + // The text of the message you want to send. Can be up to 1,600 characters long. + Body string `json:"Body"` +} diff --git a/rest/api/v2010/model_update_outgoing_caller_id_request.go b/rest/api/v2010/model_update_outgoing_caller_id_request.go new file mode 100644 index 000000000..34aef1cf1 --- /dev/null +++ b/rest/api/v2010/model_update_outgoing_caller_id_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateOutgoingCallerIdRequest struct for UpdateOutgoingCallerIdRequest +type UpdateOutgoingCallerIdRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_update_participant_request.go b/rest/api/v2010/model_update_participant_request.go new file mode 100644 index 000000000..c4c9d0129 --- /dev/null +++ b/rest/api/v2010/model_update_participant_request.go @@ -0,0 +1,38 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateParticipantRequest struct for UpdateParticipantRequest +type UpdateParticipantRequest struct { + // The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. + AnnounceMethod string `json:"AnnounceMethod,omitempty"` + // The URL we call using the `announce_method` for an announcement to the participant. The URL must return an MP3 file, a WAV file, or a TwiML document that contains `` or `` commands. + AnnounceUrl string `json:"AnnounceUrl,omitempty"` + // Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`. + BeepOnExit bool `json:"BeepOnExit,omitempty"` + // The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`. + CallSidToCoach string `json:"CallSidToCoach,omitempty"` + // Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined. + Coaching bool `json:"Coaching,omitempty"` + // Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. + EndConferenceOnExit bool `json:"EndConferenceOnExit,omitempty"` + // Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference. + Hold bool `json:"Hold,omitempty"` + // The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`. + HoldMethod string `json:"HoldMethod,omitempty"` + // The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains the ``, `` or `` commands. + HoldUrl string `json:"HoldUrl,omitempty"` + // Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`. + Muted bool `json:"Muted,omitempty"` + // The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + WaitMethod string `json:"WaitMethod,omitempty"` + // The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitUrl string `json:"WaitUrl,omitempty"` +} diff --git a/rest/api/v2010/model_update_payments_request.go b/rest/api/v2010/model_update_payments_request.go new file mode 100644 index 000000000..28f74c64a --- /dev/null +++ b/rest/api/v2010/model_update_payments_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdatePaymentsRequest struct for UpdatePaymentsRequest +type UpdatePaymentsRequest struct { + // The piece of payment information that you wish the caller to enter. Must be one of `payment-card-number`, `expiration-date`, `security-code`, `postal-code`, `bank-routing-number`, or `bank-account-number`. + Capture string `json:"Capture,omitempty"` + // A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. + IdempotencyKey string `json:"IdempotencyKey"` + // Indicates whether the current payment session should be cancelled or completed. When `cancel` the payment session is cancelled. When `complete`, Twilio sends the payment information to the selected connector for processing. + Status string `json:"Status,omitempty"` + // Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. + StatusCallback string `json:"StatusCallback"` +} diff --git a/rest/api/v2010/model_update_queue_request.go b/rest/api/v2010/model_update_queue_request.go new file mode 100644 index 000000000..feae58071 --- /dev/null +++ b/rest/api/v2010/model_update_queue_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateQueueRequest struct for UpdateQueueRequest +type UpdateQueueRequest struct { + // A descriptive string that you created to describe this resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000. + MaxSize int32 `json:"MaxSize,omitempty"` +} diff --git a/rest/api/v2010/model_update_short_code_request.go b/rest/api/v2010/model_update_short_code_request.go new file mode 100644 index 000000000..410d6687f --- /dev/null +++ b/rest/api/v2010/model_update_short_code_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateShortCodeRequest struct for UpdateShortCodeRequest +type UpdateShortCodeRequest struct { + // The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. + ApiVersion string `json:"ApiVersion,omitempty"` + // A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code. + FriendlyName string `json:"FriendlyName,omitempty"` + // The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call when receiving an incoming SMS message to this short code. + SmsUrl string `json:"SmsUrl,omitempty"` +} diff --git a/rest/api/v2010/model_update_signing_key_request.go b/rest/api/v2010/model_update_signing_key_request.go new file mode 100644 index 000000000..802e6e37f --- /dev/null +++ b/rest/api/v2010/model_update_signing_key_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSigningKeyRequest struct for UpdateSigningKeyRequest +type UpdateSigningKeyRequest struct { + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/model_update_sip_credential_list_request.go b/rest/api/v2010/model_update_sip_credential_list_request.go new file mode 100644 index 000000000..f414af0cb --- /dev/null +++ b/rest/api/v2010/model_update_sip_credential_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSipCredentialListRequest struct for UpdateSipCredentialListRequest +type UpdateSipCredentialListRequest struct { + // A human readable descriptive text for a CredentialList, up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/api/v2010/model_update_sip_credential_request.go b/rest/api/v2010/model_update_sip_credential_request.go new file mode 100644 index 000000000..836ae586d --- /dev/null +++ b/rest/api/v2010/model_update_sip_credential_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSipCredentialRequest struct for UpdateSipCredentialRequest +type UpdateSipCredentialRequest struct { + // The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`) + Password string `json:"Password,omitempty"` +} diff --git a/rest/api/v2010/model_update_sip_domain_request.go b/rest/api/v2010/model_update_sip_domain_request.go new file mode 100644 index 000000000..8b131a8b0 --- /dev/null +++ b/rest/api/v2010/model_update_sip_domain_request.go @@ -0,0 +1,40 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSipDomainRequest struct for UpdateSipDomainRequest +type UpdateSipDomainRequest struct { + // The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. + ByocTrunkSid string `json:"ByocTrunkSid,omitempty"` + // The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \"-\" and must end with `sip.twilio.com`. + DomainName string `json:"DomainName,omitempty"` + // Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. + EmergencyCallerSid string `json:"EmergencyCallerSid,omitempty"` + // Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. + EmergencyCallingEnabled bool `json:"EmergencyCallingEnabled,omitempty"` + // A descriptive string that you created to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. + Secure bool `json:"Secure,omitempty"` + // Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not. + SipRegistration bool `json:"SipRegistration,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url` + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`. + VoiceStatusCallbackMethod string `json:"VoiceStatusCallbackMethod,omitempty"` + // The URL that we should call to pass status parameters (such as call ended) to your application. + VoiceStatusCallbackUrl string `json:"VoiceStatusCallbackUrl,omitempty"` + // The URL we should call when the domain receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/api/v2010/model_update_sip_ip_access_control_list_request.go b/rest/api/v2010/model_update_sip_ip_access_control_list_request.go new file mode 100644 index 000000000..f8226b7ca --- /dev/null +++ b/rest/api/v2010/model_update_sip_ip_access_control_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSipIpAccessControlListRequest struct for UpdateSipIpAccessControlListRequest +type UpdateSipIpAccessControlListRequest struct { + // A human readable descriptive text, up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/api/v2010/model_update_sip_ip_address_request.go b/rest/api/v2010/model_update_sip_ip_address_request.go new file mode 100644 index 000000000..ba9fbe84c --- /dev/null +++ b/rest/api/v2010/model_update_sip_ip_address_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSipIpAddressRequest struct for UpdateSipIpAddressRequest +type UpdateSipIpAddressRequest struct { + // An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used. + CidrPrefixLength int32 `json:"CidrPrefixLength,omitempty"` + // A human readable descriptive text for this resource, up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today. + IpAddress string `json:"IpAddress,omitempty"` +} diff --git a/rest/api/v2010/model_update_usage_trigger_request.go b/rest/api/v2010/model_update_usage_trigger_request.go new file mode 100644 index 000000000..3afeee548 --- /dev/null +++ b/rest/api/v2010/model_update_usage_trigger_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateUsageTriggerRequest struct for UpdateUsageTriggerRequest +type UpdateUsageTriggerRequest struct { + // The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we should call using `callback_method` when the trigger fires. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/api/v2010/response.go b/rest/api/v2010/response.go new file mode 100644 index 000000000..ffbce503f --- /dev/null +++ b/rest/api/v2010/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Api + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/autopilot/v1/.openapi-generator-ignore b/rest/autopilot/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/autopilot/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/autopilot/v1/README.md b/rest/autopilot/v1/README.md new file mode 100644 index 000000000..8ce4bb1a1 --- /dev/null +++ b/rest/autopilot/v1/README.md @@ -0,0 +1,159 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAssistant**](docs/DefaultApi.md#createassistant) | **Post** /v1/Assistants | +*DefaultApi* | [**CreateField**](docs/DefaultApi.md#createfield) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +*DefaultApi* | [**CreateFieldType**](docs/DefaultApi.md#createfieldtype) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes | +*DefaultApi* | [**CreateFieldValue**](docs/DefaultApi.md#createfieldvalue) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +*DefaultApi* | [**CreateModelBuild**](docs/DefaultApi.md#createmodelbuild) | **Post** /v1/Assistants/{AssistantSid}/ModelBuilds | +*DefaultApi* | [**CreateQuery**](docs/DefaultApi.md#createquery) | **Post** /v1/Assistants/{AssistantSid}/Queries | +*DefaultApi* | [**CreateSample**](docs/DefaultApi.md#createsample) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +*DefaultApi* | [**CreateTask**](docs/DefaultApi.md#createtask) | **Post** /v1/Assistants/{AssistantSid}/Tasks | +*DefaultApi* | [**CreateWebhook**](docs/DefaultApi.md#createwebhook) | **Post** /v1/Assistants/{AssistantSid}/Webhooks | +*DefaultApi* | [**DeleteAssistant**](docs/DefaultApi.md#deleteassistant) | **Delete** /v1/Assistants/{Sid} | +*DefaultApi* | [**DeleteField**](docs/DefaultApi.md#deletefield) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +*DefaultApi* | [**DeleteFieldType**](docs/DefaultApi.md#deletefieldtype) | **Delete** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**DeleteFieldValue**](docs/DefaultApi.md#deletefieldvalue) | **Delete** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +*DefaultApi* | [**DeleteModelBuild**](docs/DefaultApi.md#deletemodelbuild) | **Delete** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**DeleteQuery**](docs/DefaultApi.md#deletequery) | **Delete** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**DeleteSample**](docs/DefaultApi.md#deletesample) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**DeleteTask**](docs/DefaultApi.md#deletetask) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**DeleteWebhook**](docs/DefaultApi.md#deletewebhook) | **Delete** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchAssistant**](docs/DefaultApi.md#fetchassistant) | **Get** /v1/Assistants/{Sid} | +*DefaultApi* | [**FetchDefaults**](docs/DefaultApi.md#fetchdefaults) | **Get** /v1/Assistants/{AssistantSid}/Defaults | +*DefaultApi* | [**FetchDialogue**](docs/DefaultApi.md#fetchdialogue) | **Get** /v1/Assistants/{AssistantSid}/Dialogues/{Sid} | +*DefaultApi* | [**FetchField**](docs/DefaultApi.md#fetchfield) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +*DefaultApi* | [**FetchFieldType**](docs/DefaultApi.md#fetchfieldtype) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**FetchFieldValue**](docs/DefaultApi.md#fetchfieldvalue) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +*DefaultApi* | [**FetchModelBuild**](docs/DefaultApi.md#fetchmodelbuild) | **Get** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**FetchQuery**](docs/DefaultApi.md#fetchquery) | **Get** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**FetchSample**](docs/DefaultApi.md#fetchsample) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**FetchStyleSheet**](docs/DefaultApi.md#fetchstylesheet) | **Get** /v1/Assistants/{AssistantSid}/StyleSheet | +*DefaultApi* | [**FetchTask**](docs/DefaultApi.md#fetchtask) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**FetchTaskActions**](docs/DefaultApi.md#fetchtaskactions) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +*DefaultApi* | [**FetchTaskStatistics**](docs/DefaultApi.md#fetchtaskstatistics) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics | +*DefaultApi* | [**FetchWebhook**](docs/DefaultApi.md#fetchwebhook) | **Get** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | +*DefaultApi* | [**ListAssistant**](docs/DefaultApi.md#listassistant) | **Get** /v1/Assistants | +*DefaultApi* | [**ListField**](docs/DefaultApi.md#listfield) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +*DefaultApi* | [**ListFieldType**](docs/DefaultApi.md#listfieldtype) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes | +*DefaultApi* | [**ListFieldValue**](docs/DefaultApi.md#listfieldvalue) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +*DefaultApi* | [**ListModelBuild**](docs/DefaultApi.md#listmodelbuild) | **Get** /v1/Assistants/{AssistantSid}/ModelBuilds | +*DefaultApi* | [**ListQuery**](docs/DefaultApi.md#listquery) | **Get** /v1/Assistants/{AssistantSid}/Queries | +*DefaultApi* | [**ListSample**](docs/DefaultApi.md#listsample) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +*DefaultApi* | [**ListTask**](docs/DefaultApi.md#listtask) | **Get** /v1/Assistants/{AssistantSid}/Tasks | +*DefaultApi* | [**ListWebhook**](docs/DefaultApi.md#listwebhook) | **Get** /v1/Assistants/{AssistantSid}/Webhooks | +*DefaultApi* | [**UpdateAssistant**](docs/DefaultApi.md#updateassistant) | **Post** /v1/Assistants/{Sid} | +*DefaultApi* | [**UpdateDefaults**](docs/DefaultApi.md#updatedefaults) | **Post** /v1/Assistants/{AssistantSid}/Defaults | +*DefaultApi* | [**UpdateFieldType**](docs/DefaultApi.md#updatefieldtype) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**UpdateModelBuild**](docs/DefaultApi.md#updatemodelbuild) | **Post** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**UpdateQuery**](docs/DefaultApi.md#updatequery) | **Post** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**UpdateRestoreAssistant**](docs/DefaultApi.md#updaterestoreassistant) | **Post** /v1/Assistants/Restore | +*DefaultApi* | [**UpdateSample**](docs/DefaultApi.md#updatesample) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**UpdateStyleSheet**](docs/DefaultApi.md#updatestylesheet) | **Post** /v1/Assistants/{AssistantSid}/StyleSheet | +*DefaultApi* | [**UpdateTask**](docs/DefaultApi.md#updatetask) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**UpdateTaskActions**](docs/DefaultApi.md#updatetaskactions) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +*DefaultApi* | [**UpdateWebhook**](docs/DefaultApi.md#updatewebhook) | **Post** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | + + +## Documentation For Models + + - [AutopilotV1Assistant](docs/AutopilotV1Assistant.md) + - [AutopilotV1AssistantDefaults](docs/AutopilotV1AssistantDefaults.md) + - [AutopilotV1AssistantDialogue](docs/AutopilotV1AssistantDialogue.md) + - [AutopilotV1AssistantFieldType](docs/AutopilotV1AssistantFieldType.md) + - [AutopilotV1AssistantFieldTypeFieldValue](docs/AutopilotV1AssistantFieldTypeFieldValue.md) + - [AutopilotV1AssistantModelBuild](docs/AutopilotV1AssistantModelBuild.md) + - [AutopilotV1AssistantQuery](docs/AutopilotV1AssistantQuery.md) + - [AutopilotV1AssistantStyleSheet](docs/AutopilotV1AssistantStyleSheet.md) + - [AutopilotV1AssistantTask](docs/AutopilotV1AssistantTask.md) + - [AutopilotV1AssistantTaskField](docs/AutopilotV1AssistantTaskField.md) + - [AutopilotV1AssistantTaskSample](docs/AutopilotV1AssistantTaskSample.md) + - [AutopilotV1AssistantTaskTaskActions](docs/AutopilotV1AssistantTaskTaskActions.md) + - [AutopilotV1AssistantTaskTaskStatistics](docs/AutopilotV1AssistantTaskTaskStatistics.md) + - [AutopilotV1AssistantWebhook](docs/AutopilotV1AssistantWebhook.md) + - [AutopilotV1RestoreAssistant](docs/AutopilotV1RestoreAssistant.md) + - [CreateAssistantRequest](docs/CreateAssistantRequest.md) + - [CreateFieldRequest](docs/CreateFieldRequest.md) + - [CreateFieldTypeRequest](docs/CreateFieldTypeRequest.md) + - [CreateFieldValueRequest](docs/CreateFieldValueRequest.md) + - [CreateModelBuildRequest](docs/CreateModelBuildRequest.md) + - [CreateQueryRequest](docs/CreateQueryRequest.md) + - [CreateSampleRequest](docs/CreateSampleRequest.md) + - [CreateTaskRequest](docs/CreateTaskRequest.md) + - [CreateWebhookRequest](docs/CreateWebhookRequest.md) + - [ListAssistantResponse](docs/ListAssistantResponse.md) + - [ListAssistantResponseMeta](docs/ListAssistantResponseMeta.md) + - [ListFieldResponse](docs/ListFieldResponse.md) + - [ListFieldTypeResponse](docs/ListFieldTypeResponse.md) + - [ListFieldValueResponse](docs/ListFieldValueResponse.md) + - [ListModelBuildResponse](docs/ListModelBuildResponse.md) + - [ListQueryResponse](docs/ListQueryResponse.md) + - [ListSampleResponse](docs/ListSampleResponse.md) + - [ListTaskResponse](docs/ListTaskResponse.md) + - [ListWebhookResponse](docs/ListWebhookResponse.md) + - [UpdateAssistantRequest](docs/UpdateAssistantRequest.md) + - [UpdateDefaultsRequest](docs/UpdateDefaultsRequest.md) + - [UpdateFieldTypeRequest](docs/UpdateFieldTypeRequest.md) + - [UpdateModelBuildRequest](docs/UpdateModelBuildRequest.md) + - [UpdateQueryRequest](docs/UpdateQueryRequest.md) + - [UpdateRestoreAssistantRequest](docs/UpdateRestoreAssistantRequest.md) + - [UpdateSampleRequest](docs/UpdateSampleRequest.md) + - [UpdateStyleSheetRequest](docs/UpdateStyleSheetRequest.md) + - [UpdateTaskActionsRequest](docs/UpdateTaskActionsRequest.md) + - [UpdateTaskRequest](docs/UpdateTaskRequest.md) + - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/autopilot/v1/api_default.go b/rest/autopilot/v1/api_default.go new file mode 100644 index 000000000..81563f999 --- /dev/null +++ b/rest/autopilot/v1/api_default.go @@ -0,0 +1,2153 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://autopilot.twilio.com"), + } +} +// CreateAssistantParams Optional parameters for the method 'CreateAssistant' +type CreateAssistantParams struct { + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateAssistant Method for CreateAssistant + * @param optional nil or *CreateAssistantOpts - Optional Parameters: + * @param "CallbackEvents" (string) - Reserved. + * @param "CallbackUrl" (string) - Reserved. + * @param "Defaults" (map[string]interface{}) - A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + * @param "LogQueries" (bool) - Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. + * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. +@return AutopilotV1Assistant +*/ +func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*AutopilotV1Assistant, error) { + path := "/v1/Assistants" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) + + if err != nil { + return nil, err + } + + data.Set("Defaults", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldParams Optional parameters for the method 'CreateField' +type CreateFieldParams struct { + FieldType *string `json:"FieldType,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateField Method for CreateField + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource. + * @param optional nil or *CreateFieldOpts - Optional Parameters: + * @param "FieldType" (string) - The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. +@return AutopilotV1AssistantTaskField +*/ +func (c *DefaultApiService) CreateField(AssistantSid string, TaskSid string, params *CreateFieldParams) (*AutopilotV1AssistantTaskField, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FieldType != nil { + data.Set("FieldType", *params.FieldType) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldTypeParams Optional parameters for the method 'CreateFieldType' +type CreateFieldTypeParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateFieldType Method for CreateFieldType + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. + * @param optional nil or *CreateFieldTypeOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. +@return AutopilotV1AssistantFieldType +*/ +func (c *DefaultApiService) CreateFieldType(AssistantSid string, params *CreateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldValueParams Optional parameters for the method 'CreateFieldValue' +type CreateFieldValueParams struct { + Language *string `json:"Language,omitempty"` + SynonymOf *string `json:"SynonymOf,omitempty"` + Value *string `json:"Value,omitempty"` +} + +/* +CreateFieldValue Method for CreateFieldValue + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource. + * @param FieldTypeSid The SID of the Field Type associated with the Field Value. + * @param optional nil or *CreateFieldValueOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` + * @param "SynonymOf" (string) - The string value that indicates which word the field value is a synonym of. + * @param "Value" (string) - The Field Value data. +@return AutopilotV1AssistantFieldTypeFieldValue +*/ +func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid string, params *CreateFieldValueParams) (*AutopilotV1AssistantFieldTypeFieldValue, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SynonymOf != nil { + data.Set("SynonymOf", *params.SynonymOf) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateModelBuildParams Optional parameters for the method 'CreateModelBuild' +type CreateModelBuildParams struct { + StatusCallback *string `json:"StatusCallback,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateModelBuild Method for CreateModelBuild + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. + * @param optional nil or *CreateModelBuildOpts - Optional Parameters: + * @param "StatusCallback" (string) - The URL we should call using a POST method to send status information to your application. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. +@return AutopilotV1AssistantModelBuild +*/ +func (c *DefaultApiService) CreateModelBuild(AssistantSid string, params *CreateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateQueryParams Optional parameters for the method 'CreateQuery' +type CreateQueryParams struct { + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Query *string `json:"Query,omitempty"` + Tasks *string `json:"Tasks,omitempty"` +} + +/* +CreateQuery Method for CreateQuery + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. + * @param optional nil or *CreateQueryOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`. + * @param "ModelBuild" (string) - The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. + * @param "Query" (string) - The end-user's natural language input. It can be up to 2048 characters long. + * @param "Tasks" (string) - The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. +@return AutopilotV1AssistantQuery +*/ +func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQueryParams) (*AutopilotV1AssistantQuery, error) { + path := "/v1/Assistants/{AssistantSid}/Queries" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Query != nil { + data.Set("Query", *params.Query) + } + if params != nil && params.Tasks != nil { + data.Set("Tasks", *params.Tasks) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSampleParams Optional parameters for the method 'CreateSample' +type CreateSampleParams struct { + Language *string `json:"Language,omitempty"` + SourceChannel *string `json:"SourceChannel,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` +} + +/* +CreateSample Method for CreateSample + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. + * @param optional nil or *CreateSampleOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`. + * @param "SourceChannel" (string) - The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. + * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). +@return AutopilotV1AssistantTaskSample +*/ +func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, params *CreateSampleParams) (*AutopilotV1AssistantTaskSample, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTaskParams Optional parameters for the method 'CreateTask' +type CreateTaskParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateTask Method for CreateTask + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. + * @param optional nil or *CreateTaskOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique. + * @param "ActionsUrl" (string) - The URL from which the Assistant can fetch actions. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. +@return AutopilotV1AssistantTask +*/ +func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskParams) (*AutopilotV1AssistantTask, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWebhookParams Optional parameters for the method 'CreateWebhook' +type CreateWebhookParams struct { + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +CreateWebhook Method for CreateWebhook + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. + * @param optional nil or *CreateWebhookOpts - Optional Parameters: + * @param "Events" (string) - The list of space-separated events that this Webhook will subscribe to. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. + * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. + * @param "WebhookUrl" (string) - The URL associated with this Webhook. +@return AutopilotV1AssistantWebhook +*/ +func (c *DefaultApiService) CreateWebhook(AssistantSid string, params *CreateWebhookParams) (*AutopilotV1AssistantWebhook, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteAssistant Method for DeleteAssistant + * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to delete. +*/ +func (c *DefaultApiService) DeleteAssistant(Sid string) (error) { + path := "/v1/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteField Method for DeleteField + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Field resource to delete. +*/ +func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFieldType Method for DeleteFieldType + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to delete. +*/ +func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFieldValue Method for DeleteFieldValue + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete. + * @param FieldTypeSid The SID of the Field Type associated with the Field Value to delete. + * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to delete. +*/ +func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteModelBuild Method for DeleteModelBuild + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to delete. +*/ +func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteQuery Method for DeleteQuery + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Query resource to delete. +*/ +func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSample Method for DeleteSample + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to delete. +*/ +func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTask Method for DeleteTask + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Task resource to delete. +*/ +func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWebhook Method for DeleteWebhook + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. +*/ +func (c *DefaultApiService) DeleteWebhook(AssistantSid string, Sid string) (error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchAssistant Method for FetchAssistant + * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to fetch. +@return AutopilotV1Assistant +*/ +func (c *DefaultApiService) FetchAssistant(Sid string) (*AutopilotV1Assistant, error) { + path := "/v1/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDefaults Method for FetchDefaults + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. +@return AutopilotV1AssistantDefaults +*/ +func (c *DefaultApiService) FetchDefaults(AssistantSid string) (*AutopilotV1AssistantDefaults, error) { + path := "/v1/Assistants/{AssistantSid}/Defaults" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDialogue Method for FetchDialogue + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Dialogue resource to fetch. +@return AutopilotV1AssistantDialogue +*/ +func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string) (*AutopilotV1AssistantDialogue, error) { + path := "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantDialogue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchField Method for FetchField + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Field resource to fetch. +@return AutopilotV1AssistantTaskField +*/ +func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskField, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFieldType Method for FetchFieldType + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to fetch. +@return AutopilotV1AssistantFieldType +*/ +func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string) (*AutopilotV1AssistantFieldType, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFieldValue Method for FetchFieldValue + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch. + * @param FieldTypeSid The SID of the Field Type associated with the Field Value to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the FieldValue resource to fetch. +@return AutopilotV1AssistantFieldTypeFieldValue +*/ +func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (*AutopilotV1AssistantFieldTypeFieldValue, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchModelBuild Method for FetchModelBuild + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch. +@return AutopilotV1AssistantModelBuild +*/ +func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string) (*AutopilotV1AssistantModelBuild, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchQuery Method for FetchQuery + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Query resource to fetch. +@return AutopilotV1AssistantQuery +*/ +func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string) (*AutopilotV1AssistantQuery, error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSample Method for FetchSample + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. + * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to fetch. +@return AutopilotV1AssistantTaskSample +*/ +func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string) (*AutopilotV1AssistantTaskSample, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchStyleSheet Method for FetchStyleSheet +Returns Style sheet JSON object for the Assistant + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. +@return AutopilotV1AssistantStyleSheet +*/ +func (c *DefaultApiService) FetchStyleSheet(AssistantSid string) (*AutopilotV1AssistantStyleSheet, error) { + path := "/v1/Assistants/{AssistantSid}/StyleSheet" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTask Method for FetchTask + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Task resource to fetch. +@return AutopilotV1AssistantTask +*/ +func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string) (*AutopilotV1AssistantTask, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskActions Method for FetchTaskActions +Returns JSON actions for the Task. + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to fetch were defined. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to fetch were defined. +@return AutopilotV1AssistantTaskTaskActions +*/ +func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskActions, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskStatistics Method for FetchTaskStatistics + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) that is associated with the resource to fetch. +@return AutopilotV1AssistantTaskTaskStatistics +*/ +func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string) (*AutopilotV1AssistantTaskTaskStatistics, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskTaskStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWebhook Method for FetchWebhook + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. +@return AutopilotV1AssistantWebhook +*/ +func (c *DefaultApiService) FetchWebhook(AssistantSid string, Sid string) (*AutopilotV1AssistantWebhook, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAssistantParams Optional parameters for the method 'ListAssistant' +type ListAssistantParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAssistant Method for ListAssistant + * @param optional nil or *ListAssistantOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAssistantResponse +*/ +func (c *DefaultApiService) ListAssistant(params *ListAssistantParams) (*ListAssistantResponse, error) { + path := "/v1/Assistants" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAssistantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldParams Optional parameters for the method 'ListField' +type ListFieldParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListField Method for ListField + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resources to read. + * @param optional nil or *ListFieldOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldResponse +*/ +func (c *DefaultApiService) ListField(AssistantSid string, TaskSid string, params *ListFieldParams) (*ListFieldResponse, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldTypeParams Optional parameters for the method 'ListFieldType' +type ListFieldTypeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFieldType Method for ListFieldType + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. + * @param optional nil or *ListFieldTypeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldTypeResponse +*/ +func (c *DefaultApiService) ListFieldType(AssistantSid string, params *ListFieldTypeParams) (*ListFieldTypeResponse, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldValueParams Optional parameters for the method 'ListFieldValue' +type ListFieldValueParams struct { + Language *string `json:"Language,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFieldValue Method for ListFieldValue + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read. + * @param FieldTypeSid The SID of the Field Type associated with the Field Value to read. + * @param optional nil or *ListFieldValueOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldValueResponse +*/ +func (c *DefaultApiService) ListFieldValue(AssistantSid string, FieldTypeSid string, params *ListFieldValueParams) (*ListFieldValueResponse, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldValueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListModelBuildParams Optional parameters for the method 'ListModelBuild' +type ListModelBuildParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListModelBuild Method for ListModelBuild + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. + * @param optional nil or *ListModelBuildOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListModelBuildResponse +*/ +func (c *DefaultApiService) ListModelBuild(AssistantSid string, params *ListModelBuildParams) (*ListModelBuildResponse, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListModelBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListQueryParams Optional parameters for the method 'ListQuery' +type ListQueryParams struct { + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Status *string `json:"Status,omitempty"` + DialogueSid *string `json:"DialogueSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListQuery Method for ListQuery + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. + * @param optional nil or *ListQueryOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`. + * @param "ModelBuild" (string) - The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. + * @param "Status" (string) - The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded` + * @param "DialogueSid" (string) - The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListQueryResponse +*/ +func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryParams) (*ListQueryResponse, error) { + path := "/v1/Assistants/{AssistantSid}/Queries" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.DialogueSid != nil { + data.Set("DialogueSid", *params.DialogueSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListQueryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSampleParams Optional parameters for the method 'ListSample' +type ListSampleParams struct { + Language *string `json:"Language,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSample Method for ListSample + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resources to read. + * @param optional nil or *ListSampleOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSampleResponse +*/ +func (c *DefaultApiService) ListSample(AssistantSid string, TaskSid string, params *ListSampleParams) (*ListSampleResponse, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSampleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskParams Optional parameters for the method 'ListTask' +type ListTaskParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTask Method for ListTask + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. + * @param optional nil or *ListTaskOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskResponse +*/ +func (c *DefaultApiService) ListTask(AssistantSid string, params *ListTaskParams) (*ListTaskResponse, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWebhookParams Optional parameters for the method 'ListWebhook' +type ListWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWebhook Method for ListWebhook + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. + * @param optional nil or *ListWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWebhookResponse +*/ +func (c *DefaultApiService) ListWebhook(AssistantSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAssistantParams Optional parameters for the method 'UpdateAssistant' +type UpdateAssistantParams struct { + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Defaults *map[string]interface{} `json:"Defaults,omitempty"` + DevelopmentStage *string `json:"DevelopmentStage,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateAssistant Method for UpdateAssistant + * @param Sid The Twilio-provided string that uniquely identifies the Assistant resource to update. + * @param optional nil or *UpdateAssistantOpts - Optional Parameters: + * @param "CallbackEvents" (string) - Reserved. + * @param "CallbackUrl" (string) - Reserved. + * @param "Defaults" (map[string]interface{}) - A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. + * @param "DevelopmentStage" (string) - A string describing the state of the assistant. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "LogQueries" (bool) - Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. + * @param "StyleSheet" (map[string]interface{}) - The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. +@return AutopilotV1Assistant +*/ +func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantParams) (*AutopilotV1Assistant, error) { + path := "/v1/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) + + if err != nil { + return nil, err + } + + data.Set("Defaults", fmt.Sprint(v)) + } + if params != nil && params.DevelopmentStage != nil { + data.Set("DevelopmentStage", *params.DevelopmentStage) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1Assistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDefaultsParams Optional parameters for the method 'UpdateDefaults' +type UpdateDefaultsParams struct { + Defaults *map[string]interface{} `json:"Defaults,omitempty"` +} + +/* +UpdateDefaults Method for UpdateDefaults + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param optional nil or *UpdateDefaultsOpts - Optional Parameters: + * @param "Defaults" (map[string]interface{}) - A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. +@return AutopilotV1AssistantDefaults +*/ +func (c *DefaultApiService) UpdateDefaults(AssistantSid string, params *UpdateDefaultsParams) (*AutopilotV1AssistantDefaults, error) { + path := "/v1/Assistants/{AssistantSid}/Defaults" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Defaults != nil { + v, err := json.Marshal(params.Defaults) + + if err != nil { + return nil, err + } + + data.Set("Defaults", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantDefaults{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFieldTypeParams Optional parameters for the method 'UpdateFieldType' +type UpdateFieldTypeParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateFieldType Method for UpdateFieldType + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update. + * @param Sid The Twilio-provided string that uniquely identifies the FieldType resource to update. + * @param optional nil or *UpdateFieldTypeOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. +@return AutopilotV1AssistantFieldType +*/ +func (c *DefaultApiService) UpdateFieldType(AssistantSid string, Sid string, params *UpdateFieldTypeParams) (*AutopilotV1AssistantFieldType, error) { + path := "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateModelBuildParams Optional parameters for the method 'UpdateModelBuild' +type UpdateModelBuildParams struct { + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateModelBuild Method for UpdateModelBuild + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the ModelBuild resource to update. + * @param optional nil or *UpdateModelBuildOpts - Optional Parameters: + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. +@return AutopilotV1AssistantModelBuild +*/ +func (c *DefaultApiService) UpdateModelBuild(AssistantSid string, Sid string, params *UpdateModelBuildParams) (*AutopilotV1AssistantModelBuild, error) { + path := "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateQueryParams Optional parameters for the method 'UpdateQuery' +type UpdateQueryParams struct { + SampleSid *string `json:"SampleSid,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateQuery Method for UpdateQuery + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Query resource to update. + * @param optional nil or *UpdateQueryOpts - Optional Parameters: + * @param "SampleSid" (string) - The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. + * @param "Status" (string) - The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` +@return AutopilotV1AssistantQuery +*/ +func (c *DefaultApiService) UpdateQuery(AssistantSid string, Sid string, params *UpdateQueryParams) (*AutopilotV1AssistantQuery, error) { + path := "/v1/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.SampleSid != nil { + data.Set("SampleSid", *params.SampleSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRestoreAssistantParams Optional parameters for the method 'UpdateRestoreAssistant' +type UpdateRestoreAssistantParams struct { + Assistant *string `json:"Assistant,omitempty"` +} + +/* +UpdateRestoreAssistant Method for UpdateRestoreAssistant + * @param optional nil or *UpdateRestoreAssistantOpts - Optional Parameters: + * @param "Assistant" (string) - The Twilio-provided string that uniquely identifies the Assistant resource to restore. +@return AutopilotV1RestoreAssistant +*/ +func (c *DefaultApiService) UpdateRestoreAssistant(params *UpdateRestoreAssistantParams) (*AutopilotV1RestoreAssistant, error) { + path := "/v1/Assistants/Restore" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Assistant != nil { + data.Set("Assistant", *params.Assistant) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1RestoreAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSampleParams Optional parameters for the method 'UpdateSample' +type UpdateSampleParams struct { + Language *string `json:"Language,omitempty"` + SourceChannel *string `json:"SourceChannel,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` +} + +/* +UpdateSample Method for UpdateSample + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to update. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Sample resource to update. + * @param optional nil or *UpdateSampleOpts - Optional Parameters: + * @param "Language" (string) - The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. + * @param "SourceChannel" (string) - The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. + * @param "TaggedText" (string) - The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). +@return AutopilotV1AssistantTaskSample +*/ +func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Sid string, params *UpdateSampleParams) (*AutopilotV1AssistantTaskSample, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateStyleSheetParams Optional parameters for the method 'UpdateStyleSheet' +type UpdateStyleSheetParams struct { + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` +} + +/* +UpdateStyleSheet Method for UpdateStyleSheet +Updates the style sheet for an Assistant identified by `assistant_sid`. + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param optional nil or *UpdateStyleSheetOpts - Optional Parameters: + * @param "StyleSheet" (map[string]interface{}) - The JSON string that describes the style sheet object. +@return AutopilotV1AssistantStyleSheet +*/ +func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *UpdateStyleSheetParams) (*AutopilotV1AssistantStyleSheet, error) { + path := "/v1/Assistants/{AssistantSid}/StyleSheet" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskParams Optional parameters for the method 'UpdateTask' +type UpdateTaskParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateTask Method for UpdateTask + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Task resource to update. + * @param optional nil or *UpdateTaskOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. + * @param "ActionsUrl" (string) - The URL from which the Assistant can fetch actions. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. +@return AutopilotV1AssistantTask +*/ +func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params *UpdateTaskParams) (*AutopilotV1AssistantTask, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskActionsParams Optional parameters for the method 'UpdateTaskActions' +type UpdateTaskActionsParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` +} + +/* +UpdateTaskActions Method for UpdateTaskActions +Updates the actions of an Task identified by {TaskSid} or {TaskUniqueName}. + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to update were defined. + * @param TaskSid The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to update were defined. + * @param optional nil or *UpdateTaskActionsOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. +@return AutopilotV1AssistantTaskTaskActions +*/ +func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid string, params *UpdateTaskActionsParams) (*AutopilotV1AssistantTaskTaskActions, error) { + path := "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' +type UpdateWebhookParams struct { + Events *string `json:"Events,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +UpdateWebhook Method for UpdateWebhook + * @param AssistantSid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to update. + * @param optional nil or *UpdateWebhookOpts - Optional Parameters: + * @param "Events" (string) - The list of space-separated events that this Webhook will subscribe to. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. + * @param "WebhookMethod" (string) - The method to be used when calling the webhook's URL. + * @param "WebhookUrl" (string) - The URL associated with this Webhook. +@return AutopilotV1AssistantWebhook +*/ +func (c *DefaultApiService) UpdateWebhook(AssistantSid string, Sid string, params *UpdateWebhookParams) (*AutopilotV1AssistantWebhook, error) { + path := "/v1/Assistants/{AssistantSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Events != nil { + data.Set("Events", *params.Events) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &AutopilotV1AssistantWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/autopilot/v1/docs/AutopilotV1Assistant.md b/rest/autopilot/v1/docs/AutopilotV1Assistant.md new file mode 100644 index 000000000..f9a6bfca8 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1Assistant.md @@ -0,0 +1,24 @@ +# AutopilotV1Assistant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallbackEvents** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DevelopmentStage** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**LatestModelBuildSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**LogQueries** | **bool** | | [optional] +**NeedsModelBuild** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md b/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md new file mode 100644 index 000000000..274a4b77c --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantDefaults.md @@ -0,0 +1,14 @@ +# AutopilotV1AssistantDefaults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md b/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md new file mode 100644 index 000000000..24b776a2a --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantDialogue.md @@ -0,0 +1,15 @@ +# AutopilotV1AssistantDialogue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md b/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md new file mode 100644 index 000000000..cb1894a37 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantFieldType.md @@ -0,0 +1,19 @@ +# AutopilotV1AssistantFieldType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md b/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md new file mode 100644 index 000000000..67104258d --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantFieldTypeFieldValue.md @@ -0,0 +1,20 @@ +# AutopilotV1AssistantFieldTypeFieldValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FieldTypeSid** | **string** | | [optional] +**Language** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SynonymOf** | **string** | | [optional] +**Url** | **string** | | [optional] +**Value** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md b/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md new file mode 100644 index 000000000..adc76a028 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantModelBuild.md @@ -0,0 +1,20 @@ +# AutopilotV1AssistantModelBuild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**BuildDuration** | Pointer to **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md b/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md new file mode 100644 index 000000000..7a85ec749 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantQuery.md @@ -0,0 +1,24 @@ +# AutopilotV1AssistantQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DialogueSid** | **string** | | [optional] +**Language** | **string** | | [optional] +**ModelBuildSid** | **string** | | [optional] +**Query** | **string** | | [optional] +**Results** | [**map[string]interface{}**](.md) | | [optional] +**SampleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SourceChannel** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md b/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md new file mode 100644 index 000000000..5f93a2297 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantStyleSheet.md @@ -0,0 +1,14 @@ +# AutopilotV1AssistantStyleSheet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md b/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md new file mode 100644 index 000000000..9b377f3ec --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantTask.md @@ -0,0 +1,20 @@ +# AutopilotV1AssistantTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActionsUrl** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md new file mode 100644 index 000000000..d3ea74e06 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskField.md @@ -0,0 +1,19 @@ +# AutopilotV1AssistantTaskField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FieldType** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md new file mode 100644 index 000000000..b87a526d1 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskSample.md @@ -0,0 +1,20 @@ +# AutopilotV1AssistantTaskSample + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Language** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SourceChannel** | **string** | | [optional] +**TaggedText** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md new file mode 100644 index 000000000..e19ba15e9 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskActions.md @@ -0,0 +1,15 @@ +# AutopilotV1AssistantTaskTaskActions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md new file mode 100644 index 000000000..fca5319c9 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantTaskTaskStatistics.md @@ -0,0 +1,16 @@ +# AutopilotV1AssistantTaskTaskStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**FieldsCount** | **int32** | | [optional] +**SamplesCount** | **int32** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md b/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md new file mode 100644 index 000000000..fcdb3f3ae --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1AssistantWebhook.md @@ -0,0 +1,20 @@ +# AutopilotV1AssistantWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Events** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md b/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md new file mode 100644 index 000000000..aa6c56fc0 --- /dev/null +++ b/rest/autopilot/v1/docs/AutopilotV1RestoreAssistant.md @@ -0,0 +1,22 @@ +# AutopilotV1RestoreAssistant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallbackEvents** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DevelopmentStage** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**LatestModelBuildSid** | **string** | | [optional] +**LogQueries** | **bool** | | [optional] +**NeedsModelBuild** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateAssistantRequest.md b/rest/autopilot/v1/docs/CreateAssistantRequest.md new file mode 100644 index 000000000..813583940 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateAssistantRequest.md @@ -0,0 +1,17 @@ +# CreateAssistantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackEvents** | **string** | Reserved. | [optional] +**CallbackUrl** | **string** | Reserved. | [optional] +**Defaults** | [**map[string]interface{}**](.md) | A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | [optional] +**LogQueries** | **bool** | Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. | [optional] +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateFieldRequest.md b/rest/autopilot/v1/docs/CreateFieldRequest.md new file mode 100644 index 000000000..f37a33c21 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateFieldRequest.md @@ -0,0 +1,12 @@ +# CreateFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. | +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateFieldTypeRequest.md b/rest/autopilot/v1/docs/CreateFieldTypeRequest.md new file mode 100644 index 000000000..6b83c0679 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateFieldTypeRequest.md @@ -0,0 +1,12 @@ +# CreateFieldTypeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateFieldValueRequest.md b/rest/autopilot/v1/docs/CreateFieldValueRequest.md new file mode 100644 index 000000000..d3f2344cf --- /dev/null +++ b/rest/autopilot/v1/docs/CreateFieldValueRequest.md @@ -0,0 +1,13 @@ +# CreateFieldValueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` | +**SynonymOf** | **string** | The string value that indicates which word the field value is a synonym of. | [optional] +**Value** | **string** | The Field Value data. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateModelBuildRequest.md b/rest/autopilot/v1/docs/CreateModelBuildRequest.md new file mode 100644 index 000000000..570231f1b --- /dev/null +++ b/rest/autopilot/v1/docs/CreateModelBuildRequest.md @@ -0,0 +1,12 @@ +# CreateModelBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCallback** | **string** | The URL we should call using a POST method to send status information to your application. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateQueryRequest.md b/rest/autopilot/v1/docs/CreateQueryRequest.md new file mode 100644 index 000000000..828b119af --- /dev/null +++ b/rest/autopilot/v1/docs/CreateQueryRequest.md @@ -0,0 +1,14 @@ +# CreateQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`. | +**ModelBuild** | **string** | The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. | [optional] +**Query** | **string** | The end-user's natural language input. It can be up to 2048 characters long. | +**Tasks** | **string** | The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateSampleRequest.md b/rest/autopilot/v1/docs/CreateSampleRequest.md new file mode 100644 index 000000000..b958ac344 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateSampleRequest.md @@ -0,0 +1,13 @@ +# CreateSampleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`. | +**SourceChannel** | **string** | The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. | [optional] +**TaggedText** | **string** | The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateTaskRequest.md b/rest/autopilot/v1/docs/CreateTaskRequest.md new file mode 100644 index 000000000..48381b088 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateTaskRequest.md @@ -0,0 +1,14 @@ +# CreateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique. | [optional] +**ActionsUrl** | **string** | The URL from which the Assistant can fetch actions. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/CreateWebhookRequest.md b/rest/autopilot/v1/docs/CreateWebhookRequest.md new file mode 100644 index 000000000..2c3861d04 --- /dev/null +++ b/rest/autopilot/v1/docs/CreateWebhookRequest.md @@ -0,0 +1,14 @@ +# CreateWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | **string** | The list of space-separated events that this Webhook will subscribe to. | +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | +**WebhookMethod** | **string** | The method to be used when calling the webhook's URL. | [optional] +**WebhookUrl** | **string** | The URL associated with this Webhook. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/DefaultApi.md b/rest/autopilot/v1/docs/DefaultApi.md new file mode 100644 index 000000000..fdd442816 --- /dev/null +++ b/rest/autopilot/v1/docs/DefaultApi.md @@ -0,0 +1,2143 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAssistant**](DefaultApi.md#CreateAssistant) | **Post** /v1/Assistants | +[**CreateField**](DefaultApi.md#CreateField) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +[**CreateFieldType**](DefaultApi.md#CreateFieldType) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes | +[**CreateFieldValue**](DefaultApi.md#CreateFieldValue) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +[**CreateModelBuild**](DefaultApi.md#CreateModelBuild) | **Post** /v1/Assistants/{AssistantSid}/ModelBuilds | +[**CreateQuery**](DefaultApi.md#CreateQuery) | **Post** /v1/Assistants/{AssistantSid}/Queries | +[**CreateSample**](DefaultApi.md#CreateSample) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +[**CreateTask**](DefaultApi.md#CreateTask) | **Post** /v1/Assistants/{AssistantSid}/Tasks | +[**CreateWebhook**](DefaultApi.md#CreateWebhook) | **Post** /v1/Assistants/{AssistantSid}/Webhooks | +[**DeleteAssistant**](DefaultApi.md#DeleteAssistant) | **Delete** /v1/Assistants/{Sid} | +[**DeleteField**](DefaultApi.md#DeleteField) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +[**DeleteFieldType**](DefaultApi.md#DeleteFieldType) | **Delete** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**DeleteFieldValue**](DefaultApi.md#DeleteFieldValue) | **Delete** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +[**DeleteModelBuild**](DefaultApi.md#DeleteModelBuild) | **Delete** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**DeleteQuery**](DefaultApi.md#DeleteQuery) | **Delete** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +[**DeleteSample**](DefaultApi.md#DeleteSample) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**DeleteTask**](DefaultApi.md#DeleteTask) | **Delete** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +[**DeleteWebhook**](DefaultApi.md#DeleteWebhook) | **Delete** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | +[**FetchAssistant**](DefaultApi.md#FetchAssistant) | **Get** /v1/Assistants/{Sid} | +[**FetchDefaults**](DefaultApi.md#FetchDefaults) | **Get** /v1/Assistants/{AssistantSid}/Defaults | +[**FetchDialogue**](DefaultApi.md#FetchDialogue) | **Get** /v1/Assistants/{AssistantSid}/Dialogues/{Sid} | +[**FetchField**](DefaultApi.md#FetchField) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +[**FetchFieldType**](DefaultApi.md#FetchFieldType) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**FetchFieldValue**](DefaultApi.md#FetchFieldValue) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +[**FetchModelBuild**](DefaultApi.md#FetchModelBuild) | **Get** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**FetchQuery**](DefaultApi.md#FetchQuery) | **Get** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +[**FetchSample**](DefaultApi.md#FetchSample) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**FetchStyleSheet**](DefaultApi.md#FetchStyleSheet) | **Get** /v1/Assistants/{AssistantSid}/StyleSheet | +[**FetchTask**](DefaultApi.md#FetchTask) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +[**FetchTaskActions**](DefaultApi.md#FetchTaskActions) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +[**FetchTaskStatistics**](DefaultApi.md#FetchTaskStatistics) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics | +[**FetchWebhook**](DefaultApi.md#FetchWebhook) | **Get** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | +[**ListAssistant**](DefaultApi.md#ListAssistant) | **Get** /v1/Assistants | +[**ListField**](DefaultApi.md#ListField) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +[**ListFieldType**](DefaultApi.md#ListFieldType) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes | +[**ListFieldValue**](DefaultApi.md#ListFieldValue) | **Get** /v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +[**ListModelBuild**](DefaultApi.md#ListModelBuild) | **Get** /v1/Assistants/{AssistantSid}/ModelBuilds | +[**ListQuery**](DefaultApi.md#ListQuery) | **Get** /v1/Assistants/{AssistantSid}/Queries | +[**ListSample**](DefaultApi.md#ListSample) | **Get** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +[**ListTask**](DefaultApi.md#ListTask) | **Get** /v1/Assistants/{AssistantSid}/Tasks | +[**ListWebhook**](DefaultApi.md#ListWebhook) | **Get** /v1/Assistants/{AssistantSid}/Webhooks | +[**UpdateAssistant**](DefaultApi.md#UpdateAssistant) | **Post** /v1/Assistants/{Sid} | +[**UpdateDefaults**](DefaultApi.md#UpdateDefaults) | **Post** /v1/Assistants/{AssistantSid}/Defaults | +[**UpdateFieldType**](DefaultApi.md#UpdateFieldType) | **Post** /v1/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**UpdateModelBuild**](DefaultApi.md#UpdateModelBuild) | **Post** /v1/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**UpdateQuery**](DefaultApi.md#UpdateQuery) | **Post** /v1/Assistants/{AssistantSid}/Queries/{Sid} | +[**UpdateRestoreAssistant**](DefaultApi.md#UpdateRestoreAssistant) | **Post** /v1/Assistants/Restore | +[**UpdateSample**](DefaultApi.md#UpdateSample) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**UpdateStyleSheet**](DefaultApi.md#UpdateStyleSheet) | **Post** /v1/Assistants/{AssistantSid}/StyleSheet | +[**UpdateTask**](DefaultApi.md#UpdateTask) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{Sid} | +[**UpdateTaskActions**](DefaultApi.md#UpdateTaskActions) | **Post** /v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +[**UpdateWebhook**](DefaultApi.md#UpdateWebhook) | **Post** /v1/Assistants/{AssistantSid}/Webhooks/{Sid} | + + + +## CreateAssistant + +> AutopilotV1Assistant CreateAssistant(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackEvents** | **optional.String**| Reserved. | + **CallbackUrl** | **optional.String**| Reserved. | + **Defaults** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | + **LogQueries** | **optional.Bool**| Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. | + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | + +### Return type + +[**AutopilotV1Assistant**](autopilot.v1.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateField + +> AutopilotV1AssistantTaskField CreateField(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource. | + **optional** | ***CreateFieldOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FieldType** | **optional.String**| The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**AutopilotV1AssistantTaskField**](autopilot.v1.assistant.task.field.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFieldType + +> AutopilotV1AssistantFieldType CreateFieldType(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. | + **optional** | ***CreateFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | + +### Return type + +[**AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFieldValue + +> AutopilotV1AssistantFieldTypeFieldValue CreateFieldValue(ctx, AssistantSid, FieldTypeSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource. | +**FieldTypeSid** | **string**| The SID of the Field Type associated with the Field Value. | + **optional** | ***CreateFieldValueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldValueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` | + **SynonymOf** | **optional.String**| The string value that indicates which word the field value is a synonym of. | + **Value** | **optional.String**| The Field Value data. | + +### Return type + +[**AutopilotV1AssistantFieldTypeFieldValue**](autopilot.v1.assistant.field_type.field_value.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateModelBuild + +> AutopilotV1AssistantModelBuild CreateModelBuild(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. | + **optional** | ***CreateModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **StatusCallback** | **optional.String**| The URL we should call using a POST method to send status information to your application. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateQuery + +> AutopilotV1AssistantQuery CreateQuery(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. | + **optional** | ***CreateQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`. | + **ModelBuild** | **optional.String**| The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. | + **Query** | **optional.String**| The end-user's natural language input. It can be up to 2048 characters long. | + **Tasks** | **optional.String**| The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. | + +### Return type + +[**AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSample + +> AutopilotV1AssistantTaskSample CreateSample(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. | + **optional** | ***CreateSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`. | + **SourceChannel** | **optional.String**| The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. | + **TaggedText** | **optional.String**| The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). | + +### Return type + +[**AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTask + +> AutopilotV1AssistantTask CreateTask(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. | + **optional** | ***CreateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique. | + **ActionsUrl** | **optional.String**| The URL from which the Assistant can fetch actions. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | + +### Return type + +[**AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWebhook + +> AutopilotV1AssistantWebhook CreateWebhook(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource. | + **optional** | ***CreateWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Events** | **optional.String**| The list of space-separated events that this Webhook will subscribe to. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | + **WebhookMethod** | **optional.String**| The method to be used when calling the webhook's URL. | + **WebhookUrl** | **optional.String**| The URL associated with this Webhook. | + +### Return type + +[**AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAssistant + +> DeleteAssistant(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Assistant resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteField + +> DeleteField(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Field resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFieldType + +> DeleteFieldType(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FieldType resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFieldValue + +> DeleteFieldValue(ctx, AssistantSid, FieldTypeSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete. | +**FieldTypeSid** | **string**| The SID of the Field Type associated with the Field Value to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FieldValue resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteModelBuild + +> DeleteModelBuild(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ModelBuild resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteQuery + +> DeleteQuery(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Query resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSample + +> DeleteSample(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Sample resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTask + +> DeleteTask(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Task resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWebhook + +> DeleteWebhook(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAssistant + +> AutopilotV1Assistant FetchAssistant(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Assistant resource to fetch. | + +### Return type + +[**AutopilotV1Assistant**](autopilot.v1.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDefaults + +> AutopilotV1AssistantDefaults FetchDefaults(ctx, AssistantSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | + +### Return type + +[**AutopilotV1AssistantDefaults**](autopilot.v1.assistant.defaults.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDialogue + +> AutopilotV1AssistantDialogue FetchDialogue(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Dialogue resource to fetch. | + +### Return type + +[**AutopilotV1AssistantDialogue**](autopilot.v1.assistant.dialogue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchField + +> AutopilotV1AssistantTaskField FetchField(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Field resource to fetch. | + +### Return type + +[**AutopilotV1AssistantTaskField**](autopilot.v1.assistant.task.field.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFieldType + +> AutopilotV1AssistantFieldType FetchFieldType(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FieldType resource to fetch. | + +### Return type + +[**AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFieldValue + +> AutopilotV1AssistantFieldTypeFieldValue FetchFieldValue(ctx, AssistantSid, FieldTypeSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch. | +**FieldTypeSid** | **string**| The SID of the Field Type associated with the Field Value to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FieldValue resource to fetch. | + +### Return type + +[**AutopilotV1AssistantFieldTypeFieldValue**](autopilot.v1.assistant.field_type.field_value.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchModelBuild + +> AutopilotV1AssistantModelBuild FetchModelBuild(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch. | + +### Return type + +[**AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchQuery + +> AutopilotV1AssistantQuery FetchQuery(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Query resource to fetch. | + +### Return type + +[**AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSample + +> AutopilotV1AssistantTaskSample FetchSample(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to create. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Sample resource to fetch. | + +### Return type + +[**AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchStyleSheet + +> AutopilotV1AssistantStyleSheet FetchStyleSheet(ctx, AssistantSid) + + + +Returns Style sheet JSON object for the Assistant + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | + +### Return type + +[**AutopilotV1AssistantStyleSheet**](autopilot.v1.assistant.style_sheet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTask + +> AutopilotV1AssistantTask FetchTask(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Task resource to fetch. | + +### Return type + +[**AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskActions + +> AutopilotV1AssistantTaskTaskActions FetchTaskActions(ctx, AssistantSid, TaskSid) + + + +Returns JSON actions for the Task. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to fetch were defined. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to fetch were defined. | + +### Return type + +[**AutopilotV1AssistantTaskTaskActions**](autopilot.v1.assistant.task.task_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskStatistics + +> AutopilotV1AssistantTaskTaskStatistics FetchTaskStatistics(ctx, AssistantSid, TaskSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) that is associated with the resource to fetch. | + +### Return type + +[**AutopilotV1AssistantTaskTaskStatistics**](autopilot.v1.assistant.task.task_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWebhook + +> AutopilotV1AssistantWebhook FetchWebhook(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to fetch. | + +### Return type + +[**AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAssistant + +> ListAssistantResponse ListAssistant(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAssistantResponse**](ListAssistantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListField + +> ListFieldResponse ListField(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resources to read. | + **optional** | ***ListFieldOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldResponse**](ListFieldResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFieldType + +> ListFieldTypeResponse ListFieldType(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. | + **optional** | ***ListFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldTypeResponse**](ListFieldTypeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFieldValue + +> ListFieldValueResponse ListFieldValue(ctx, AssistantSid, FieldTypeSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read. | +**FieldTypeSid** | **string**| The SID of the Field Type associated with the Field Value to read. | + **optional** | ***ListFieldValueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldValueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldValueResponse**](ListFieldValueResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListModelBuild + +> ListModelBuildResponse ListModelBuild(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. | + **optional** | ***ListModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListModelBuildResponse**](ListModelBuildResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListQuery + +> ListQueryResponse ListQuery(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. | + **optional** | ***ListQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`. | + **ModelBuild** | **optional.String**| The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. | + **Status** | **optional.String**| The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded` | + **DialogueSid** | **optional.String**| The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue). | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListQueryResponse**](ListQueryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSample + +> ListSampleResponse ListSample(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resources to read. | + **optional** | ***ListSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSampleResponse**](ListSampleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTask + +> ListTaskResponse ListTask(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. | + **optional** | ***ListTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskResponse**](ListTaskResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWebhook + +> ListWebhookResponse ListWebhook(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read. | + **optional** | ***ListWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWebhookResponse**](ListWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAssistant + +> AutopilotV1Assistant UpdateAssistant(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Assistant resource to update. | + **optional** | ***UpdateAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallbackEvents** | **optional.String**| Reserved. | + **CallbackUrl** | **optional.String**| Reserved. | + **Defaults** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. | + **DevelopmentStage** | **optional.String**| A string describing the state of the assistant. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **LogQueries** | **optional.Bool**| Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. | + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | + +### Return type + +[**AutopilotV1Assistant**](autopilot.v1.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDefaults + +> AutopilotV1AssistantDefaults UpdateDefaults(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | + **optional** | ***UpdateDefaultsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDefaultsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Defaults** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. | + +### Return type + +[**AutopilotV1AssistantDefaults**](autopilot.v1.assistant.defaults.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFieldType + +> AutopilotV1AssistantFieldType UpdateFieldType(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FieldType resource to update. | + **optional** | ***UpdateFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | + +### Return type + +[**AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateModelBuild + +> AutopilotV1AssistantModelBuild UpdateModelBuild(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ModelBuild resource to update. | + **optional** | ***UpdateModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateQuery + +> AutopilotV1AssistantQuery UpdateQuery(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Query resource to update. | + **optional** | ***UpdateQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **SampleSid** | **optional.String**| The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. | + **Status** | **optional.String**| The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` | + +### Return type + +[**AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRestoreAssistant + +> AutopilotV1RestoreAssistant UpdateRestoreAssistant(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***UpdateRestoreAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRestoreAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Assistant** | **optional.String**| The Twilio-provided string that uniquely identifies the Assistant resource to restore. | + +### Return type + +[**AutopilotV1RestoreAssistant**](autopilot.v1.restore_assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSample + +> AutopilotV1AssistantTaskSample UpdateSample(ctx, AssistantSid, TaskSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to update. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) associated with the Sample resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Sample resource to update. | + **optional** | ***UpdateSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Language** | **optional.String**| The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. | + **SourceChannel** | **optional.String**| The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. | + **TaggedText** | **optional.String**| The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). | + +### Return type + +[**AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateStyleSheet + +> AutopilotV1AssistantStyleSheet UpdateStyleSheet(ctx, AssistantSid, optional) + + + +Updates the style sheet for an Assistant identified by `assistant_sid`. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | + **optional** | ***UpdateStyleSheetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateStyleSheetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that describes the style sheet object. | + +### Return type + +[**AutopilotV1AssistantStyleSheet**](autopilot.v1.assistant.style_sheet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTask + +> AutopilotV1AssistantTask UpdateTask(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Task resource to update. | + **optional** | ***UpdateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. | + **ActionsUrl** | **optional.String**| The URL from which the Assistant can fetch actions. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTaskActions + +> AutopilotV1AssistantTaskTaskActions UpdateTaskActions(ctx, AssistantSid, TaskSid, optional) + + + +Updates the actions of an Task identified by {TaskSid} or {TaskUniqueName}. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task for which the task actions to update were defined. | +**TaskSid** | **string**| The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) for which the task actions to update were defined. | + **optional** | ***UpdateTaskActionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskActionsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. | + +### Return type + +[**AutopilotV1AssistantTaskTaskActions**](autopilot.v1.assistant.task.task_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWebhook + +> AutopilotV1AssistantWebhook UpdateWebhook(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to update. | + **optional** | ***UpdateWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Events** | **optional.String**| The list of space-separated events that this Webhook will subscribe to. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | + **WebhookMethod** | **optional.String**| The method to be used when calling the webhook's URL. | + **WebhookUrl** | **optional.String**| The URL associated with this Webhook. | + +### Return type + +[**AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/autopilot/v1/docs/ListAssistantResponse.md b/rest/autopilot/v1/docs/ListAssistantResponse.md new file mode 100644 index 000000000..d69274bbb --- /dev/null +++ b/rest/autopilot/v1/docs/ListAssistantResponse.md @@ -0,0 +1,12 @@ +# ListAssistantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assistants** | [**[]AutopilotV1Assistant**](autopilot.v1.assistant.md) | | [optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListAssistantResponseMeta.md b/rest/autopilot/v1/docs/ListAssistantResponseMeta.md new file mode 100644 index 000000000..967b65b71 --- /dev/null +++ b/rest/autopilot/v1/docs/ListAssistantResponseMeta.md @@ -0,0 +1,17 @@ +# ListAssistantResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListFieldResponse.md b/rest/autopilot/v1/docs/ListFieldResponse.md new file mode 100644 index 000000000..8bd5adca6 --- /dev/null +++ b/rest/autopilot/v1/docs/ListFieldResponse.md @@ -0,0 +1,12 @@ +# ListFieldResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | [**[]AutopilotV1AssistantTaskField**](autopilot.v1.assistant.task.field.md) | | [optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListFieldTypeResponse.md b/rest/autopilot/v1/docs/ListFieldTypeResponse.md new file mode 100644 index 000000000..d029af115 --- /dev/null +++ b/rest/autopilot/v1/docs/ListFieldTypeResponse.md @@ -0,0 +1,12 @@ +# ListFieldTypeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldTypes** | [**[]AutopilotV1AssistantFieldType**](autopilot.v1.assistant.field_type.md) | | [optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListFieldValueResponse.md b/rest/autopilot/v1/docs/ListFieldValueResponse.md new file mode 100644 index 000000000..7e21e0e4d --- /dev/null +++ b/rest/autopilot/v1/docs/ListFieldValueResponse.md @@ -0,0 +1,12 @@ +# ListFieldValueResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldValues** | [**[]AutopilotV1AssistantFieldTypeFieldValue**](autopilot.v1.assistant.field_type.field_value.md) | | [optional] +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListModelBuildResponse.md b/rest/autopilot/v1/docs/ListModelBuildResponse.md new file mode 100644 index 000000000..1834ffb9e --- /dev/null +++ b/rest/autopilot/v1/docs/ListModelBuildResponse.md @@ -0,0 +1,12 @@ +# ListModelBuildResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] +**ModelBuilds** | [**[]AutopilotV1AssistantModelBuild**](autopilot.v1.assistant.model_build.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListQueryResponse.md b/rest/autopilot/v1/docs/ListQueryResponse.md new file mode 100644 index 000000000..8bc0c45f2 --- /dev/null +++ b/rest/autopilot/v1/docs/ListQueryResponse.md @@ -0,0 +1,12 @@ +# ListQueryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] +**Queries** | [**[]AutopilotV1AssistantQuery**](autopilot.v1.assistant.query.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListSampleResponse.md b/rest/autopilot/v1/docs/ListSampleResponse.md new file mode 100644 index 000000000..ef87502b6 --- /dev/null +++ b/rest/autopilot/v1/docs/ListSampleResponse.md @@ -0,0 +1,12 @@ +# ListSampleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] +**Samples** | [**[]AutopilotV1AssistantTaskSample**](autopilot.v1.assistant.task.sample.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListTaskResponse.md b/rest/autopilot/v1/docs/ListTaskResponse.md new file mode 100644 index 000000000..b51a91a83 --- /dev/null +++ b/rest/autopilot/v1/docs/ListTaskResponse.md @@ -0,0 +1,12 @@ +# ListTaskResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] +**Tasks** | [**[]AutopilotV1AssistantTask**](autopilot.v1.assistant.task.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/ListWebhookResponse.md b/rest/autopilot/v1/docs/ListWebhookResponse.md new file mode 100644 index 000000000..1a69c002f --- /dev/null +++ b/rest/autopilot/v1/docs/ListWebhookResponse.md @@ -0,0 +1,12 @@ +# ListWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListAssistantResponseMeta**](ListAssistantResponse_meta.md) | | [optional] +**Webhooks** | [**[]AutopilotV1AssistantWebhook**](autopilot.v1.assistant.webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateAssistantRequest.md b/rest/autopilot/v1/docs/UpdateAssistantRequest.md new file mode 100644 index 000000000..233b37c77 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateAssistantRequest.md @@ -0,0 +1,18 @@ +# UpdateAssistantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackEvents** | **string** | Reserved. | [optional] +**CallbackUrl** | **string** | Reserved. | [optional] +**Defaults** | [**map[string]interface{}**](.md) | A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. | [optional] +**DevelopmentStage** | **string** | A string describing the state of the assistant. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**LogQueries** | **bool** | Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. | [optional] +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateDefaultsRequest.md b/rest/autopilot/v1/docs/UpdateDefaultsRequest.md new file mode 100644 index 000000000..ce7fd1888 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateDefaultsRequest.md @@ -0,0 +1,11 @@ +# UpdateDefaultsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Defaults** | [**map[string]interface{}**](.md) | A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateFieldTypeRequest.md b/rest/autopilot/v1/docs/UpdateFieldTypeRequest.md new file mode 100644 index 000000000..be95ff9e8 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateFieldTypeRequest.md @@ -0,0 +1,12 @@ +# UpdateFieldTypeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateModelBuildRequest.md b/rest/autopilot/v1/docs/UpdateModelBuildRequest.md new file mode 100644 index 000000000..13d8777b5 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateModelBuildRequest.md @@ -0,0 +1,11 @@ +# UpdateModelBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateQueryRequest.md b/rest/autopilot/v1/docs/UpdateQueryRequest.md new file mode 100644 index 000000000..3670b52cf --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateQueryRequest.md @@ -0,0 +1,12 @@ +# UpdateQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleSid** | **string** | The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. | [optional] +**Status** | **string** | The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateRestoreAssistantRequest.md b/rest/autopilot/v1/docs/UpdateRestoreAssistantRequest.md new file mode 100644 index 000000000..a01dd56b6 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateRestoreAssistantRequest.md @@ -0,0 +1,11 @@ +# UpdateRestoreAssistantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assistant** | **string** | The Twilio-provided string that uniquely identifies the Assistant resource to restore. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateSampleRequest.md b/rest/autopilot/v1/docs/UpdateSampleRequest.md new file mode 100644 index 000000000..c84a48fa5 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateSampleRequest.md @@ -0,0 +1,13 @@ +# UpdateSampleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. | [optional] +**SourceChannel** | **string** | The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. | [optional] +**TaggedText** | **string** | The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateStyleSheetRequest.md b/rest/autopilot/v1/docs/UpdateStyleSheetRequest.md new file mode 100644 index 000000000..e30a6f646 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateStyleSheetRequest.md @@ -0,0 +1,11 @@ +# UpdateStyleSheetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON string that describes the style sheet object. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateTaskActionsRequest.md b/rest/autopilot/v1/docs/UpdateTaskActionsRequest.md new file mode 100644 index 000000000..1eb5946fb --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateTaskActionsRequest.md @@ -0,0 +1,11 @@ +# UpdateTaskActionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateTaskRequest.md b/rest/autopilot/v1/docs/UpdateTaskRequest.md new file mode 100644 index 000000000..24b7ecba7 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateTaskRequest.md @@ -0,0 +1,14 @@ +# UpdateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. | [optional] +**ActionsUrl** | **string** | The URL from which the Assistant can fetch actions. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/docs/UpdateWebhookRequest.md b/rest/autopilot/v1/docs/UpdateWebhookRequest.md new file mode 100644 index 000000000..ff9c93965 --- /dev/null +++ b/rest/autopilot/v1/docs/UpdateWebhookRequest.md @@ -0,0 +1,14 @@ +# UpdateWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | **string** | The list of space-separated events that this Webhook will subscribe to. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. | [optional] +**WebhookMethod** | **string** | The method to be used when calling the webhook's URL. | [optional] +**WebhookUrl** | **string** | The URL associated with this Webhook. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant.go b/rest/autopilot/v1/model_autopilot_v1_assistant.go new file mode 100644 index 000000000..a2fc55ee1 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant.go @@ -0,0 +1,31 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1Assistant struct for AutopilotV1Assistant +type AutopilotV1Assistant struct { + AccountSid string `json:"AccountSid,omitempty"` + CallbackEvents string `json:"CallbackEvents,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DevelopmentStage string `json:"DevelopmentStage,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + LatestModelBuildSid string `json:"LatestModelBuildSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LogQueries bool `json:"LogQueries,omitempty"` + NeedsModelBuild bool `json:"NeedsModelBuild,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go b/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go new file mode 100644 index 000000000..1064fd64b --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_defaults.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// AutopilotV1AssistantDefaults struct for AutopilotV1AssistantDefaults +type AutopilotV1AssistantDefaults struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go b/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go new file mode 100644 index 000000000..6b69f94bc --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_dialogue.go @@ -0,0 +1,19 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// AutopilotV1AssistantDialogue struct for AutopilotV1AssistantDialogue +type AutopilotV1AssistantDialogue struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go b/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go new file mode 100644 index 000000000..0cdc9a417 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_field_type.go @@ -0,0 +1,26 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantFieldType struct for AutopilotV1AssistantFieldType +type AutopilotV1AssistantFieldType struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go b/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go new file mode 100644 index 000000000..2ae237e46 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_field_type_field_value.go @@ -0,0 +1,27 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantFieldTypeFieldValue struct for AutopilotV1AssistantFieldTypeFieldValue +type AutopilotV1AssistantFieldTypeFieldValue struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FieldTypeSid string `json:"FieldTypeSid,omitempty"` + Language string `json:"Language,omitempty"` + Sid string `json:"Sid,omitempty"` + SynonymOf string `json:"SynonymOf,omitempty"` + Url string `json:"Url,omitempty"` + Value string `json:"Value,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go b/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go new file mode 100644 index 000000000..a179d418a --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_model_build.go @@ -0,0 +1,27 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantModelBuild struct for AutopilotV1AssistantModelBuild +type AutopilotV1AssistantModelBuild struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + BuildDuration *int32 `json:"BuildDuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_query.go b/rest/autopilot/v1/model_autopilot_v1_assistant_query.go new file mode 100644 index 000000000..0edee5588 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_query.go @@ -0,0 +1,31 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantQuery struct for AutopilotV1AssistantQuery +type AutopilotV1AssistantQuery struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DialogueSid string `json:"DialogueSid,omitempty"` + Language string `json:"Language,omitempty"` + ModelBuildSid string `json:"ModelBuildSid,omitempty"` + Query string `json:"Query,omitempty"` + Results map[string]interface{} `json:"Results,omitempty"` + SampleSid string `json:"SampleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SourceChannel string `json:"SourceChannel,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go b/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go new file mode 100644 index 000000000..48cac20ea --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_style_sheet.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// AutopilotV1AssistantStyleSheet struct for AutopilotV1AssistantStyleSheet +type AutopilotV1AssistantStyleSheet struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_task.go b/rest/autopilot/v1/model_autopilot_v1_assistant_task.go new file mode 100644 index 000000000..504f8bd45 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_task.go @@ -0,0 +1,27 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantTask struct for AutopilotV1AssistantTask +type AutopilotV1AssistantTask struct { + AccountSid string `json:"AccountSid,omitempty"` + ActionsUrl string `json:"ActionsUrl,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go b/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go new file mode 100644 index 000000000..a59adad42 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_task_field.go @@ -0,0 +1,26 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantTaskField struct for AutopilotV1AssistantTaskField +type AutopilotV1AssistantTaskField struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FieldType string `json:"FieldType,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go b/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go new file mode 100644 index 000000000..3ef31340c --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_task_sample.go @@ -0,0 +1,27 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantTaskSample struct for AutopilotV1AssistantTaskSample +type AutopilotV1AssistantTaskSample struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Language string `json:"Language,omitempty"` + Sid string `json:"Sid,omitempty"` + SourceChannel string `json:"SourceChannel,omitempty"` + TaggedText string `json:"TaggedText,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go b/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go new file mode 100644 index 000000000..e4d22dba1 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_actions.go @@ -0,0 +1,19 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// AutopilotV1AssistantTaskTaskActions struct for AutopilotV1AssistantTaskTaskActions +type AutopilotV1AssistantTaskTaskActions struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go b/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go new file mode 100644 index 000000000..f9a4966ab --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_task_task_statistics.go @@ -0,0 +1,20 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// AutopilotV1AssistantTaskTaskStatistics struct for AutopilotV1AssistantTaskTaskStatistics +type AutopilotV1AssistantTaskTaskStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + FieldsCount int32 `json:"FieldsCount,omitempty"` + SamplesCount int32 `json:"SamplesCount,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go b/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go new file mode 100644 index 000000000..6b54bdf27 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_assistant_webhook.go @@ -0,0 +1,27 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1AssistantWebhook struct for AutopilotV1AssistantWebhook +type AutopilotV1AssistantWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Events string `json:"Events,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go b/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go new file mode 100644 index 000000000..31ad1a756 --- /dev/null +++ b/rest/autopilot/v1/model_autopilot_v1_restore_assistant.go @@ -0,0 +1,29 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// AutopilotV1RestoreAssistant struct for AutopilotV1RestoreAssistant +type AutopilotV1RestoreAssistant struct { + AccountSid string `json:"AccountSid,omitempty"` + CallbackEvents string `json:"CallbackEvents,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DevelopmentStage string `json:"DevelopmentStage,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + LatestModelBuildSid string `json:"LatestModelBuildSid,omitempty"` + LogQueries bool `json:"LogQueries,omitempty"` + NeedsModelBuild bool `json:"NeedsModelBuild,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_create_assistant_request.go b/rest/autopilot/v1/model_create_assistant_request.go new file mode 100644 index 000000000..7f85112ed --- /dev/null +++ b/rest/autopilot/v1/model_create_assistant_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAssistantRequest struct for CreateAssistantRequest +type CreateAssistantRequest struct { + // Reserved. + CallbackEvents string `json:"CallbackEvents,omitempty"` + // Reserved. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. + Defaults map[string]interface{} `json:"Defaults,omitempty"` + // A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. + LogQueries bool `json:"LogQueries,omitempty"` + // The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` + // An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_create_field_request.go b/rest/autopilot/v1/model_create_field_request.go new file mode 100644 index 000000000..6f78bce69 --- /dev/null +++ b/rest/autopilot/v1/model_create_field_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldRequest struct for CreateFieldRequest +type CreateFieldRequest struct { + // The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type. + FieldType string `json:"FieldType"` + // An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/autopilot/v1/model_create_field_type_request.go b/rest/autopilot/v1/model_create_field_type_request.go new file mode 100644 index 000000000..a261d5eec --- /dev/null +++ b/rest/autopilot/v1/model_create_field_type_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldTypeRequest struct for CreateFieldTypeRequest +type CreateFieldTypeRequest struct { + // A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/autopilot/v1/model_create_field_value_request.go b/rest/autopilot/v1/model_create_field_value_request.go new file mode 100644 index 000000000..da992dbd1 --- /dev/null +++ b/rest/autopilot/v1/model_create_field_value_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldValueRequest struct for CreateFieldValueRequest +type CreateFieldValueRequest struct { + // The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US` + Language string `json:"Language"` + // The string value that indicates which word the field value is a synonym of. + SynonymOf string `json:"SynonymOf,omitempty"` + // The Field Value data. + Value string `json:"Value"` +} diff --git a/rest/autopilot/v1/model_create_model_build_request.go b/rest/autopilot/v1/model_create_model_build_request.go new file mode 100644 index 000000000..37c84abfb --- /dev/null +++ b/rest/autopilot/v1/model_create_model_build_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateModelBuildRequest struct for CreateModelBuildRequest +type CreateModelBuildRequest struct { + // The URL we should call using a POST method to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_create_query_request.go b/rest/autopilot/v1/model_create_query_request.go new file mode 100644 index 000000000..d57bbac1c --- /dev/null +++ b/rest/autopilot/v1/model_create_query_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateQueryRequest struct for CreateQueryRequest +type CreateQueryRequest struct { + // The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`. + Language string `json:"Language"` + // The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried. + ModelBuild string `json:"ModelBuild,omitempty"` + // The end-user's natural language input. It can be up to 2048 characters long. + Query string `json:"Query"` + // The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take. + Tasks string `json:"Tasks,omitempty"` +} diff --git a/rest/autopilot/v1/model_create_sample_request.go b/rest/autopilot/v1/model_create_sample_request.go new file mode 100644 index 000000000..6d492b874 --- /dev/null +++ b/rest/autopilot/v1/model_create_sample_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSampleRequest struct for CreateSampleRequest +type CreateSampleRequest struct { + // The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new sample. For example: `en-US`. + Language string `json:"Language"` + // The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. + SourceChannel string `json:"SourceChannel,omitempty"` + // The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). + TaggedText string `json:"TaggedText"` +} diff --git a/rest/autopilot/v1/model_create_task_request.go b/rest/autopilot/v1/model_create_task_request.go new file mode 100644 index 000000000..8c1d61263 --- /dev/null +++ b/rest/autopilot/v1/model_create_task_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTaskRequest struct for CreateTaskRequest +type CreateTaskRequest struct { + // The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique. + Actions map[string]interface{} `json:"Actions,omitempty"` + // The URL from which the Assistant can fetch actions. + ActionsUrl string `json:"ActionsUrl,omitempty"` + // A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/autopilot/v1/model_create_webhook_request.go b/rest/autopilot/v1/model_create_webhook_request.go new file mode 100644 index 000000000..8b71a7a2c --- /dev/null +++ b/rest/autopilot/v1/model_create_webhook_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWebhookRequest struct for CreateWebhookRequest +type CreateWebhookRequest struct { + // The list of space-separated events that this Webhook will subscribe to. + Events string `json:"Events"` + // An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. + UniqueName string `json:"UniqueName"` + // The method to be used when calling the webhook's URL. + WebhookMethod string `json:"WebhookMethod,omitempty"` + // The URL associated with this Webhook. + WebhookUrl string `json:"WebhookUrl"` +} diff --git a/rest/autopilot/v1/model_list_assistant_response.go b/rest/autopilot/v1/model_list_assistant_response.go new file mode 100644 index 000000000..5f93a51f1 --- /dev/null +++ b/rest/autopilot/v1/model_list_assistant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAssistantResponse struct for ListAssistantResponse +type ListAssistantResponse struct { + Assistants []AutopilotV1Assistant `json:"Assistants,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_assistant_response_meta.go b/rest/autopilot/v1/model_list_assistant_response_meta.go new file mode 100644 index 000000000..8082a9101 --- /dev/null +++ b/rest/autopilot/v1/model_list_assistant_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAssistantResponseMeta struct for ListAssistantResponseMeta +type ListAssistantResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_field_response.go b/rest/autopilot/v1/model_list_field_response.go new file mode 100644 index 000000000..d5dfcdde7 --- /dev/null +++ b/rest/autopilot/v1/model_list_field_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldResponse struct for ListFieldResponse +type ListFieldResponse struct { + Fields []AutopilotV1AssistantTaskField `json:"Fields,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_field_type_response.go b/rest/autopilot/v1/model_list_field_type_response.go new file mode 100644 index 000000000..f2604744d --- /dev/null +++ b/rest/autopilot/v1/model_list_field_type_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldTypeResponse struct for ListFieldTypeResponse +type ListFieldTypeResponse struct { + FieldTypes []AutopilotV1AssistantFieldType `json:"FieldTypes,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_field_value_response.go b/rest/autopilot/v1/model_list_field_value_response.go new file mode 100644 index 000000000..22497e6a6 --- /dev/null +++ b/rest/autopilot/v1/model_list_field_value_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldValueResponse struct for ListFieldValueResponse +type ListFieldValueResponse struct { + FieldValues []AutopilotV1AssistantFieldTypeFieldValue `json:"FieldValues,omitempty"` + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_model_build_response.go b/rest/autopilot/v1/model_list_model_build_response.go new file mode 100644 index 000000000..e391f59f8 --- /dev/null +++ b/rest/autopilot/v1/model_list_model_build_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListModelBuildResponse struct for ListModelBuildResponse +type ListModelBuildResponse struct { + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + ModelBuilds []AutopilotV1AssistantModelBuild `json:"ModelBuilds,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_query_response.go b/rest/autopilot/v1/model_list_query_response.go new file mode 100644 index 000000000..ea1c30fce --- /dev/null +++ b/rest/autopilot/v1/model_list_query_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListQueryResponse struct for ListQueryResponse +type ListQueryResponse struct { + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Queries []AutopilotV1AssistantQuery `json:"Queries,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_sample_response.go b/rest/autopilot/v1/model_list_sample_response.go new file mode 100644 index 000000000..21c2be633 --- /dev/null +++ b/rest/autopilot/v1/model_list_sample_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSampleResponse struct for ListSampleResponse +type ListSampleResponse struct { + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Samples []AutopilotV1AssistantTaskSample `json:"Samples,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_task_response.go b/rest/autopilot/v1/model_list_task_response.go new file mode 100644 index 000000000..4eae5926a --- /dev/null +++ b/rest/autopilot/v1/model_list_task_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskResponse struct for ListTaskResponse +type ListTaskResponse struct { + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Tasks []AutopilotV1AssistantTask `json:"Tasks,omitempty"` +} diff --git a/rest/autopilot/v1/model_list_webhook_response.go b/rest/autopilot/v1/model_list_webhook_response.go new file mode 100644 index 000000000..9e8f79b72 --- /dev/null +++ b/rest/autopilot/v1/model_list_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWebhookResponse struct for ListWebhookResponse +type ListWebhookResponse struct { + Meta ListAssistantResponseMeta `json:"Meta,omitempty"` + Webhooks []AutopilotV1AssistantWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_assistant_request.go b/rest/autopilot/v1/model_update_assistant_request.go new file mode 100644 index 000000000..827cb48f8 --- /dev/null +++ b/rest/autopilot/v1/model_update_assistant_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAssistantRequest struct for UpdateAssistantRequest +type UpdateAssistantRequest struct { + // Reserved. + CallbackEvents string `json:"CallbackEvents,omitempty"` + // Reserved. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks. + Defaults map[string]interface{} `json:"Defaults,omitempty"` + // A string describing the state of the assistant. + DevelopmentStage string `json:"DevelopmentStage,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored. + LogQueries bool `json:"LogQueries,omitempty"` + // The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet) + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_defaults_request.go b/rest/autopilot/v1/model_update_defaults_request.go new file mode 100644 index 000000000..52ab7fee0 --- /dev/null +++ b/rest/autopilot/v1/model_update_defaults_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDefaultsRequest struct for UpdateDefaultsRequest +type UpdateDefaultsRequest struct { + // A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. + Defaults map[string]interface{} `json:"Defaults,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_field_type_request.go b/rest/autopilot/v1/model_update_field_type_request.go new file mode 100644 index 000000000..7b33a681f --- /dev/null +++ b/rest/autopilot/v1/model_update_field_type_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFieldTypeRequest struct for UpdateFieldTypeRequest +type UpdateFieldTypeRequest struct { + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_model_build_request.go b/rest/autopilot/v1/model_update_model_build_request.go new file mode 100644 index 000000000..6cf334f74 --- /dev/null +++ b/rest/autopilot/v1/model_update_model_build_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateModelBuildRequest struct for UpdateModelBuildRequest +type UpdateModelBuildRequest struct { + // An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_query_request.go b/rest/autopilot/v1/model_update_query_request.go new file mode 100644 index 000000000..24089087c --- /dev/null +++ b/rest/autopilot/v1/model_update_query_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateQueryRequest struct for UpdateQueryRequest +type UpdateQueryRequest struct { + // The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query. + SampleSid string `json:"SampleSid,omitempty"` + // The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded` + Status string `json:"Status,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_restore_assistant_request.go b/rest/autopilot/v1/model_update_restore_assistant_request.go new file mode 100644 index 000000000..d7093c3fc --- /dev/null +++ b/rest/autopilot/v1/model_update_restore_assistant_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRestoreAssistantRequest struct for UpdateRestoreAssistantRequest +type UpdateRestoreAssistantRequest struct { + // The Twilio-provided string that uniquely identifies the Assistant resource to restore. + Assistant string `json:"Assistant"` +} diff --git a/rest/autopilot/v1/model_update_sample_request.go b/rest/autopilot/v1/model_update_sample_request.go new file mode 100644 index 000000000..b96a3ccae --- /dev/null +++ b/rest/autopilot/v1/model_update_sample_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSampleRequest struct for UpdateSampleRequest +type UpdateSampleRequest struct { + // The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`. + Language string `json:"Language,omitempty"` + // The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included. + SourceChannel string `json:"SourceChannel,omitempty"` + // The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging). + TaggedText string `json:"TaggedText,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_style_sheet_request.go b/rest/autopilot/v1/model_update_style_sheet_request.go new file mode 100644 index 000000000..85bd6cd00 --- /dev/null +++ b/rest/autopilot/v1/model_update_style_sheet_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateStyleSheetRequest struct for UpdateStyleSheetRequest +type UpdateStyleSheetRequest struct { + // The JSON string that describes the style sheet object. + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_task_actions_request.go b/rest/autopilot/v1/model_update_task_actions_request.go new file mode 100644 index 000000000..5c25a0dc9 --- /dev/null +++ b/rest/autopilot/v1/model_update_task_actions_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskActionsRequest struct for UpdateTaskActionsRequest +type UpdateTaskActionsRequest struct { + // The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. + Actions map[string]interface{} `json:"Actions,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_task_request.go b/rest/autopilot/v1/model_update_task_request.go new file mode 100644 index 000000000..4504b01fd --- /dev/null +++ b/rest/autopilot/v1/model_update_task_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskRequest struct for UpdateTaskRequest +type UpdateTaskRequest struct { + // The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. + Actions map[string]interface{} `json:"Actions,omitempty"` + // The URL from which the Assistant can fetch actions. + ActionsUrl string `json:"ActionsUrl,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/autopilot/v1/model_update_webhook_request.go b/rest/autopilot/v1/model_update_webhook_request.go new file mode 100644 index 000000000..f606f723d --- /dev/null +++ b/rest/autopilot/v1/model_update_webhook_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWebhookRequest struct for UpdateWebhookRequest +type UpdateWebhookRequest struct { + // The list of space-separated events that this Webhook will subscribe to. + Events string `json:"Events,omitempty"` + // An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length. + UniqueName string `json:"UniqueName,omitempty"` + // The method to be used when calling the webhook's URL. + WebhookMethod string `json:"WebhookMethod,omitempty"` + // The URL associated with this Webhook. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/autopilot/v1/response.go b/rest/autopilot/v1/response.go new file mode 100644 index 000000000..d5bcb7b05 --- /dev/null +++ b/rest/autopilot/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Autopilot + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/bulkexports/v1/.openapi-generator-ignore b/rest/bulkexports/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/bulkexports/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/bulkexports/v1/README.md b/rest/bulkexports/v1/README.md new file mode 100644 index 000000000..31c5914cc --- /dev/null +++ b/rest/bulkexports/v1/README.md @@ -0,0 +1,82 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateExportCustomJob**](docs/DefaultApi.md#createexportcustomjob) | **Post** /v1/Exports/{ResourceType}/Jobs | +*DefaultApi* | [**DeleteJob**](docs/DefaultApi.md#deletejob) | **Delete** /v1/Exports/Jobs/{JobSid} | +*DefaultApi* | [**FetchDay**](docs/DefaultApi.md#fetchday) | **Get** /v1/Exports/{ResourceType}/Days/{Day} | +*DefaultApi* | [**FetchExport**](docs/DefaultApi.md#fetchexport) | **Get** /v1/Exports/{ResourceType} | +*DefaultApi* | [**FetchExportConfiguration**](docs/DefaultApi.md#fetchexportconfiguration) | **Get** /v1/Exports/{ResourceType}/Configuration | +*DefaultApi* | [**FetchJob**](docs/DefaultApi.md#fetchjob) | **Get** /v1/Exports/Jobs/{JobSid} | +*DefaultApi* | [**ListDay**](docs/DefaultApi.md#listday) | **Get** /v1/Exports/{ResourceType}/Days | +*DefaultApi* | [**ListExportCustomJob**](docs/DefaultApi.md#listexportcustomjob) | **Get** /v1/Exports/{ResourceType}/Jobs | +*DefaultApi* | [**UpdateExportConfiguration**](docs/DefaultApi.md#updateexportconfiguration) | **Post** /v1/Exports/{ResourceType}/Configuration | + + +## Documentation For Models + + - [BulkexportsV1Export](docs/BulkexportsV1Export.md) + - [BulkexportsV1ExportConfiguration](docs/BulkexportsV1ExportConfiguration.md) + - [BulkexportsV1ExportDay](docs/BulkexportsV1ExportDay.md) + - [BulkexportsV1ExportDayInstance](docs/BulkexportsV1ExportDayInstance.md) + - [BulkexportsV1ExportExportCustomJob](docs/BulkexportsV1ExportExportCustomJob.md) + - [BulkexportsV1ExportJob](docs/BulkexportsV1ExportJob.md) + - [CreateExportCustomJobRequest](docs/CreateExportCustomJobRequest.md) + - [ListDayResponse](docs/ListDayResponse.md) + - [ListDayResponseMeta](docs/ListDayResponseMeta.md) + - [ListExportCustomJobResponse](docs/ListExportCustomJobResponse.md) + - [UpdateExportConfigurationRequest](docs/UpdateExportConfigurationRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/bulkexports/v1/api_default.go b/rest/bulkexports/v1/api_default.go new file mode 100644 index 000000000..d3d1557cd --- /dev/null +++ b/rest/bulkexports/v1/api_default.go @@ -0,0 +1,367 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://bulkexports.twilio.com"), + } +} +// CreateExportCustomJobParams Optional parameters for the method 'CreateExportCustomJob' +type CreateExportCustomJobParams struct { + Email *string `json:"Email,omitempty"` + EndDay *string `json:"EndDay,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + StartDay *string `json:"StartDay,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +CreateExportCustomJob Method for CreateExportCustomJob + * @param ResourceType The type of communication – Messages or Calls, Conferences, and Participants + * @param optional nil or *CreateExportCustomJobOpts - Optional Parameters: + * @param "Email" (string) - The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status. + * @param "EndDay" (string) - The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. + * @param "FriendlyName" (string) - The friendly name specified when creating the job + * @param "StartDay" (string) - The start day for the custom export specified as a string in the format of yyyy-mm-dd + * @param "WebhookMethod" (string) - This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. + * @param "WebhookUrl" (string) - The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. +@return BulkexportsV1ExportExportCustomJob +*/ +func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *CreateExportCustomJobParams) (*BulkexportsV1ExportExportCustomJob, error) { + path := "/v1/Exports/{ResourceType}/Jobs" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.EndDay != nil { + data.Set("EndDay", *params.EndDay) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.StartDay != nil { + data.Set("StartDay", *params.StartDay) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &BulkexportsV1ExportExportCustomJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteJob Method for DeleteJob + * @param JobSid The unique string that that we created to identify the Bulk Export job +*/ +func (c *DefaultApiService) DeleteJob(JobSid string) (error) { + path := "/v1/Exports/Jobs/{JobSid}" + path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchDay Method for FetchDay +Fetch a specific Day. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param Day The ISO 8601 format date of the resources in the file, for a UTC day +*/ +func (c *DefaultApiService) FetchDay(ResourceType string, Day string) (error) { + path := "/v1/Exports/{ResourceType}/Days/{Day}" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + path = strings.Replace(path, "{"+"Day"+"}", Day, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchExport Method for FetchExport +Fetch a specific Export. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants +@return BulkexportsV1Export +*/ +func (c *DefaultApiService) FetchExport(ResourceType string) (*BulkexportsV1Export, error) { + path := "/v1/Exports/{ResourceType}" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &BulkexportsV1Export{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExportConfiguration Method for FetchExportConfiguration +Fetch a specific Export Configuration. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants +@return BulkexportsV1ExportConfiguration +*/ +func (c *DefaultApiService) FetchExportConfiguration(ResourceType string) (*BulkexportsV1ExportConfiguration, error) { + path := "/v1/Exports/{ResourceType}/Configuration" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchJob Method for FetchJob + * @param JobSid The unique string that that we created to identify the Bulk Export job +@return BulkexportsV1ExportJob +*/ +func (c *DefaultApiService) FetchJob(JobSid string) (*BulkexportsV1ExportJob, error) { + path := "/v1/Exports/Jobs/{JobSid}" + path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &BulkexportsV1ExportJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDayParams Optional parameters for the method 'ListDay' +type ListDayParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDay Method for ListDay +Retrieve a list of all Days for a resource. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *ListDayOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDayResponse +*/ +func (c *DefaultApiService) ListDay(ResourceType string, params *ListDayParams) (*ListDayResponse, error) { + path := "/v1/Exports/{ResourceType}/Days" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExportCustomJobParams Optional parameters for the method 'ListExportCustomJob' +type ListExportCustomJobParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExportCustomJob Method for ListExportCustomJob + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *ListExportCustomJobOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExportCustomJobResponse +*/ +func (c *DefaultApiService) ListExportCustomJob(ResourceType string, params *ListExportCustomJobParams) (*ListExportCustomJobResponse, error) { + path := "/v1/Exports/{ResourceType}/Jobs" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExportCustomJobResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateExportConfigurationParams Optional parameters for the method 'UpdateExportConfiguration' +type UpdateExportConfigurationParams struct { + Enabled *bool `json:"Enabled,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +UpdateExportConfiguration Method for UpdateExportConfiguration +Update a specific Export Configuration. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *UpdateExportConfigurationOpts - Optional Parameters: + * @param "Enabled" (bool) - If true, Twilio will automatically generate every day's file when the day is over. + * @param "WebhookMethod" (string) - Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url + * @param "WebhookUrl" (string) - Stores the URL destination for the method specified in webhook_method. +@return BulkexportsV1ExportConfiguration +*/ +func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, params *UpdateExportConfigurationParams) (*BulkexportsV1ExportConfiguration, error) { + path := "/v1/Exports/{ResourceType}/Configuration" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &BulkexportsV1ExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/bulkexports/v1/docs/BulkexportsV1Export.md b/rest/bulkexports/v1/docs/BulkexportsV1Export.md new file mode 100644 index 000000000..35325ce75 --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1Export.md @@ -0,0 +1,13 @@ +# BulkexportsV1Export + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ResourceType** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md b/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md new file mode 100644 index 000000000..c0d96275e --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1ExportConfiguration.md @@ -0,0 +1,15 @@ +# BulkexportsV1ExportConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | [optional] +**ResourceType** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md b/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md new file mode 100644 index 000000000..3ff99eee0 --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1ExportDay.md @@ -0,0 +1,15 @@ +# BulkexportsV1ExportDay + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateDate** | **string** | | [optional] +**Day** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**Size** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md b/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md new file mode 100644 index 000000000..4de8e0874 --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1ExportDayInstance.md @@ -0,0 +1,11 @@ +# BulkexportsV1ExportDayInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectTo** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md b/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md new file mode 100644 index 000000000..62e92bfe1 --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1ExportExportCustomJob.md @@ -0,0 +1,19 @@ +# BulkexportsV1ExportExportCustomJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | [**map[string]interface{}**](.md) | | [optional] +**Email** | **string** | | [optional] +**EndDay** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**JobSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**StartDay** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md b/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md new file mode 100644 index 000000000..22368a1d9 --- /dev/null +++ b/rest/bulkexports/v1/docs/BulkexportsV1ExportJob.md @@ -0,0 +1,20 @@ +# BulkexportsV1ExportJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | [**map[string]interface{}**](.md) | | [optional] +**Email** | **string** | | [optional] +**EndDay** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**JobSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**StartDay** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/CreateExportCustomJobRequest.md b/rest/bulkexports/v1/docs/CreateExportCustomJobRequest.md new file mode 100644 index 000000000..836aabe72 --- /dev/null +++ b/rest/bulkexports/v1/docs/CreateExportCustomJobRequest.md @@ -0,0 +1,16 @@ +# CreateExportCustomJobRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status. | [optional] +**EndDay** | **string** | The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. | +**FriendlyName** | **string** | The friendly name specified when creating the job | +**StartDay** | **string** | The start day for the custom export specified as a string in the format of yyyy-mm-dd | +**WebhookMethod** | **string** | This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. | [optional] +**WebhookUrl** | **string** | The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/DefaultApi.md b/rest/bulkexports/v1/docs/DefaultApi.md new file mode 100644 index 000000000..e348802d5 --- /dev/null +++ b/rest/bulkexports/v1/docs/DefaultApi.md @@ -0,0 +1,367 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateExportCustomJob**](DefaultApi.md#CreateExportCustomJob) | **Post** /v1/Exports/{ResourceType}/Jobs | +[**DeleteJob**](DefaultApi.md#DeleteJob) | **Delete** /v1/Exports/Jobs/{JobSid} | +[**FetchDay**](DefaultApi.md#FetchDay) | **Get** /v1/Exports/{ResourceType}/Days/{Day} | +[**FetchExport**](DefaultApi.md#FetchExport) | **Get** /v1/Exports/{ResourceType} | +[**FetchExportConfiguration**](DefaultApi.md#FetchExportConfiguration) | **Get** /v1/Exports/{ResourceType}/Configuration | +[**FetchJob**](DefaultApi.md#FetchJob) | **Get** /v1/Exports/Jobs/{JobSid} | +[**ListDay**](DefaultApi.md#ListDay) | **Get** /v1/Exports/{ResourceType}/Days | +[**ListExportCustomJob**](DefaultApi.md#ListExportCustomJob) | **Get** /v1/Exports/{ResourceType}/Jobs | +[**UpdateExportConfiguration**](DefaultApi.md#UpdateExportConfiguration) | **Post** /v1/Exports/{ResourceType}/Configuration | + + + +## CreateExportCustomJob + +> BulkexportsV1ExportExportCustomJob CreateExportCustomJob(ctx, ResourceType, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages or Calls, Conferences, and Participants | + **optional** | ***CreateExportCustomJobOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateExportCustomJobOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Email** | **optional.String**| The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status. | + **EndDay** | **optional.String**| The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. | + **FriendlyName** | **optional.String**| The friendly name specified when creating the job | + **StartDay** | **optional.String**| The start day for the custom export specified as a string in the format of yyyy-mm-dd | + **WebhookMethod** | **optional.String**| This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. | + **WebhookUrl** | **optional.String**| The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. | + +### Return type + +[**BulkexportsV1ExportExportCustomJob**](bulkexports.v1.export.export_custom_job.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteJob + +> DeleteJob(ctx, JobSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobSid** | **string**| The unique string that that we created to identify the Bulk Export job | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDay + +> FetchDay(ctx, ResourceType, Day) + + + +Fetch a specific Day. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | +**Day** | **string**| The ISO 8601 format date of the resources in the file, for a UTC day | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExport + +> BulkexportsV1Export FetchExport(ctx, ResourceType) + + + +Fetch a specific Export. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + +### Return type + +[**BulkexportsV1Export**](bulkexports.v1.export.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExportConfiguration + +> BulkexportsV1ExportConfiguration FetchExportConfiguration(ctx, ResourceType) + + + +Fetch a specific Export Configuration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + +### Return type + +[**BulkexportsV1ExportConfiguration**](bulkexports.v1.export_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchJob + +> BulkexportsV1ExportJob FetchJob(ctx, JobSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobSid** | **string**| The unique string that that we created to identify the Bulk Export job | + +### Return type + +[**BulkexportsV1ExportJob**](bulkexports.v1.export.job.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDay + +> ListDayResponse ListDay(ctx, ResourceType, optional) + + + +Retrieve a list of all Days for a resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***ListDayOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDayOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDayResponse**](ListDayResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExportCustomJob + +> ListExportCustomJobResponse ListExportCustomJob(ctx, ResourceType, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***ListExportCustomJobOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExportCustomJobOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExportCustomJobResponse**](ListExportCustomJobResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExportConfiguration + +> BulkexportsV1ExportConfiguration UpdateExportConfiguration(ctx, ResourceType, optional) + + + +Update a specific Export Configuration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***UpdateExportConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateExportConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Enabled** | **optional.Bool**| If true, Twilio will automatically generate every day's file when the day is over. | + **WebhookMethod** | **optional.String**| Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url | + **WebhookUrl** | **optional.String**| Stores the URL destination for the method specified in webhook_method. | + +### Return type + +[**BulkexportsV1ExportConfiguration**](bulkexports.v1.export_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/bulkexports/v1/docs/ListDayResponse.md b/rest/bulkexports/v1/docs/ListDayResponse.md new file mode 100644 index 000000000..5cacf20c4 --- /dev/null +++ b/rest/bulkexports/v1/docs/ListDayResponse.md @@ -0,0 +1,12 @@ +# ListDayResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Days** | [**[]BulkexportsV1ExportDay**](bulkexports.v1.export.day.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/ListDayResponseMeta.md b/rest/bulkexports/v1/docs/ListDayResponseMeta.md new file mode 100644 index 000000000..a08156e33 --- /dev/null +++ b/rest/bulkexports/v1/docs/ListDayResponseMeta.md @@ -0,0 +1,17 @@ +# ListDayResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md b/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md new file mode 100644 index 000000000..28afb496d --- /dev/null +++ b/rest/bulkexports/v1/docs/ListExportCustomJobResponse.md @@ -0,0 +1,12 @@ +# ListExportCustomJobResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Jobs** | [**[]BulkexportsV1ExportExportCustomJob**](bulkexports.v1.export.export_custom_job.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/docs/UpdateExportConfigurationRequest.md b/rest/bulkexports/v1/docs/UpdateExportConfigurationRequest.md new file mode 100644 index 000000000..78f48b5f5 --- /dev/null +++ b/rest/bulkexports/v1/docs/UpdateExportConfigurationRequest.md @@ -0,0 +1,13 @@ +# UpdateExportConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | If true, Twilio will automatically generate every day's file when the day is over. | [optional] +**WebhookMethod** | **string** | Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url | [optional] +**WebhookUrl** | **string** | Stores the URL destination for the method specified in webhook_method. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export.go b/rest/bulkexports/v1/model_bulkexports_v1_export.go new file mode 100644 index 000000000..a280b0c55 --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export.go @@ -0,0 +1,17 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1Export struct for BulkexportsV1Export +type BulkexportsV1Export struct { + Links map[string]interface{} `json:"Links,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go b/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go new file mode 100644 index 000000000..b46065b65 --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export_configuration.go @@ -0,0 +1,19 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1ExportConfiguration struct for BulkexportsV1ExportConfiguration +type BulkexportsV1ExportConfiguration struct { + Enabled bool `json:"Enabled,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export_day.go b/rest/bulkexports/v1/model_bulkexports_v1_export_day.go new file mode 100644 index 000000000..6408abef3 --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export_day.go @@ -0,0 +1,19 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1ExportDay struct for BulkexportsV1ExportDay +type BulkexportsV1ExportDay struct { + CreateDate string `json:"CreateDate,omitempty"` + Day string `json:"Day,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Size int32 `json:"Size,omitempty"` +} diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go b/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go new file mode 100644 index 000000000..357eaf1ce --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export_day_instance.go @@ -0,0 +1,15 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1ExportDayInstance struct for BulkexportsV1ExportDayInstance +type BulkexportsV1ExportDayInstance struct { + RedirectTo string `json:"RedirectTo,omitempty"` +} diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go b/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go new file mode 100644 index 000000000..3b43a9813 --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export_export_custom_job.go @@ -0,0 +1,23 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1ExportExportCustomJob struct for BulkexportsV1ExportExportCustomJob +type BulkexportsV1ExportExportCustomJob struct { + Details map[string]interface{} `json:"Details,omitempty"` + Email string `json:"Email,omitempty"` + EndDay string `json:"EndDay,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + JobSid string `json:"JobSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + StartDay string `json:"StartDay,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/bulkexports/v1/model_bulkexports_v1_export_job.go b/rest/bulkexports/v1/model_bulkexports_v1_export_job.go new file mode 100644 index 000000000..9238110c9 --- /dev/null +++ b/rest/bulkexports/v1/model_bulkexports_v1_export_job.go @@ -0,0 +1,24 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// BulkexportsV1ExportJob struct for BulkexportsV1ExportJob +type BulkexportsV1ExportJob struct { + Details map[string]interface{} `json:"Details,omitempty"` + Email string `json:"Email,omitempty"` + EndDay string `json:"EndDay,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + JobSid string `json:"JobSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + StartDay string `json:"StartDay,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/bulkexports/v1/model_create_export_custom_job_request.go b/rest/bulkexports/v1/model_create_export_custom_job_request.go new file mode 100644 index 000000000..aa0490b01 --- /dev/null +++ b/rest/bulkexports/v1/model_create_export_custom_job_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateExportCustomJobRequest struct for CreateExportCustomJobRequest +type CreateExportCustomJobRequest struct { + // The optional email to send the completion notification to. You can set both webhook, and email, or one or the other. If you set neither, the job will run but you will have to query to determine your job's status. + Email string `json:"Email,omitempty"` + // The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. + EndDay string `json:"EndDay"` + // The friendly name specified when creating the job + FriendlyName string `json:"FriendlyName"` + // The start day for the custom export specified as a string in the format of yyyy-mm-dd + StartDay string `json:"StartDay"` + // This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. + WebhookMethod string `json:"WebhookMethod,omitempty"` + // The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. If you set neither webhook nor email, you will have to check your job's status manually. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/bulkexports/v1/model_list_day_response.go b/rest/bulkexports/v1/model_list_day_response.go new file mode 100644 index 000000000..39f45503c --- /dev/null +++ b/rest/bulkexports/v1/model_list_day_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDayResponse struct for ListDayResponse +type ListDayResponse struct { + Days []BulkexportsV1ExportDay `json:"Days,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/bulkexports/v1/model_list_day_response_meta.go b/rest/bulkexports/v1/model_list_day_response_meta.go new file mode 100644 index 000000000..007842875 --- /dev/null +++ b/rest/bulkexports/v1/model_list_day_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDayResponseMeta struct for ListDayResponseMeta +type ListDayResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/bulkexports/v1/model_list_export_custom_job_response.go b/rest/bulkexports/v1/model_list_export_custom_job_response.go new file mode 100644 index 000000000..9c854d722 --- /dev/null +++ b/rest/bulkexports/v1/model_list_export_custom_job_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExportCustomJobResponse struct for ListExportCustomJobResponse +type ListExportCustomJobResponse struct { + Jobs []BulkexportsV1ExportExportCustomJob `json:"Jobs,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/bulkexports/v1/model_update_export_configuration_request.go b/rest/bulkexports/v1/model_update_export_configuration_request.go new file mode 100644 index 000000000..02c33cb0c --- /dev/null +++ b/rest/bulkexports/v1/model_update_export_configuration_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateExportConfigurationRequest struct for UpdateExportConfigurationRequest +type UpdateExportConfigurationRequest struct { + // If true, Twilio will automatically generate every day's file when the day is over. + Enabled bool `json:"Enabled,omitempty"` + // Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url + WebhookMethod string `json:"WebhookMethod,omitempty"` + // Stores the URL destination for the method specified in webhook_method. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/bulkexports/v1/response.go b/rest/bulkexports/v1/response.go new file mode 100644 index 000000000..738f49798 --- /dev/null +++ b/rest/bulkexports/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Bulkexports + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/chat/v1/.openapi-generator-ignore b/rest/chat/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/chat/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/chat/v1/README.md b/rest/chat/v1/README.md new file mode 100644 index 000000000..dc1deb8a8 --- /dev/null +++ b/rest/chat/v1/README.md @@ -0,0 +1,136 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateChannel**](docs/DefaultApi.md#createchannel) | **Post** /v1/Services/{ServiceSid}/Channels | +*DefaultApi* | [**CreateCredential**](docs/DefaultApi.md#createcredential) | **Post** /v1/Credentials | +*DefaultApi* | [**CreateInvite**](docs/DefaultApi.md#createinvite) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**CreateMember**](docs/DefaultApi.md#createmember) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**CreateMessage**](docs/DefaultApi.md#createmessage) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**CreateRole**](docs/DefaultApi.md#createrole) | **Post** /v1/Services/{ServiceSid}/Roles | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /v1/Services/{ServiceSid}/Users | +*DefaultApi* | [**DeleteChannel**](docs/DefaultApi.md#deletechannel) | **Delete** /v1/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**DeleteCredential**](docs/DefaultApi.md#deletecredential) | **Delete** /v1/Credentials/{Sid} | +*DefaultApi* | [**DeleteInvite**](docs/DefaultApi.md#deleteinvite) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**DeleteMember**](docs/DefaultApi.md#deletemember) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**DeleteMessage**](docs/DefaultApi.md#deletemessage) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /v1/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /v1/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**FetchChannel**](docs/DefaultApi.md#fetchchannel) | **Get** /v1/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**FetchCredential**](docs/DefaultApi.md#fetchcredential) | **Get** /v1/Credentials/{Sid} | +*DefaultApi* | [**FetchInvite**](docs/DefaultApi.md#fetchinvite) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**FetchMember**](docs/DefaultApi.md#fetchmember) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**FetchMessage**](docs/DefaultApi.md#fetchmessage) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**FetchRole**](docs/DefaultApi.md#fetchrole) | **Get** /v1/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **Get** /v1/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**ListChannel**](docs/DefaultApi.md#listchannel) | **Get** /v1/Services/{ServiceSid}/Channels | +*DefaultApi* | [**ListCredential**](docs/DefaultApi.md#listcredential) | **Get** /v1/Credentials | +*DefaultApi* | [**ListInvite**](docs/DefaultApi.md#listinvite) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**ListMember**](docs/DefaultApi.md#listmember) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**ListMessage**](docs/DefaultApi.md#listmessage) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**ListRole**](docs/DefaultApi.md#listrole) | **Get** /v1/Services/{ServiceSid}/Roles | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListUser**](docs/DefaultApi.md#listuser) | **Get** /v1/Services/{ServiceSid}/Users | +*DefaultApi* | [**ListUserChannel**](docs/DefaultApi.md#listuserchannel) | **Get** /v1/Services/{ServiceSid}/Users/{UserSid}/Channels | +*DefaultApi* | [**UpdateChannel**](docs/DefaultApi.md#updatechannel) | **Post** /v1/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**UpdateCredential**](docs/DefaultApi.md#updatecredential) | **Post** /v1/Credentials/{Sid} | +*DefaultApi* | [**UpdateMember**](docs/DefaultApi.md#updatemember) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**UpdateMessage**](docs/DefaultApi.md#updatemessage) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Post** /v1/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Post** /v1/Services/{ServiceSid}/Users/{Sid} | + + +## Documentation For Models + + - [ChatV1Credential](docs/ChatV1Credential.md) + - [ChatV1Service](docs/ChatV1Service.md) + - [ChatV1ServiceChannel](docs/ChatV1ServiceChannel.md) + - [ChatV1ServiceChannelInvite](docs/ChatV1ServiceChannelInvite.md) + - [ChatV1ServiceChannelMember](docs/ChatV1ServiceChannelMember.md) + - [ChatV1ServiceChannelMessage](docs/ChatV1ServiceChannelMessage.md) + - [ChatV1ServiceRole](docs/ChatV1ServiceRole.md) + - [ChatV1ServiceUser](docs/ChatV1ServiceUser.md) + - [ChatV1ServiceUserUserChannel](docs/ChatV1ServiceUserUserChannel.md) + - [CreateChannelRequest](docs/CreateChannelRequest.md) + - [CreateCredentialRequest](docs/CreateCredentialRequest.md) + - [CreateInviteRequest](docs/CreateInviteRequest.md) + - [CreateMemberRequest](docs/CreateMemberRequest.md) + - [CreateMessageRequest](docs/CreateMessageRequest.md) + - [CreateRoleRequest](docs/CreateRoleRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateUserRequest](docs/CreateUserRequest.md) + - [ListChannelResponse](docs/ListChannelResponse.md) + - [ListCredentialResponse](docs/ListCredentialResponse.md) + - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) + - [ListInviteResponse](docs/ListInviteResponse.md) + - [ListMemberResponse](docs/ListMemberResponse.md) + - [ListMessageResponse](docs/ListMessageResponse.md) + - [ListRoleResponse](docs/ListRoleResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListUserChannelResponse](docs/ListUserChannelResponse.md) + - [ListUserResponse](docs/ListUserResponse.md) + - [UpdateChannelRequest](docs/UpdateChannelRequest.md) + - [UpdateCredentialRequest](docs/UpdateCredentialRequest.md) + - [UpdateMemberRequest](docs/UpdateMemberRequest.md) + - [UpdateMessageRequest](docs/UpdateMessageRequest.md) + - [UpdateRoleRequest](docs/UpdateRoleRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateUserRequest](docs/UpdateUserRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/chat/v1/api_default.go b/rest/chat/v1/api_default.go new file mode 100644 index 000000000..e06cb6a82 --- /dev/null +++ b/rest/chat/v1/api_default.go @@ -0,0 +1,1886 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://chat.twilio.com"), + } +} +// CreateChannelParams Optional parameters for the method 'CreateChannel' +type CreateChannelParams struct { + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateChannel Method for CreateChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param optional nil or *CreateChannelOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. +@return ChatV1ServiceChannel +*/ +func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialParams Optional parameters for the method 'CreateCredential' +type CreateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateCredential Method for CreateCredential + * @param optional nil or *CreateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. +@return ChatV1Credential +*/ +func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV1Credential, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateInviteParams Optional parameters for the method 'CreateInvite' +type CreateInviteParams struct { + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateInvite Method for CreateInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. + * @param optional nil or *CreateInviteOpts - Optional Parameters: + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. +@return ChatV1ServiceChannelInvite +*/ +func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMemberParams Optional parameters for the method 'CreateMember' +type CreateMemberParams struct { + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateMember Method for CreateMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateMemberOpts - Optional Parameters: + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). +@return ChatV1ServiceChannelMember +*/ +func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessageParams Optional parameters for the method 'CreateMessage' +type CreateMessageParams struct { + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + From *string `json:"From,omitempty"` +} + +/* +CreateMessage Method for CreateMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateMessageOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + * @param "From" (string) - The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. +@return ChatV1ServiceChannelMessage +*/ +func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRoleParams Optional parameters for the method 'CreateRole' +type CreateRoleParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateRole Method for CreateRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param optional nil or *CreateRoleOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. + * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. +@return ChatV1ServiceRole +*/ +func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. +@return ChatV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateUserParams Optional parameters for the method 'CreateUser' +type CreateUserParams struct { + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateUser Method for CreateUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. + * @param optional nil or *CreateUserOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. This value is often used for display purposes. + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. +@return ChatV1ServiceUser +*/ +func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteChannel Method for DeleteChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to delete. +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredential Method for DeleteCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. +*/ +func (c *DefaultApiService) DeleteCredential(Sid string) (error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteInvite Method for DeleteInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to. + * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to delete. +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteMember Method for DeleteMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. + * @param Sid The Twilio-provided string that uniquely identifies the Member resource to delete. +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteMessage Method for DeleteMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to delete. +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRole Method for DeleteRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Role resource to delete. +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUser Method for DeleteUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the User resource to delete. +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchChannel Method for FetchChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to fetch. +@return ChatV1ServiceChannel +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredential Method for FetchCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. +@return ChatV1Credential +*/ +func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchInvite Method for FetchInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to. + * @param Sid The Twilio-provided string that uniquely identifies the Invite resource to fetch. +@return ChatV1ServiceChannelInvite +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelInvite, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMember Method for FetchMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value. + * @param Sid The Twilio-provided string that uniquely identifies the Member resource to fetch. +@return ChatV1ServiceChannelMember +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessage Method for FetchMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to fetch. +@return ChatV1ServiceChannelMessage +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRole Method for FetchRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Role resource to fetch. +@return ChatV1ServiceRole +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. +@return ChatV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*ChatV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUser Method for FetchUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the User resource to fetch. +@return ChatV1ServiceUser +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelParams Optional parameters for the method 'ListChannel' +type ListChannelParams struct { + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannel Method for ListChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param optional nil or *ListChannelOpts - Optional Parameters: + * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelResponse +*/ +func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { + path := "/v1/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialParams Optional parameters for the method 'ListCredential' +type ListCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredential Method for ListCredential + * @param optional nil or *ListCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialResponse +*/ +func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInviteParams Optional parameters for the method 'ListInvite' +type ListInviteParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInvite Method for ListInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resources to read belong to. + * @param optional nil or *ListInviteOpts - Optional Parameters: + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInviteResponse +*/ +func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMemberParams Optional parameters for the method 'ListMember' +type ListMemberParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMember Method for ListMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the members to read belong to. Can be the Channel resource's `sid` or `unique_name` value. + * @param optional nil or *ListMemberOpts - Optional Parameters: + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMemberResponse +*/ +func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessageParams Optional parameters for the method 'ListMessage' +type ListMessageParams struct { + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessage Method for ListMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to read belongs to. Can be the Channel's `sid` or `unique_name`. + * @param optional nil or *ListMessageOpts - Optional Parameters: + * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessageResponse +*/ +func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoleParams Optional parameters for the method 'ListRole' +type ListRoleParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRole Method for ListRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param optional nil or *ListRoleOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoleResponse +*/ +func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { + path := "/v1/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserParams Optional parameters for the method 'ListUser' +type ListUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUser Method for ListUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param optional nil or *ListUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserResponse +*/ +func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { + path := "/v1/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserChannelParams Optional parameters for the method 'ListUserChannel' +type ListUserChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUserChannel Method for ListUserChannel +List all Channels for a given User. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. + * @param optional nil or *ListUserChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserChannelResponse +*/ +func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { + path := "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChannelParams Optional parameters for the method 'UpdateChannel' +type UpdateChannelParams struct { + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateChannel Method for UpdateChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Channel resource to update. + * @param optional nil or *UpdateChannelOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. +@return ChatV1ServiceChannel +*/ +func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV1ServiceChannel, error) { + path := "/v1/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialParams Optional parameters for the method 'UpdateCredential' +type UpdateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` +} + +/* +UpdateCredential Method for UpdateCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to update. + * @param optional nil or *UpdateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. +@return ChatV1Credential +*/ +func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMemberParams Optional parameters for the method 'UpdateMember' +type UpdateMemberParams struct { + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateMember Method for UpdateMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to update belongs to. Can be the Channel resource's `sid` or `unique_name`. + * @param Sid The Twilio-provided string that uniquely identifies the Member resource to update. + * @param optional nil or *UpdateMemberOpts - Optional Parameters: + * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). +@return ChatV1ServiceChannelMember +*/ +func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV1ServiceChannelMember, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMessageParams Optional parameters for the method 'UpdateMessage' +type UpdateMessageParams struct { + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` +} + +/* +UpdateMessage Method for UpdateMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. + * @param ChannelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. + * @param Sid The Twilio-provided string that uniquely identifies the Message resource to update. + * @param optional nil or *UpdateMessageOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "Body" (string) - The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. +@return ChatV1ServiceChannelMessage +*/ +func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV1ServiceChannelMessage, error) { + path := "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoleParams Optional parameters for the method 'UpdateRole' +type UpdateRoleParams struct { + Permission *[]string `json:"Permission,omitempty"` +} + +/* +UpdateRole Method for UpdateRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Role resource to update. + * @param optional nil or *UpdateRoleOpts - Optional Parameters: + * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. +@return ChatV1ServiceRole +*/ +func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV1ServiceRole, error) { + path := "/v1/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhooksOnChannelAddMethod *string `json:"Webhooks.OnChannelAdd.Method,omitempty"` + WebhooksOnChannelAddUrl *string `json:"Webhooks.OnChannelAdd.Url,omitempty"` + WebhooksOnChannelAddedMethod *string `json:"Webhooks.OnChannelAdded.Method,omitempty"` + WebhooksOnChannelAddedUrl *string `json:"Webhooks.OnChannelAdded.Url,omitempty"` + WebhooksOnChannelDestroyMethod *string `json:"Webhooks.OnChannelDestroy.Method,omitempty"` + WebhooksOnChannelDestroyUrl *string `json:"Webhooks.OnChannelDestroy.Url,omitempty"` + WebhooksOnChannelDestroyedMethod *string `json:"Webhooks.OnChannelDestroyed.Method,omitempty"` + WebhooksOnChannelDestroyedUrl *string `json:"Webhooks.OnChannelDestroyed.Url,omitempty"` + WebhooksOnChannelUpdateMethod *string `json:"Webhooks.OnChannelUpdate.Method,omitempty"` + WebhooksOnChannelUpdateUrl *string `json:"Webhooks.OnChannelUpdate.Url,omitempty"` + WebhooksOnChannelUpdatedMethod *string `json:"Webhooks.OnChannelUpdated.Method,omitempty"` + WebhooksOnChannelUpdatedUrl *string `json:"Webhooks.OnChannelUpdated.Url,omitempty"` + WebhooksOnMemberAddMethod *string `json:"Webhooks.OnMemberAdd.Method,omitempty"` + WebhooksOnMemberAddUrl *string `json:"Webhooks.OnMemberAdd.Url,omitempty"` + WebhooksOnMemberAddedMethod *string `json:"Webhooks.OnMemberAdded.Method,omitempty"` + WebhooksOnMemberAddedUrl *string `json:"Webhooks.OnMemberAdded.Url,omitempty"` + WebhooksOnMemberRemoveMethod *string `json:"Webhooks.OnMemberRemove.Method,omitempty"` + WebhooksOnMemberRemoveUrl *string `json:"Webhooks.OnMemberRemove.Url,omitempty"` + WebhooksOnMemberRemovedMethod *string `json:"Webhooks.OnMemberRemoved.Method,omitempty"` + WebhooksOnMemberRemovedUrl *string `json:"Webhooks.OnMemberRemoved.Url,omitempty"` + WebhooksOnMessageRemoveMethod *string `json:"Webhooks.OnMessageRemove.Method,omitempty"` + WebhooksOnMessageRemoveUrl *string `json:"Webhooks.OnMessageRemove.Url,omitempty"` + WebhooksOnMessageRemovedMethod *string `json:"Webhooks.OnMessageRemoved.Method,omitempty"` + WebhooksOnMessageRemovedUrl *string `json:"Webhooks.OnMessageRemoved.Url,omitempty"` + WebhooksOnMessageSendMethod *string `json:"Webhooks.OnMessageSend.Method,omitempty"` + WebhooksOnMessageSendUrl *string `json:"Webhooks.OnMessageSend.Url,omitempty"` + WebhooksOnMessageSentMethod *string `json:"Webhooks.OnMessageSent.Method,omitempty"` + WebhooksOnMessageSentUrl *string `json:"Webhooks.OnMessageSent.Url,omitempty"` + WebhooksOnMessageUpdateMethod *string `json:"Webhooks.OnMessageUpdate.Method,omitempty"` + WebhooksOnMessageUpdateUrl *string `json:"Webhooks.OnMessageUpdate.Url,omitempty"` + WebhooksOnMessageUpdatedMethod *string `json:"Webhooks.OnMessageUpdated.Method,omitempty"` + WebhooksOnMessageUpdatedUrl *string `json:"Webhooks.OnMessageUpdated.Url,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "ConsumptionReportInterval" (int32) - DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. + * @param "DefaultChannelCreatorRoleSid" (string) - The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + * @param "DefaultChannelRoleSid" (string) - The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + * @param "DefaultServiceRoleSid" (string) - The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "LimitsChannelMembers" (int32) - The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. + * @param "LimitsUserChannels" (int32) - The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. + * @param "NotificationsAddedToChannelEnabled" (bool) - Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`. + * @param "NotificationsAddedToChannelTemplate" (string) - The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + * @param "NotificationsInvitedToChannelEnabled" (bool) - Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`. + * @param "NotificationsInvitedToChannelTemplate" (string) - The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + * @param "NotificationsNewMessageEnabled" (bool) - Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`. + * @param "NotificationsNewMessageTemplate" (string) - The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + * @param "NotificationsRemovedFromChannelEnabled" (bool) - Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`. + * @param "NotificationsRemovedFromChannelTemplate" (string) - The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + * @param "PostWebhookUrl" (string) - The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. + * @param "PreWebhookUrl" (string) - The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. + * @param "ReachabilityEnabled" (bool) - Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. + * @param "ReadStatusEnabled" (bool) - Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. + * @param "TypingIndicatorTimeout" (int32) - How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. + * @param "WebhookFilters" ([]string) - The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + * @param "WebhookMethod" (string) - The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + * @param "WebhooksOnChannelAddMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_add.url`. + * @param "WebhooksOnChannelAddUrl" (string) - The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method. + * @param "WebhooksOnChannelAddedMethod" (string) - The URL of the webhook to call in response to the `on_channel_added` event`. + * @param "WebhooksOnChannelAddedUrl" (string) - The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method. + * @param "WebhooksOnChannelDestroyMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_destroy.url`. + * @param "WebhooksOnChannelDestroyUrl" (string) - The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method. + * @param "WebhooksOnChannelDestroyedMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`. + * @param "WebhooksOnChannelDestroyedUrl" (string) - The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method. + * @param "WebhooksOnChannelUpdateMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_update.url`. + * @param "WebhooksOnChannelUpdateUrl" (string) - The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method. + * @param "WebhooksOnChannelUpdatedMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_updated.url`. + * @param "WebhooksOnChannelUpdatedUrl" (string) - The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. + * @param "WebhooksOnMemberAddMethod" (string) - The HTTP method to use when calling the `webhooks.on_member_add.url`. + * @param "WebhooksOnMemberAddUrl" (string) - The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method. + * @param "WebhooksOnMemberAddedMethod" (string) - The HTTP method to use when calling the `webhooks.on_channel_updated.url`. + * @param "WebhooksOnMemberAddedUrl" (string) - The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. + * @param "WebhooksOnMemberRemoveMethod" (string) - The HTTP method to use when calling the `webhooks.on_member_remove.url`. + * @param "WebhooksOnMemberRemoveUrl" (string) - The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method. + * @param "WebhooksOnMemberRemovedMethod" (string) - The HTTP method to use when calling the `webhooks.on_member_removed.url`. + * @param "WebhooksOnMemberRemovedUrl" (string) - The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method. + * @param "WebhooksOnMessageRemoveMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_remove.url`. + * @param "WebhooksOnMessageRemoveUrl" (string) - The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method. + * @param "WebhooksOnMessageRemovedMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_removed.url`. + * @param "WebhooksOnMessageRemovedUrl" (string) - The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method. + * @param "WebhooksOnMessageSendMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_send.url`. + * @param "WebhooksOnMessageSendUrl" (string) - The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method. + * @param "WebhooksOnMessageSentMethod" (string) - The URL of the webhook to call in response to the `on_message_sent` event`. + * @param "WebhooksOnMessageSentUrl" (string) - The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method. + * @param "WebhooksOnMessageUpdateMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_update.url`. + * @param "WebhooksOnMessageUpdateUrl" (string) - The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method. + * @param "WebhooksOnMessageUpdatedMethod" (string) - The HTTP method to use when calling the `webhooks.on_message_updated.url`. + * @param "WebhooksOnMessageUpdatedUrl" (string) - The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. +@return ChatV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhooksOnChannelAddMethod != nil { + data.Set("WebhooksOnChannelAddMethod", *params.WebhooksOnChannelAddMethod) + } + if params != nil && params.WebhooksOnChannelAddUrl != nil { + data.Set("WebhooksOnChannelAddUrl", *params.WebhooksOnChannelAddUrl) + } + if params != nil && params.WebhooksOnChannelAddedMethod != nil { + data.Set("WebhooksOnChannelAddedMethod", *params.WebhooksOnChannelAddedMethod) + } + if params != nil && params.WebhooksOnChannelAddedUrl != nil { + data.Set("WebhooksOnChannelAddedUrl", *params.WebhooksOnChannelAddedUrl) + } + if params != nil && params.WebhooksOnChannelDestroyMethod != nil { + data.Set("WebhooksOnChannelDestroyMethod", *params.WebhooksOnChannelDestroyMethod) + } + if params != nil && params.WebhooksOnChannelDestroyUrl != nil { + data.Set("WebhooksOnChannelDestroyUrl", *params.WebhooksOnChannelDestroyUrl) + } + if params != nil && params.WebhooksOnChannelDestroyedMethod != nil { + data.Set("WebhooksOnChannelDestroyedMethod", *params.WebhooksOnChannelDestroyedMethod) + } + if params != nil && params.WebhooksOnChannelDestroyedUrl != nil { + data.Set("WebhooksOnChannelDestroyedUrl", *params.WebhooksOnChannelDestroyedUrl) + } + if params != nil && params.WebhooksOnChannelUpdateMethod != nil { + data.Set("WebhooksOnChannelUpdateMethod", *params.WebhooksOnChannelUpdateMethod) + } + if params != nil && params.WebhooksOnChannelUpdateUrl != nil { + data.Set("WebhooksOnChannelUpdateUrl", *params.WebhooksOnChannelUpdateUrl) + } + if params != nil && params.WebhooksOnChannelUpdatedMethod != nil { + data.Set("WebhooksOnChannelUpdatedMethod", *params.WebhooksOnChannelUpdatedMethod) + } + if params != nil && params.WebhooksOnChannelUpdatedUrl != nil { + data.Set("WebhooksOnChannelUpdatedUrl", *params.WebhooksOnChannelUpdatedUrl) + } + if params != nil && params.WebhooksOnMemberAddMethod != nil { + data.Set("WebhooksOnMemberAddMethod", *params.WebhooksOnMemberAddMethod) + } + if params != nil && params.WebhooksOnMemberAddUrl != nil { + data.Set("WebhooksOnMemberAddUrl", *params.WebhooksOnMemberAddUrl) + } + if params != nil && params.WebhooksOnMemberAddedMethod != nil { + data.Set("WebhooksOnMemberAddedMethod", *params.WebhooksOnMemberAddedMethod) + } + if params != nil && params.WebhooksOnMemberAddedUrl != nil { + data.Set("WebhooksOnMemberAddedUrl", *params.WebhooksOnMemberAddedUrl) + } + if params != nil && params.WebhooksOnMemberRemoveMethod != nil { + data.Set("WebhooksOnMemberRemoveMethod", *params.WebhooksOnMemberRemoveMethod) + } + if params != nil && params.WebhooksOnMemberRemoveUrl != nil { + data.Set("WebhooksOnMemberRemoveUrl", *params.WebhooksOnMemberRemoveUrl) + } + if params != nil && params.WebhooksOnMemberRemovedMethod != nil { + data.Set("WebhooksOnMemberRemovedMethod", *params.WebhooksOnMemberRemovedMethod) + } + if params != nil && params.WebhooksOnMemberRemovedUrl != nil { + data.Set("WebhooksOnMemberRemovedUrl", *params.WebhooksOnMemberRemovedUrl) + } + if params != nil && params.WebhooksOnMessageRemoveMethod != nil { + data.Set("WebhooksOnMessageRemoveMethod", *params.WebhooksOnMessageRemoveMethod) + } + if params != nil && params.WebhooksOnMessageRemoveUrl != nil { + data.Set("WebhooksOnMessageRemoveUrl", *params.WebhooksOnMessageRemoveUrl) + } + if params != nil && params.WebhooksOnMessageRemovedMethod != nil { + data.Set("WebhooksOnMessageRemovedMethod", *params.WebhooksOnMessageRemovedMethod) + } + if params != nil && params.WebhooksOnMessageRemovedUrl != nil { + data.Set("WebhooksOnMessageRemovedUrl", *params.WebhooksOnMessageRemovedUrl) + } + if params != nil && params.WebhooksOnMessageSendMethod != nil { + data.Set("WebhooksOnMessageSendMethod", *params.WebhooksOnMessageSendMethod) + } + if params != nil && params.WebhooksOnMessageSendUrl != nil { + data.Set("WebhooksOnMessageSendUrl", *params.WebhooksOnMessageSendUrl) + } + if params != nil && params.WebhooksOnMessageSentMethod != nil { + data.Set("WebhooksOnMessageSentMethod", *params.WebhooksOnMessageSentMethod) + } + if params != nil && params.WebhooksOnMessageSentUrl != nil { + data.Set("WebhooksOnMessageSentUrl", *params.WebhooksOnMessageSentUrl) + } + if params != nil && params.WebhooksOnMessageUpdateMethod != nil { + data.Set("WebhooksOnMessageUpdateMethod", *params.WebhooksOnMessageUpdateMethod) + } + if params != nil && params.WebhooksOnMessageUpdateUrl != nil { + data.Set("WebhooksOnMessageUpdateUrl", *params.WebhooksOnMessageUpdateUrl) + } + if params != nil && params.WebhooksOnMessageUpdatedMethod != nil { + data.Set("WebhooksOnMessageUpdatedMethod", *params.WebhooksOnMessageUpdatedMethod) + } + if params != nil && params.WebhooksOnMessageUpdatedUrl != nil { + data.Set("WebhooksOnMessageUpdatedUrl", *params.WebhooksOnMessageUpdatedUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserParams Optional parameters for the method 'UpdateUser' +type UpdateUserParams struct { + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateUser Method for UpdateUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the User resource to update. + * @param optional nil or *UpdateUserOpts - Optional Parameters: + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. +@return ChatV1ServiceUser +*/ +func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV1ServiceUser, error) { + path := "/v1/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV1ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/chat/v1/docs/ChatV1Credential.md b/rest/chat/v1/docs/ChatV1Credential.md new file mode 100644 index 000000000..1dc156e3e --- /dev/null +++ b/rest/chat/v1/docs/ChatV1Credential.md @@ -0,0 +1,18 @@ +# ChatV1Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1Service.md b/rest/chat/v1/docs/ChatV1Service.md new file mode 100644 index 000000000..bf5a91635 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1Service.md @@ -0,0 +1,31 @@ +# ChatV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConsumptionReportInterval** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultChannelCreatorRoleSid** | **string** | | [optional] +**DefaultChannelRoleSid** | **string** | | [optional] +**DefaultServiceRoleSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Limits** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Notifications** | [**map[string]interface{}**](.md) | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**ReadStatusEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**TypingIndicatorTimeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WebhookFilters** | **[]string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**Webhooks** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceChannel.md b/rest/chat/v1/docs/ChatV1ServiceChannel.md new file mode 100644 index 000000000..13e1e4dbd --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceChannel.md @@ -0,0 +1,24 @@ +# ChatV1ServiceChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MembersCount** | **int32** | | [optional] +**MessagesCount** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md b/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md new file mode 100644 index 000000000..889eaf51f --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceChannelInvite.md @@ -0,0 +1,20 @@ +# ChatV1ServiceChannelInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceChannelMember.md b/rest/chat/v1/docs/ChatV1ServiceChannelMember.md new file mode 100644 index 000000000..d95356011 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceChannelMember.md @@ -0,0 +1,21 @@ +# ChatV1ServiceChannelMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md b/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md new file mode 100644 index 000000000..34244bb02 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceChannelMessage.md @@ -0,0 +1,23 @@ +# ChatV1ServiceChannelMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**Index** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**To** | **string** | | [optional] +**Url** | **string** | | [optional] +**WasEdited** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceRole.md b/rest/chat/v1/docs/ChatV1ServiceRole.md new file mode 100644 index 000000000..fbbf2b844 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceRole.md @@ -0,0 +1,19 @@ +# ChatV1ServiceRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceUser.md b/rest/chat/v1/docs/ChatV1ServiceUser.md new file mode 100644 index 000000000..8291ff7e5 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceUser.md @@ -0,0 +1,24 @@ +# ChatV1ServiceUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**JoinedChannelsCount** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md b/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md new file mode 100644 index 000000000..3edbd6b18 --- /dev/null +++ b/rest/chat/v1/docs/ChatV1ServiceUserUserChannel.md @@ -0,0 +1,18 @@ +# ChatV1ServiceUserUserChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MemberSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UnreadMessagesCount** | Pointer to **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateChannelRequest.md b/rest/chat/v1/docs/CreateChannelRequest.md new file mode 100644 index 000000000..8fe7904db --- /dev/null +++ b/rest/chat/v1/docs/CreateChannelRequest.md @@ -0,0 +1,14 @@ +# CreateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**Type** | **string** | The visibility of the channel. Can be: `public` or `private` and defaults to `public`. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateCredentialRequest.md b/rest/chat/v1/docs/CreateCredentialRequest.md new file mode 100644 index 000000000..9c9bacf6b --- /dev/null +++ b/rest/chat/v1/docs/CreateCredentialRequest.md @@ -0,0 +1,17 @@ +# CreateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] +**Type** | **string** | The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateInviteRequest.md b/rest/chat/v1/docs/CreateInviteRequest.md new file mode 100644 index 000000000..cef41d7b6 --- /dev/null +++ b/rest/chat/v1/docs/CreateInviteRequest.md @@ -0,0 +1,12 @@ +# CreateInviteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. | +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateMemberRequest.md b/rest/chat/v1/docs/CreateMemberRequest.md new file mode 100644 index 000000000..ae36a63d1 --- /dev/null +++ b/rest/chat/v1/docs/CreateMemberRequest.md @@ -0,0 +1,12 @@ +# CreateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. | +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateMessageRequest.md b/rest/chat/v1/docs/CreateMessageRequest.md new file mode 100644 index 000000000..6128ba871 --- /dev/null +++ b/rest/chat/v1/docs/CreateMessageRequest.md @@ -0,0 +1,13 @@ +# CreateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**Body** | **string** | The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | +**From** | **string** | The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateRoleRequest.md b/rest/chat/v1/docs/CreateRoleRequest.md new file mode 100644 index 000000000..b6064eca3 --- /dev/null +++ b/rest/chat/v1/docs/CreateRoleRequest.md @@ -0,0 +1,13 @@ +# CreateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | +**Permission** | **[]string** | A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. | +**Type** | **string** | The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateServiceRequest.md b/rest/chat/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..ba64fed64 --- /dev/null +++ b/rest/chat/v1/docs/CreateServiceRequest.md @@ -0,0 +1,11 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/CreateUserRequest.md b/rest/chat/v1/docs/CreateUserRequest.md new file mode 100644 index 000000000..b995c5b96 --- /dev/null +++ b/rest/chat/v1/docs/CreateUserRequest.md @@ -0,0 +1,14 @@ +# CreateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. This value is often used for display purposes. | [optional] +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. | +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/DefaultApi.md b/rest/chat/v1/docs/DefaultApi.md new file mode 100644 index 000000000..6e3325a60 --- /dev/null +++ b/rest/chat/v1/docs/DefaultApi.md @@ -0,0 +1,1718 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateChannel**](DefaultApi.md#CreateChannel) | **Post** /v1/Services/{ServiceSid}/Channels | +[**CreateCredential**](DefaultApi.md#CreateCredential) | **Post** /v1/Credentials | +[**CreateInvite**](DefaultApi.md#CreateInvite) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**CreateMember**](DefaultApi.md#CreateMember) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**CreateMessage**](DefaultApi.md#CreateMessage) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**CreateRole**](DefaultApi.md#CreateRole) | **Post** /v1/Services/{ServiceSid}/Roles | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /v1/Services/{ServiceSid}/Users | +[**DeleteChannel**](DefaultApi.md#DeleteChannel) | **Delete** /v1/Services/{ServiceSid}/Channels/{Sid} | +[**DeleteCredential**](DefaultApi.md#DeleteCredential) | **Delete** /v1/Credentials/{Sid} | +[**DeleteInvite**](DefaultApi.md#DeleteInvite) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**DeleteMember**](DefaultApi.md#DeleteMember) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**DeleteMessage**](DefaultApi.md#DeleteMessage) | **Delete** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /v1/Services/{ServiceSid}/Roles/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /v1/Services/{ServiceSid}/Users/{Sid} | +[**FetchChannel**](DefaultApi.md#FetchChannel) | **Get** /v1/Services/{ServiceSid}/Channels/{Sid} | +[**FetchCredential**](DefaultApi.md#FetchCredential) | **Get** /v1/Credentials/{Sid} | +[**FetchInvite**](DefaultApi.md#FetchInvite) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**FetchMember**](DefaultApi.md#FetchMember) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**FetchMessage**](DefaultApi.md#FetchMessage) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**FetchRole**](DefaultApi.md#FetchRole) | **Get** /v1/Services/{ServiceSid}/Roles/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchUser**](DefaultApi.md#FetchUser) | **Get** /v1/Services/{ServiceSid}/Users/{Sid} | +[**ListChannel**](DefaultApi.md#ListChannel) | **Get** /v1/Services/{ServiceSid}/Channels | +[**ListCredential**](DefaultApi.md#ListCredential) | **Get** /v1/Credentials | +[**ListInvite**](DefaultApi.md#ListInvite) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**ListMember**](DefaultApi.md#ListMember) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**ListMessage**](DefaultApi.md#ListMessage) | **Get** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**ListRole**](DefaultApi.md#ListRole) | **Get** /v1/Services/{ServiceSid}/Roles | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListUser**](DefaultApi.md#ListUser) | **Get** /v1/Services/{ServiceSid}/Users | +[**ListUserChannel**](DefaultApi.md#ListUserChannel) | **Get** /v1/Services/{ServiceSid}/Users/{UserSid}/Channels | +[**UpdateChannel**](DefaultApi.md#UpdateChannel) | **Post** /v1/Services/{ServiceSid}/Channels/{Sid} | +[**UpdateCredential**](DefaultApi.md#UpdateCredential) | **Post** /v1/Credentials/{Sid} | +[**UpdateMember**](DefaultApi.md#UpdateMember) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**UpdateMessage**](DefaultApi.md#UpdateMessage) | **Post** /v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**UpdateRole**](DefaultApi.md#UpdateRole) | **Post** /v1/Services/{ServiceSid}/Roles/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | +[**UpdateUser**](DefaultApi.md#UpdateUser) | **Post** /v1/Services/{ServiceSid}/Users/{Sid} | + + + +## CreateChannel + +> ChatV1ServiceChannel CreateChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | + **optional** | ***CreateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Type** | **optional.String**| The visibility of the channel. Can be: `public` or `private` and defaults to `public`. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | + +### Return type + +[**ChatV1ServiceChannel**](chat.v1.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredential + +> ChatV1Credential CreateCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + **Type** | **optional.String**| The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. | + +### Return type + +[**ChatV1Credential**](chat.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateInvite + +> ChatV1ServiceChannelInvite CreateInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. | + **optional** | ***CreateInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. | + +### Return type + +[**ChatV1ServiceChannelInvite**](chat.v1.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMember + +> ChatV1ServiceChannelMember CreateMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). | + +### Return type + +[**ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessage + +> ChatV1ServiceChannelMessage CreateMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **Body** | **optional.String**| The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | + **From** | **optional.String**| The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. | + +### Return type + +[**ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRole + +> ChatV1ServiceRole CreateRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | + **optional** | ***CreateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. | + **Type** | **optional.String**| The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. | + +### Return type + +[**ChatV1ServiceRole**](chat.v1.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> ChatV1Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + +### Return type + +[**ChatV1Service**](chat.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> ChatV1ServiceUser CreateUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under. | + **optional** | ***CreateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. This value is often used for display purposes. | + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. | + +### Return type + +[**ChatV1ServiceUser**](chat.v1.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannel + +> DeleteChannel(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Channel resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInvite + +> DeleteInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Invite resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMember + +> DeleteMember(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Member resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessage + +> DeleteMessage(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Role resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the User resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannel + +> ChatV1ServiceChannel FetchChannel(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Channel resource to fetch. | + +### Return type + +[**ChatV1ServiceChannel**](chat.v1.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredential + +> ChatV1Credential FetchCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to fetch. | + +### Return type + +[**ChatV1Credential**](chat.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInvite + +> ChatV1ServiceChannelInvite FetchInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Invite resource to fetch. | + +### Return type + +[**ChatV1ServiceChannelInvite**](chat.v1.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMember + +> ChatV1ServiceChannelMember FetchMember(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Member resource to fetch. | + +### Return type + +[**ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessage + +> ChatV1ServiceChannelMessage FetchMessage(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to fetch. | + +### Return type + +[**ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRole + +> ChatV1ServiceRole FetchRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Role resource to fetch. | + +### Return type + +[**ChatV1ServiceRole**](chat.v1.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> ChatV1Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to fetch. | + +### Return type + +[**ChatV1Service**](chat.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUser + +> ChatV1ServiceUser FetchUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the User resource to fetch. | + +### Return type + +[**ChatV1ServiceUser**](chat.v1.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannel + +> ListChannelResponse ListChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | + **optional** | ***ListChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Type** | [**optional.Interface of []string**](string.md)| The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelResponse**](ListChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredential + +> ListCredentialResponse ListCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInvite + +> ListInviteResponse ListInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resources to read belong to. | + **optional** | ***ListInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInviteResponse**](ListInviteResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMember + +> ListMemberResponse ListMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the members to read belong to. Can be the Channel resource's `sid` or `unique_name` value. | + **optional** | ***ListMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMemberResponse**](ListMemberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessage + +> ListMessageResponse ListMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to read belongs to. Can be the Channel's `sid` or `unique_name`. | + **optional** | ***ListMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessageResponse**](ListMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRole + +> ListRoleResponse ListRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | + **optional** | ***ListRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoleResponse**](ListRoleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUser + +> ListUserResponse ListUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | + **optional** | ***ListUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserResponse**](ListUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUserChannel + +> ListUserChannelResponse ListUserChannel(ctx, ServiceSid, UserSid, optional) + + + +List all Channels for a given User. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. | + **optional** | ***ListUserChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserChannelResponse**](ListUserChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChannel + +> ChatV1ServiceChannel UpdateChannel(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Channel resource to update. | + **optional** | ***UpdateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | + +### Return type + +[**ChatV1ServiceChannel**](chat.v1.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredential + +> ChatV1Credential UpdateCredential(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to update. | + **optional** | ***UpdateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + +### Return type + +[**ChatV1Credential**](chat.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMember + +> ChatV1ServiceChannelMember UpdateMember(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to update belongs to. Can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Member resource to update. | + **optional** | ***UpdateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **LastConsumedMessageIndex** | **optional.Int32**| The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). | + +### Return type + +[**ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessage + +> ChatV1ServiceChannelMessage UpdateMessage(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. | +**ChannelSid** | **string**| The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Message resource to update. | + **optional** | ***UpdateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **Body** | **optional.String**| The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | + +### Return type + +[**ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> ChatV1ServiceRole UpdateRole(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Role resource to update. | + **optional** | ***UpdateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. | + +### Return type + +[**ChatV1ServiceRole**](chat.v1.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ChatV1Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ConsumptionReportInterval** | **optional.Int32**| DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. | + **DefaultChannelCreatorRoleSid** | **optional.String**| The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | + **DefaultChannelRoleSid** | **optional.String**| The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | + **DefaultServiceRoleSid** | **optional.String**| The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **LimitsChannelMembers** | **optional.Int32**| The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. | + **LimitsUserChannels** | **optional.Int32**| The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. | + **NotificationsAddedToChannelEnabled** | **optional.Bool**| Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`. | + **NotificationsAddedToChannelTemplate** | **optional.String**| The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | + **NotificationsInvitedToChannelEnabled** | **optional.Bool**| Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`. | + **NotificationsInvitedToChannelTemplate** | **optional.String**| The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | + **NotificationsNewMessageEnabled** | **optional.Bool**| Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`. | + **NotificationsNewMessageTemplate** | **optional.String**| The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | + **NotificationsRemovedFromChannelEnabled** | **optional.Bool**| Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`. | + **NotificationsRemovedFromChannelTemplate** | **optional.String**| The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | + **PostWebhookUrl** | **optional.String**| The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. | + **PreWebhookUrl** | **optional.String**| The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. | + **ReachabilityEnabled** | **optional.Bool**| Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. | + **ReadStatusEnabled** | **optional.Bool**| Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. | + **TypingIndicatorTimeout** | **optional.Int32**| How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. | + **WebhookFilters** | [**optional.Interface of []string**](string.md)| The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + **WebhookMethod** | **optional.String**| The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + **WebhooksOnChannelAddMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_add.url`. | + **WebhooksOnChannelAddUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method. | + **WebhooksOnChannelAddedMethod** | **optional.String**| The URL of the webhook to call in response to the `on_channel_added` event`. | + **WebhooksOnChannelAddedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method. | + **WebhooksOnChannelDestroyMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_destroy.url`. | + **WebhooksOnChannelDestroyUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method. | + **WebhooksOnChannelDestroyedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`. | + **WebhooksOnChannelDestroyedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method. | + **WebhooksOnChannelUpdateMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_update.url`. | + **WebhooksOnChannelUpdateUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method. | + **WebhooksOnChannelUpdatedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_updated.url`. | + **WebhooksOnChannelUpdatedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. | + **WebhooksOnMemberAddMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_member_add.url`. | + **WebhooksOnMemberAddUrl** | **optional.String**| The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method. | + **WebhooksOnMemberAddedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_channel_updated.url`. | + **WebhooksOnMemberAddedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. | + **WebhooksOnMemberRemoveMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_member_remove.url`. | + **WebhooksOnMemberRemoveUrl** | **optional.String**| The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method. | + **WebhooksOnMemberRemovedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_member_removed.url`. | + **WebhooksOnMemberRemovedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method. | + **WebhooksOnMessageRemoveMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_message_remove.url`. | + **WebhooksOnMessageRemoveUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method. | + **WebhooksOnMessageRemovedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_message_removed.url`. | + **WebhooksOnMessageRemovedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method. | + **WebhooksOnMessageSendMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_message_send.url`. | + **WebhooksOnMessageSendUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method. | + **WebhooksOnMessageSentMethod** | **optional.String**| The URL of the webhook to call in response to the `on_message_sent` event`. | + **WebhooksOnMessageSentUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method. | + **WebhooksOnMessageUpdateMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_message_update.url`. | + **WebhooksOnMessageUpdateUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method. | + **WebhooksOnMessageUpdatedMethod** | **optional.String**| The HTTP method to use when calling the `webhooks.on_message_updated.url`. | + **WebhooksOnMessageUpdatedUrl** | **optional.String**| The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. | + +### Return type + +[**ChatV1Service**](chat.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> ChatV1ServiceUser UpdateUser(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the User resource to update. | + **optional** | ***UpdateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is often used for display purposes. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. | + +### Return type + +[**ChatV1ServiceUser**](chat.v1.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/chat/v1/docs/ListChannelResponse.md b/rest/chat/v1/docs/ListChannelResponse.md new file mode 100644 index 000000000..d90e6cc71 --- /dev/null +++ b/rest/chat/v1/docs/ListChannelResponse.md @@ -0,0 +1,12 @@ +# ListChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV1ServiceChannel**](chat.v1.service.channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListCredentialResponse.md b/rest/chat/v1/docs/ListCredentialResponse.md new file mode 100644 index 000000000..d965fd433 --- /dev/null +++ b/rest/chat/v1/docs/ListCredentialResponse.md @@ -0,0 +1,12 @@ +# ListCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ChatV1Credential**](chat.v1.credential.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListCredentialResponseMeta.md b/rest/chat/v1/docs/ListCredentialResponseMeta.md new file mode 100644 index 000000000..20d8e9381 --- /dev/null +++ b/rest/chat/v1/docs/ListCredentialResponseMeta.md @@ -0,0 +1,17 @@ +# ListCredentialResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListInviteResponse.md b/rest/chat/v1/docs/ListInviteResponse.md new file mode 100644 index 000000000..9ad0b1cf3 --- /dev/null +++ b/rest/chat/v1/docs/ListInviteResponse.md @@ -0,0 +1,12 @@ +# ListInviteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]ChatV1ServiceChannelInvite**](chat.v1.service.channel.invite.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListMemberResponse.md b/rest/chat/v1/docs/ListMemberResponse.md new file mode 100644 index 000000000..ee3477263 --- /dev/null +++ b/rest/chat/v1/docs/ListMemberResponse.md @@ -0,0 +1,12 @@ +# ListMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]ChatV1ServiceChannelMember**](chat.v1.service.channel.member.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListMessageResponse.md b/rest/chat/v1/docs/ListMessageResponse.md new file mode 100644 index 000000000..d15a64965 --- /dev/null +++ b/rest/chat/v1/docs/ListMessageResponse.md @@ -0,0 +1,12 @@ +# ListMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ChatV1ServiceChannelMessage**](chat.v1.service.channel.message.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListRoleResponse.md b/rest/chat/v1/docs/ListRoleResponse.md new file mode 100644 index 000000000..f7c5035ed --- /dev/null +++ b/rest/chat/v1/docs/ListRoleResponse.md @@ -0,0 +1,12 @@ +# ListRoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Roles** | [**[]ChatV1ServiceRole**](chat.v1.service.role.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListServiceResponse.md b/rest/chat/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..68a8fdb58 --- /dev/null +++ b/rest/chat/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Services** | [**[]ChatV1Service**](chat.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListUserChannelResponse.md b/rest/chat/v1/docs/ListUserChannelResponse.md new file mode 100644 index 000000000..7952b836a --- /dev/null +++ b/rest/chat/v1/docs/ListUserChannelResponse.md @@ -0,0 +1,12 @@ +# ListUserChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV1ServiceUserUserChannel**](chat.v1.service.user.user_channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/ListUserResponse.md b/rest/chat/v1/docs/ListUserResponse.md new file mode 100644 index 000000000..fc2caa81a --- /dev/null +++ b/rest/chat/v1/docs/ListUserResponse.md @@ -0,0 +1,12 @@ +# ListUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Users** | [**[]ChatV1ServiceUser**](chat.v1.service.user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateChannelRequest.md b/rest/chat/v1/docs/UpdateChannelRequest.md new file mode 100644 index 000000000..ee0a44795 --- /dev/null +++ b/rest/chat/v1/docs/UpdateChannelRequest.md @@ -0,0 +1,13 @@ +# UpdateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateCredentialRequest.md b/rest/chat/v1/docs/UpdateCredentialRequest.md new file mode 100644 index 000000000..f9366b7e9 --- /dev/null +++ b/rest/chat/v1/docs/UpdateCredentialRequest.md @@ -0,0 +1,16 @@ +# UpdateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateMemberRequest.md b/rest/chat/v1/docs/UpdateMemberRequest.md new file mode 100644 index 000000000..d78247494 --- /dev/null +++ b/rest/chat/v1/docs/UpdateMemberRequest.md @@ -0,0 +1,12 @@ +# UpdateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). | [optional] +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateMessageRequest.md b/rest/chat/v1/docs/UpdateMessageRequest.md new file mode 100644 index 000000000..1d10e9759 --- /dev/null +++ b/rest/chat/v1/docs/UpdateMessageRequest.md @@ -0,0 +1,12 @@ +# UpdateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**Body** | **string** | The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateRoleRequest.md b/rest/chat/v1/docs/UpdateRoleRequest.md new file mode 100644 index 000000000..43c54ff12 --- /dev/null +++ b/rest/chat/v1/docs/UpdateRoleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Permission** | **[]string** | A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateServiceRequest.md b/rest/chat/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..ffbb9705e --- /dev/null +++ b/rest/chat/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,64 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConsumptionReportInterval** | **int32** | DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. | [optional] +**DefaultChannelCreatorRoleSid** | **string** | The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | [optional] +**DefaultChannelRoleSid** | **string** | The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | [optional] +**DefaultServiceRoleSid** | **string** | The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**LimitsChannelMembers** | **int32** | The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. | [optional] +**LimitsUserChannels** | **int32** | The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. | [optional] +**NotificationsAddedToChannelEnabled** | **bool** | Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`. | [optional] +**NotificationsAddedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | [optional] +**NotificationsInvitedToChannelEnabled** | **bool** | Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`. | [optional] +**NotificationsInvitedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | [optional] +**NotificationsNewMessageEnabled** | **bool** | Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`. | [optional] +**NotificationsNewMessageTemplate** | **string** | The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | [optional] +**NotificationsRemovedFromChannelEnabled** | **bool** | Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`. | [optional] +**NotificationsRemovedFromChannelTemplate** | **string** | The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | [optional] +**PostWebhookUrl** | **string** | The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. | [optional] +**PreWebhookUrl** | **string** | The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. | [optional] +**ReachabilityEnabled** | **bool** | Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. | [optional] +**ReadStatusEnabled** | **bool** | Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. | [optional] +**TypingIndicatorTimeout** | **int32** | How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. | [optional] +**WebhookFilters** | **[]string** | The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] +**WebhookMethod** | **string** | The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] +**WebhooksOnChannelAddMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_add.url`. | [optional] +**WebhooksOnChannelAddUrl** | **string** | The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method. | [optional] +**WebhooksOnChannelAddedMethod** | **string** | The URL of the webhook to call in response to the `on_channel_added` event`. | [optional] +**WebhooksOnChannelAddedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method. | [optional] +**WebhooksOnChannelDestroyMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_destroy.url`. | [optional] +**WebhooksOnChannelDestroyUrl** | **string** | The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method. | [optional] +**WebhooksOnChannelDestroyedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`. | [optional] +**WebhooksOnChannelDestroyedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method. | [optional] +**WebhooksOnChannelUpdateMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_update.url`. | [optional] +**WebhooksOnChannelUpdateUrl** | **string** | The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method. | [optional] +**WebhooksOnChannelUpdatedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_updated.url`. | [optional] +**WebhooksOnChannelUpdatedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. | [optional] +**WebhooksOnMemberAddMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_add.url`. | [optional] +**WebhooksOnMemberAddUrl** | **string** | The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method. | [optional] +**WebhooksOnMemberAddedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_channel_updated.url`. | [optional] +**WebhooksOnMemberAddedUrl** | **string** | The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. | [optional] +**WebhooksOnMemberRemoveMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_remove.url`. | [optional] +**WebhooksOnMemberRemoveUrl** | **string** | The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method. | [optional] +**WebhooksOnMemberRemovedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_member_removed.url`. | [optional] +**WebhooksOnMemberRemovedUrl** | **string** | The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method. | [optional] +**WebhooksOnMessageRemoveMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_remove.url`. | [optional] +**WebhooksOnMessageRemoveUrl** | **string** | The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method. | [optional] +**WebhooksOnMessageRemovedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_removed.url`. | [optional] +**WebhooksOnMessageRemovedUrl** | **string** | The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method. | [optional] +**WebhooksOnMessageSendMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_send.url`. | [optional] +**WebhooksOnMessageSendUrl** | **string** | The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method. | [optional] +**WebhooksOnMessageSentMethod** | **string** | The URL of the webhook to call in response to the `on_message_sent` event`. | [optional] +**WebhooksOnMessageSentUrl** | **string** | The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method. | [optional] +**WebhooksOnMessageUpdateMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_update.url`. | [optional] +**WebhooksOnMessageUpdateUrl** | **string** | The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method. | [optional] +**WebhooksOnMessageUpdatedMethod** | **string** | The HTTP method to use when calling the `webhooks.on_message_updated.url`. | [optional] +**WebhooksOnMessageUpdatedUrl** | **string** | The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/docs/UpdateUserRequest.md b/rest/chat/v1/docs/UpdateUserRequest.md new file mode 100644 index 000000000..f77ae0017 --- /dev/null +++ b/rest/chat/v1/docs/UpdateUserRequest.md @@ -0,0 +1,13 @@ +# UpdateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is often used for display purposes. | [optional] +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v1/model_chat_v1_credential.go b/rest/chat/v1/model_chat_v1_credential.go new file mode 100644 index 000000000..36fe07088 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1Credential struct for ChatV1Credential +type ChatV1Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service.go b/rest/chat/v1/model_chat_v1_service.go new file mode 100644 index 000000000..3411728d9 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service.go @@ -0,0 +1,38 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1Service struct for ChatV1Service +type ChatV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Limits map[string]interface{} `json:"Limits,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Notifications map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + Url string `json:"Url,omitempty"` + WebhookFilters []string `json:"WebhookFilters,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + Webhooks map[string]interface{} `json:"Webhooks,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_channel.go b/rest/chat/v1/model_chat_v1_service_channel.go new file mode 100644 index 000000000..65b0db3a3 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_channel.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceChannel struct for ChatV1ServiceChannel +type ChatV1ServiceChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MembersCount int32 `json:"MembersCount,omitempty"` + MessagesCount int32 `json:"MessagesCount,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_channel_invite.go b/rest/chat/v1/model_chat_v1_service_channel_invite.go new file mode 100644 index 000000000..3fbfbaa81 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_channel_invite.go @@ -0,0 +1,27 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceChannelInvite struct for ChatV1ServiceChannelInvite +type ChatV1ServiceChannelInvite struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_channel_member.go b/rest/chat/v1/model_chat_v1_service_channel_member.go new file mode 100644 index 000000000..9fc35a28c --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_channel_member.go @@ -0,0 +1,28 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceChannelMember struct for ChatV1ServiceChannelMember +type ChatV1ServiceChannelMember struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_channel_message.go b/rest/chat/v1/model_chat_v1_service_channel_message.go new file mode 100644 index 000000000..ab09485d1 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_channel_message.go @@ -0,0 +1,30 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceChannelMessage struct for ChatV1ServiceChannelMessage +type ChatV1ServiceChannelMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + Index int32 `json:"Index,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + To string `json:"To,omitempty"` + Url string `json:"Url,omitempty"` + WasEdited bool `json:"WasEdited,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_role.go b/rest/chat/v1/model_chat_v1_service_role.go new file mode 100644 index 000000000..60138a3f3 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceRole struct for ChatV1ServiceRole +type ChatV1ServiceRole struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_user.go b/rest/chat/v1/model_chat_v1_service_user.go new file mode 100644 index 000000000..80a547c23 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_user.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV1ServiceUser struct for ChatV1ServiceUser +type ChatV1ServiceUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + JoinedChannelsCount int32 `json:"JoinedChannelsCount,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_chat_v1_service_user_user_channel.go b/rest/chat/v1/model_chat_v1_service_user_user_channel.go new file mode 100644 index 000000000..bc0344266 --- /dev/null +++ b/rest/chat/v1/model_chat_v1_service_user_user_channel.go @@ -0,0 +1,22 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ChatV1ServiceUserUserChannel struct for ChatV1ServiceUserUserChannel +type ChatV1ServiceUserUserChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MemberSid string `json:"MemberSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Status string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` +} diff --git a/rest/chat/v1/model_create_channel_request.go b/rest/chat/v1/model_create_channel_request.go new file mode 100644 index 000000000..759d17561 --- /dev/null +++ b/rest/chat/v1/model_create_channel_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateChannelRequest struct for CreateChannelRequest +type CreateChannelRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The visibility of the channel. Can be: `public` or `private` and defaults to `public`. + Type string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/chat/v1/model_create_credential_request.go b/rest/chat/v1/model_create_credential_request.go new file mode 100644 index 000000000..72793a790 --- /dev/null +++ b/rest/chat/v1/model_create_credential_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialRequest struct for CreateCredentialRequest +type CreateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` + // The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. + Type string `json:"Type"` +} diff --git a/rest/chat/v1/model_create_invite_request.go b/rest/chat/v1/model_create_invite_request.go new file mode 100644 index 000000000..4595ae754 --- /dev/null +++ b/rest/chat/v1/model_create_invite_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateInviteRequest struct for CreateInviteRequest +type CreateInviteRequest struct { + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info. + Identity string `json:"Identity"` + // The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v1/model_create_member_request.go b/rest/chat/v1/model_create_member_request.go new file mode 100644 index 000000000..895979779 --- /dev/null +++ b/rest/chat/v1/model_create_member_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMemberRequest struct for CreateMemberRequest +type CreateMemberRequest struct { + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details. + Identity string `json:"Identity"` + // The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v1/model_create_message_request.go b/rest/chat/v1/model_create_message_request.go new file mode 100644 index 000000000..f397d7d3a --- /dev/null +++ b/rest/chat/v1/model_create_message_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMessageRequest struct for CreateMessageRequest +type CreateMessageRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + Body string `json:"Body"` + // The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`. + From string `json:"From,omitempty"` +} diff --git a/rest/chat/v1/model_create_role_request.go b/rest/chat/v1/model_create_role_request.go new file mode 100644 index 000000000..f411c19b6 --- /dev/null +++ b/rest/chat/v1/model_create_role_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRoleRequest struct for CreateRoleRequest +type CreateRoleRequest struct { + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. + Permission []string `json:"Permission"` + // The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles. + Type string `json:"Type"` +} diff --git a/rest/chat/v1/model_create_service_request.go b/rest/chat/v1/model_create_service_request.go new file mode 100644 index 000000000..6fb4bf2f0 --- /dev/null +++ b/rest/chat/v1/model_create_service_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/chat/v1/model_create_user_request.go b/rest/chat/v1/model_create_user_request.go new file mode 100644 index 000000000..091afcf4f --- /dev/null +++ b/rest/chat/v1/model_create_user_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateUserRequest struct for CreateUserRequest +type CreateUserRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the new resource. This value is often used for display purposes. + FriendlyName string `json:"FriendlyName,omitempty"` + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details. + Identity string `json:"Identity"` + // The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v1/model_list_channel_response.go b/rest/chat/v1/model_list_channel_response.go new file mode 100644 index 000000000..89792e208 --- /dev/null +++ b/rest/chat/v1/model_list_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelResponse struct for ListChannelResponse +type ListChannelResponse struct { + Channels []ChatV1ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_credential_response.go b/rest/chat/v1/model_list_credential_response.go new file mode 100644 index 000000000..26215a663 --- /dev/null +++ b/rest/chat/v1/model_list_credential_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponse struct for ListCredentialResponse +type ListCredentialResponse struct { + Credentials []ChatV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_credential_response_meta.go b/rest/chat/v1/model_list_credential_response_meta.go new file mode 100644 index 000000000..eb79df196 --- /dev/null +++ b/rest/chat/v1/model_list_credential_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponseMeta struct for ListCredentialResponseMeta +type ListCredentialResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v1/model_list_invite_response.go b/rest/chat/v1/model_list_invite_response.go new file mode 100644 index 000000000..1bbce897c --- /dev/null +++ b/rest/chat/v1/model_list_invite_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInviteResponse struct for ListInviteResponse +type ListInviteResponse struct { + Invites []ChatV1ServiceChannelInvite `json:"Invites,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_member_response.go b/rest/chat/v1/model_list_member_response.go new file mode 100644 index 000000000..8a5467c13 --- /dev/null +++ b/rest/chat/v1/model_list_member_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMemberResponse struct for ListMemberResponse +type ListMemberResponse struct { + Members []ChatV1ServiceChannelMember `json:"Members,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_message_response.go b/rest/chat/v1/model_list_message_response.go new file mode 100644 index 000000000..9fe2e232b --- /dev/null +++ b/rest/chat/v1/model_list_message_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessageResponse struct for ListMessageResponse +type ListMessageResponse struct { + Messages []ChatV1ServiceChannelMessage `json:"Messages,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_role_response.go b/rest/chat/v1/model_list_role_response.go new file mode 100644 index 000000000..1358aea6e --- /dev/null +++ b/rest/chat/v1/model_list_role_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoleResponse struct for ListRoleResponse +type ListRoleResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV1ServiceRole `json:"Roles,omitempty"` +} diff --git a/rest/chat/v1/model_list_service_response.go b/rest/chat/v1/model_list_service_response.go new file mode 100644 index 000000000..d0a11f8a0 --- /dev/null +++ b/rest/chat/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV1Service `json:"Services,omitempty"` +} diff --git a/rest/chat/v1/model_list_user_channel_response.go b/rest/chat/v1/model_list_user_channel_response.go new file mode 100644 index 000000000..241f18e91 --- /dev/null +++ b/rest/chat/v1/model_list_user_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserChannelResponse struct for ListUserChannelResponse +type ListUserChannelResponse struct { + Channels []ChatV1ServiceUserUserChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v1/model_list_user_response.go b/rest/chat/v1/model_list_user_response.go new file mode 100644 index 000000000..6c63c84a9 --- /dev/null +++ b/rest/chat/v1/model_list_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserResponse struct for ListUserResponse +type ListUserResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV1ServiceUser `json:"Users,omitempty"` +} diff --git a/rest/chat/v1/model_update_channel_request.go b/rest/chat/v1/model_update_channel_request.go new file mode 100644 index 000000000..f2bb53617 --- /dev/null +++ b/rest/chat/v1/model_update_channel_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateChannelRequest struct for UpdateChannelRequest +type UpdateChannelRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/chat/v1/model_update_credential_request.go b/rest/chat/v1/model_update_credential_request.go new file mode 100644 index 000000000..543f00665 --- /dev/null +++ b/rest/chat/v1/model_update_credential_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialRequest struct for UpdateCredentialRequest +type UpdateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` +} diff --git a/rest/chat/v1/model_update_member_request.go b/rest/chat/v1/model_update_member_request.go new file mode 100644 index 000000000..3ba8b3af9 --- /dev/null +++ b/rest/chat/v1/model_update_member_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateMemberRequest struct for UpdateMemberRequest +type UpdateMemberRequest struct { + // The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels). + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services). + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v1/model_update_message_request.go b/rest/chat/v1/model_update_message_request.go new file mode 100644 index 000000000..89ceca7e9 --- /dev/null +++ b/rest/chat/v1/model_update_message_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateMessageRequest struct for UpdateMessageRequest +type UpdateMessageRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + Body string `json:"Body,omitempty"` +} diff --git a/rest/chat/v1/model_update_role_request.go b/rest/chat/v1/model_update_role_request.go new file mode 100644 index 000000000..cfa401c1f --- /dev/null +++ b/rest/chat/v1/model_update_role_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoleRequest struct for UpdateRoleRequest +type UpdateRoleRequest struct { + // A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation. + Permission []string `json:"Permission"` +} diff --git a/rest/chat/v1/model_update_service_request.go b/rest/chat/v1/model_update_service_request.go new file mode 100644 index 000000000..da9a4fcd8 --- /dev/null +++ b/rest/chat/v1/model_update_service_request.go @@ -0,0 +1,122 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + // The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + // The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + // The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details. + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. + LimitsChannelMembers int32 `json:"LimitsChannelMembers,omitempty"` + // The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. + LimitsUserChannels int32 `json:"LimitsUserChannels,omitempty"` + // Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`. + NotificationsAddedToChannelEnabled bool `json:"NotificationsAddedToChannelEnabled,omitempty"` + // The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + NotificationsAddedToChannelTemplate string `json:"NotificationsAddedToChannelTemplate,omitempty"` + // Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`. + NotificationsInvitedToChannelEnabled bool `json:"NotificationsInvitedToChannelEnabled,omitempty"` + // The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + NotificationsInvitedToChannelTemplate string `json:"NotificationsInvitedToChannelTemplate,omitempty"` + // Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`. + NotificationsNewMessageEnabled bool `json:"NotificationsNewMessageEnabled,omitempty"` + // The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + NotificationsNewMessageTemplate string `json:"NotificationsNewMessageTemplate,omitempty"` + // Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`. + NotificationsRemovedFromChannelEnabled bool `json:"NotificationsRemovedFromChannelEnabled,omitempty"` + // The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + NotificationsRemovedFromChannelTemplate string `json:"NotificationsRemovedFromChannelTemplate,omitempty"` + // The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + // The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details. + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + // Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + // Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + // How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + // The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + WebhookFilters []string `json:"WebhookFilters,omitempty"` + // The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + WebhookMethod string `json:"WebhookMethod,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_add.url`. + WebhooksOnChannelAddMethod string `json:"WebhooksOnChannelAddMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method. + WebhooksOnChannelAddUrl string `json:"WebhooksOnChannelAddUrl,omitempty"` + // The URL of the webhook to call in response to the `on_channel_added` event`. + WebhooksOnChannelAddedMethod string `json:"WebhooksOnChannelAddedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method. + WebhooksOnChannelAddedUrl string `json:"WebhooksOnChannelAddedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_destroy.url`. + WebhooksOnChannelDestroyMethod string `json:"WebhooksOnChannelDestroyMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method. + WebhooksOnChannelDestroyUrl string `json:"WebhooksOnChannelDestroyUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`. + WebhooksOnChannelDestroyedMethod string `json:"WebhooksOnChannelDestroyedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method. + WebhooksOnChannelDestroyedUrl string `json:"WebhooksOnChannelDestroyedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_update.url`. + WebhooksOnChannelUpdateMethod string `json:"WebhooksOnChannelUpdateMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method. + WebhooksOnChannelUpdateUrl string `json:"WebhooksOnChannelUpdateUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_updated.url`. + WebhooksOnChannelUpdatedMethod string `json:"WebhooksOnChannelUpdatedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. + WebhooksOnChannelUpdatedUrl string `json:"WebhooksOnChannelUpdatedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_member_add.url`. + WebhooksOnMemberAddMethod string `json:"WebhooksOnMemberAddMethod,omitempty"` + // The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method. + WebhooksOnMemberAddUrl string `json:"WebhooksOnMemberAddUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_channel_updated.url`. + WebhooksOnMemberAddedMethod string `json:"WebhooksOnMemberAddedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method. + WebhooksOnMemberAddedUrl string `json:"WebhooksOnMemberAddedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_member_remove.url`. + WebhooksOnMemberRemoveMethod string `json:"WebhooksOnMemberRemoveMethod,omitempty"` + // The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method. + WebhooksOnMemberRemoveUrl string `json:"WebhooksOnMemberRemoveUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_member_removed.url`. + WebhooksOnMemberRemovedMethod string `json:"WebhooksOnMemberRemovedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method. + WebhooksOnMemberRemovedUrl string `json:"WebhooksOnMemberRemovedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_message_remove.url`. + WebhooksOnMessageRemoveMethod string `json:"WebhooksOnMessageRemoveMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method. + WebhooksOnMessageRemoveUrl string `json:"WebhooksOnMessageRemoveUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_message_removed.url`. + WebhooksOnMessageRemovedMethod string `json:"WebhooksOnMessageRemovedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method. + WebhooksOnMessageRemovedUrl string `json:"WebhooksOnMessageRemovedUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_message_send.url`. + WebhooksOnMessageSendMethod string `json:"WebhooksOnMessageSendMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method. + WebhooksOnMessageSendUrl string `json:"WebhooksOnMessageSendUrl,omitempty"` + // The URL of the webhook to call in response to the `on_message_sent` event`. + WebhooksOnMessageSentMethod string `json:"WebhooksOnMessageSentMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method. + WebhooksOnMessageSentUrl string `json:"WebhooksOnMessageSentUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_message_update.url`. + WebhooksOnMessageUpdateMethod string `json:"WebhooksOnMessageUpdateMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method. + WebhooksOnMessageUpdateUrl string `json:"WebhooksOnMessageUpdateUrl,omitempty"` + // The HTTP method to use when calling the `webhooks.on_message_updated.url`. + WebhooksOnMessageUpdatedMethod string `json:"WebhooksOnMessageUpdatedMethod,omitempty"` + // The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method. + WebhooksOnMessageUpdatedUrl string `json:"WebhooksOnMessageUpdatedUrl,omitempty"` +} diff --git a/rest/chat/v1/model_update_user_request.go b/rest/chat/v1/model_update_user_request.go new file mode 100644 index 000000000..2ccdf7c69 --- /dev/null +++ b/rest/chat/v1/model_update_user_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateUserRequest struct for UpdateUserRequest +type UpdateUserRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the resource. It is often used for display purposes. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v1/response.go b/rest/chat/v1/response.go new file mode 100644 index 000000000..d2790903e --- /dev/null +++ b/rest/chat/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/chat/v2/.openapi-generator-ignore b/rest/chat/v2/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/chat/v2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/chat/v2/README.md b/rest/chat/v2/README.md new file mode 100644 index 000000000..04a0b666a --- /dev/null +++ b/rest/chat/v2/README.md @@ -0,0 +1,159 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateChannel**](docs/DefaultApi.md#createchannel) | **Post** /v2/Services/{ServiceSid}/Channels | +*DefaultApi* | [**CreateChannelWebhook**](docs/DefaultApi.md#createchannelwebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +*DefaultApi* | [**CreateCredential**](docs/DefaultApi.md#createcredential) | **Post** /v2/Credentials | +*DefaultApi* | [**CreateInvite**](docs/DefaultApi.md#createinvite) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**CreateMember**](docs/DefaultApi.md#createmember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**CreateMessage**](docs/DefaultApi.md#createmessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**CreateRole**](docs/DefaultApi.md#createrole) | **Post** /v2/Services/{ServiceSid}/Roles | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v2/Services | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /v2/Services/{ServiceSid}/Users | +*DefaultApi* | [**DeleteBinding**](docs/DefaultApi.md#deletebinding) | **Delete** /v2/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteChannel**](docs/DefaultApi.md#deletechannel) | **Delete** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**DeleteChannelWebhook**](docs/DefaultApi.md#deletechannelwebhook) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**DeleteCredential**](docs/DefaultApi.md#deletecredential) | **Delete** /v2/Credentials/{Sid} | +*DefaultApi* | [**DeleteInvite**](docs/DefaultApi.md#deleteinvite) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**DeleteMember**](docs/DefaultApi.md#deletemember) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**DeleteMessage**](docs/DefaultApi.md#deletemessage) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v2/Services/{Sid} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**DeleteUserBinding**](docs/DefaultApi.md#deleteuserbinding) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteUserChannel**](docs/DefaultApi.md#deleteuserchannel) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +*DefaultApi* | [**FetchBinding**](docs/DefaultApi.md#fetchbinding) | **Get** /v2/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchChannel**](docs/DefaultApi.md#fetchchannel) | **Get** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**FetchChannelWebhook**](docs/DefaultApi.md#fetchchannelwebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchCredential**](docs/DefaultApi.md#fetchcredential) | **Get** /v2/Credentials/{Sid} | +*DefaultApi* | [**FetchInvite**](docs/DefaultApi.md#fetchinvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**FetchMember**](docs/DefaultApi.md#fetchmember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**FetchMessage**](docs/DefaultApi.md#fetchmessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**FetchRole**](docs/DefaultApi.md#fetchrole) | **Get** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v2/Services/{Sid} | +*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **Get** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**FetchUserBinding**](docs/DefaultApi.md#fetchuserbinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchUserChannel**](docs/DefaultApi.md#fetchuserchannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +*DefaultApi* | [**ListBinding**](docs/DefaultApi.md#listbinding) | **Get** /v2/Services/{ServiceSid}/Bindings | +*DefaultApi* | [**ListChannel**](docs/DefaultApi.md#listchannel) | **Get** /v2/Services/{ServiceSid}/Channels | +*DefaultApi* | [**ListChannelWebhook**](docs/DefaultApi.md#listchannelwebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +*DefaultApi* | [**ListCredential**](docs/DefaultApi.md#listcredential) | **Get** /v2/Credentials | +*DefaultApi* | [**ListInvite**](docs/DefaultApi.md#listinvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**ListMember**](docs/DefaultApi.md#listmember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**ListMessage**](docs/DefaultApi.md#listmessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**ListRole**](docs/DefaultApi.md#listrole) | **Get** /v2/Services/{ServiceSid}/Roles | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v2/Services | +*DefaultApi* | [**ListUser**](docs/DefaultApi.md#listuser) | **Get** /v2/Services/{ServiceSid}/Users | +*DefaultApi* | [**ListUserBinding**](docs/DefaultApi.md#listuserbinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings | +*DefaultApi* | [**ListUserChannel**](docs/DefaultApi.md#listuserchannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels | +*DefaultApi* | [**UpdateChannel**](docs/DefaultApi.md#updatechannel) | **Post** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**UpdateChannelWebhook**](docs/DefaultApi.md#updatechannelwebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**UpdateCredential**](docs/DefaultApi.md#updatecredential) | **Post** /v2/Credentials/{Sid} | +*DefaultApi* | [**UpdateMember**](docs/DefaultApi.md#updatemember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**UpdateMessage**](docs/DefaultApi.md#updatemessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Post** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v2/Services/{Sid} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Post** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**UpdateUserChannel**](docs/DefaultApi.md#updateuserchannel) | **Post** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | + + +## Documentation For Models + + - [ChatV2Credential](docs/ChatV2Credential.md) + - [ChatV2Service](docs/ChatV2Service.md) + - [ChatV2ServiceBinding](docs/ChatV2ServiceBinding.md) + - [ChatV2ServiceChannel](docs/ChatV2ServiceChannel.md) + - [ChatV2ServiceChannelChannelWebhook](docs/ChatV2ServiceChannelChannelWebhook.md) + - [ChatV2ServiceChannelInvite](docs/ChatV2ServiceChannelInvite.md) + - [ChatV2ServiceChannelMember](docs/ChatV2ServiceChannelMember.md) + - [ChatV2ServiceChannelMessage](docs/ChatV2ServiceChannelMessage.md) + - [ChatV2ServiceRole](docs/ChatV2ServiceRole.md) + - [ChatV2ServiceUser](docs/ChatV2ServiceUser.md) + - [ChatV2ServiceUserUserBinding](docs/ChatV2ServiceUserUserBinding.md) + - [ChatV2ServiceUserUserChannel](docs/ChatV2ServiceUserUserChannel.md) + - [CreateChannelRequest](docs/CreateChannelRequest.md) + - [CreateChannelWebhookRequest](docs/CreateChannelWebhookRequest.md) + - [CreateCredentialRequest](docs/CreateCredentialRequest.md) + - [CreateInviteRequest](docs/CreateInviteRequest.md) + - [CreateMemberRequest](docs/CreateMemberRequest.md) + - [CreateMessageRequest](docs/CreateMessageRequest.md) + - [CreateRoleRequest](docs/CreateRoleRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateUserRequest](docs/CreateUserRequest.md) + - [ListBindingResponse](docs/ListBindingResponse.md) + - [ListChannelResponse](docs/ListChannelResponse.md) + - [ListChannelWebhookResponse](docs/ListChannelWebhookResponse.md) + - [ListCredentialResponse](docs/ListCredentialResponse.md) + - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) + - [ListInviteResponse](docs/ListInviteResponse.md) + - [ListMemberResponse](docs/ListMemberResponse.md) + - [ListMessageResponse](docs/ListMessageResponse.md) + - [ListRoleResponse](docs/ListRoleResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListUserBindingResponse](docs/ListUserBindingResponse.md) + - [ListUserChannelResponse](docs/ListUserChannelResponse.md) + - [ListUserResponse](docs/ListUserResponse.md) + - [UpdateChannelRequest](docs/UpdateChannelRequest.md) + - [UpdateChannelWebhookRequest](docs/UpdateChannelWebhookRequest.md) + - [UpdateCredentialRequest](docs/UpdateCredentialRequest.md) + - [UpdateMemberRequest](docs/UpdateMemberRequest.md) + - [UpdateMessageRequest](docs/UpdateMessageRequest.md) + - [UpdateRoleRequest](docs/UpdateRoleRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateUserChannelRequest](docs/UpdateUserChannelRequest.md) + - [UpdateUserRequest](docs/UpdateUserRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/chat/v2/api_default.go b/rest/chat/v2/api_default.go new file mode 100644 index 000000000..e0e974ab7 --- /dev/null +++ b/rest/chat/v2/api_default.go @@ -0,0 +1,2527 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://chat.twilio.com"), + } +} +// CreateChannelParams Optional parameters for the method 'CreateChannel' +type CreateChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateChannel Method for CreateChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under. + * @param optional nil or *CreateChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "CreatedBy" (string) - The `identity` of the User that created the channel. Default is: `system`. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Type" (string) - The visibility of the channel. Can be: `public` or `private` and defaults to `public`. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. +@return ChatV2ServiceChannel +*/ +func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*ChatV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' +type CreateChannelWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateChannelWebhook Method for CreateChannelWebhook + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateChannelWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). + * @param "ConfigurationFlowSid" (string) - The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. + * @param "ConfigurationMethod" (string) - The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. + * @param "ConfigurationRetryCount" (int32) - The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. + * @param "ConfigurationTriggers" ([]string) - A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. + * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. + * @param "Type" (string) - The type of webhook. Can be: `webhook`, `studio`, or `trigger`. +@return ChatV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialParams Optional parameters for the method 'CreateCredential' +type CreateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateCredential Method for CreateCredential + * @param optional nil or *CreateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. +@return ChatV2Credential +*/ +func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ChatV2Credential, error) { + path := "/v2/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateInviteParams Optional parameters for the method 'CreateInvite' +type CreateInviteParams struct { + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateInvite Method for CreateInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateInviteOpts - Optional Parameters: + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. +@return ChatV2ServiceChannelInvite +*/ +func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*ChatV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMemberParams Optional parameters for the method 'CreateMember' +type CreateMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateMember Method for CreateMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. + * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. + * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). +@return ChatV2ServiceChannelMember +*/ +func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*ChatV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessageParams Optional parameters for the method 'CreateMessage' +type CreateMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` +} + +/* +CreateMessage Method for CreateMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *CreateMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "Body" (string) - The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + * @param "From" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`. + * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. + * @param "MediaSid" (string) - The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. +@return ChatV2ServiceChannelMessage +*/ +func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*ChatV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRoleParams Optional parameters for the method 'CreateRole' +type CreateRoleParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateRole Method for CreateRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under. + * @param optional nil or *CreateRoleOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + * @param "Type" (string) - The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. +@return ChatV2ServiceRole +*/ +func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*ChatV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. +@return ChatV2Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ChatV2Service, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateUserParams Optional parameters for the method 'CreateUser' +type CreateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateUser Method for CreateUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under. + * @param optional nil or *CreateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. This value is often used for display purposes. + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. +@return ChatV2ServiceUser +*/ +func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*ChatV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteBinding Method for DeleteBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from. + * @param Sid The SID of the Binding resource to delete. +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteChannelParams Optional parameters for the method 'DeleteChannel' +type DeleteChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteChannel Method for DeleteChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. + * @param Sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete. + * @param optional nil or *DeleteChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteChannelWebhook Method for DeleteChannelWebhook + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Channel Webhook resource to delete. +*/ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredential Method for DeleteCredential + * @param Sid The SID of the Credential resource to delete. +*/ +func (c *DefaultApiService) DeleteCredential(Sid string) (error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteInvite Method for DeleteInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Invite resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Invite resource to delete. +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteMemberParams Optional parameters for the method 'DeleteMember' +type DeleteMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteMember Method for DeleteMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Member resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value. + * @param optional nil or *DeleteMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteMessageParams Optional parameters for the method 'DeleteMessage' +type DeleteMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteMessage Method for DeleteMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Message resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Message resource to delete. + * @param optional nil or *DeleteMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRole Method for DeleteRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Role resource from. + * @param Sid The SID of the Role resource to delete. +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid The SID of the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUser Method for DeleteUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from. + * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUserBinding Method for DeleteUserBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param Sid The SID of the User Binding resource to delete. +*/ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUserChannel Method for DeleteUserChannel +Removes User from selected Channel. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to. +*/ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchBinding Method for FetchBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Binding resource from. + * @param Sid The SID of the Binding resource to fetch. +@return ChatV2ServiceBinding +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*ChatV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchChannel Method for FetchChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Channel resource from. + * @param Sid The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch. +@return ChatV2ServiceChannel +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*ChatV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchChannelWebhook Method for FetchChannelWebhook + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to fetch the Webhook resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Channel Webhook resource to fetch. +@return ChatV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredential Method for FetchCredential + * @param Sid The SID of the Credential resource to fetch. +@return ChatV2Credential +*/ +func (c *DefaultApiService) FetchCredential(Sid string) (*ChatV2Credential, error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchInvite Method for FetchInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Invite resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Invite resource to fetch. +@return ChatV2ServiceChannelInvite +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMember Method for FetchMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Member resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value. +@return ChatV2ServiceChannelMember +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessage Method for FetchMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Message resource from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Message resource to fetch. +@return ChatV2ServiceChannelMessage +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*ChatV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRole Method for FetchRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Role resource from. + * @param Sid The SID of the Role resource to fetch. +@return ChatV2ServiceRole +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*ChatV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid The SID of the Service resource to fetch. +@return ChatV2Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*ChatV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUser Method for FetchUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from. + * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. +@return ChatV2ServiceUser +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*ChatV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUserBinding Method for FetchUserBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Binding resource from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource to fetch. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param Sid The SID of the User Binding resource to fetch. +@return ChatV2ServiceUserUserBinding +*/ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*ChatV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUserChannel Method for FetchUserChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Channel resource from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch. +@return ChatV2ServiceUserUserChannel +*/ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*ChatV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBindingParams Optional parameters for the method 'ListBinding' +type ListBindingParams struct { + BindingType *[]string `json:"BindingType,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBinding Method for ListBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Binding resources from. + * @param optional nil or *ListBindingOpts - Optional Parameters: + * @param "BindingType" ([]string) - The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBindingResponse +*/ +func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { + path := "/v2/Services/{ServiceSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelParams Optional parameters for the method 'ListChannel' +type ListChannelParams struct { + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannel Method for ListChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Channel resources from. + * @param optional nil or *ListChannelOpts - Optional Parameters: + * @param "Type" ([]string) - The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelResponse +*/ +func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' +type ListChannelWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannelWebhook Method for ListChannelWebhook + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to read the resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *ListChannelWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelWebhookResponse +*/ +func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialParams Optional parameters for the method 'ListCredential' +type ListCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredential Method for ListCredential + * @param optional nil or *ListCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialResponse +*/ +func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { + path := "/v2/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInviteParams Optional parameters for the method 'ListInvite' +type ListInviteParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInvite Method for ListInvite + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Invite resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *ListInviteOpts - Optional Parameters: + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInviteResponse +*/ +func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMemberParams Optional parameters for the method 'ListMember' +type ListMemberParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMember Method for ListMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Member resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *ListMemberOpts - Optional Parameters: + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMemberResponse +*/ +func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessageParams Optional parameters for the method 'ListMessage' +type ListMessageParams struct { + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessage Method for ListMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Message resources from. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to read belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *ListMessageOpts - Optional Parameters: + * @param "Order" (string) - The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessageResponse +*/ +func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoleParams Optional parameters for the method 'ListRole' +type ListRoleParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRole Method for ListRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Role resources from. + * @param optional nil or *ListRoleOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoleResponse +*/ +func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { + path := "/v2/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserParams Optional parameters for the method 'ListUser' +type ListUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUser Method for ListUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User resources from. + * @param optional nil or *ListUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserResponse +*/ +func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { + path := "/v2/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserBindingParams Optional parameters for the method 'ListUserBinding' +type ListUserBindingParams struct { + BindingType *[]string `json:"BindingType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUserBinding Method for ListUserBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Binding resources from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to read. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param optional nil or *ListUserBindingOpts - Optional Parameters: + * @param "BindingType" ([]string) - The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserBindingResponse +*/ +func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserChannelParams Optional parameters for the method 'ListUserChannel' +type ListUserChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUserChannel Method for ListUserChannel +List all Channels for a given User. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Channel resources from. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to read the User Channel resources from. This value can be either the `sid` or the `identity` of the User resource. + * @param optional nil or *ListUserChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserChannelResponse +*/ +func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChannelParams Optional parameters for the method 'UpdateChannel' +type UpdateChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateChannel Method for UpdateChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Channel resource in. + * @param Sid The SID of the Channel resource to update. This value can be either the `sid` or the `unique_name` of the Channel resource to update. + * @param optional nil or *UpdateChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "CreatedBy" (string) - The `identity` of the User that created the channel. Default is: `system`. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 256 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. +@return ChatV2ServiceChannel +*/ +func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' +type UpdateChannelWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` +} + +/* +UpdateChannelWebhook Method for UpdateChannelWebhook + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel that has the Webhook resource to update. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Channel Webhook resource to update. + * @param optional nil or *UpdateChannelWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). + * @param "ConfigurationFlowSid" (string) - The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. + * @param "ConfigurationMethod" (string) - The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. + * @param "ConfigurationRetryCount" (int32) - The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. + * @param "ConfigurationTriggers" ([]string) - A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. + * @param "ConfigurationUrl" (string) - The URL of the webhook to call using the `configuration.method`. +@return ChatV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*ChatV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialParams Optional parameters for the method 'UpdateCredential' +type UpdateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` +} + +/* +UpdateCredential Method for UpdateCredential + * @param Sid The SID of the Credential resource to update. + * @param optional nil or *UpdateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. +@return ChatV2Credential +*/ +func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ChatV2Credential, error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMemberParams Optional parameters for the method 'UpdateMember' +type UpdateMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateMember Method for UpdateMember + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Member resource in. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Member resource to update. This value can be either the Member's `sid` or its `identity` value. + * @param optional nil or *UpdateMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). + * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). +@return ChatV2ServiceChannelMember +*/ +func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*ChatV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMessageParams Optional parameters for the method 'UpdateMessage' +type UpdateMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` +} + +/* +UpdateMessage Method for UpdateMessage + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Message resource in. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. + * @param Sid The SID of the Message resource to update. + * @param optional nil or *UpdateMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "Body" (string) - The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + * @param "DateCreated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. + * @param "DateUpdated" (time.Time) - The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + * @param "From" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. + * @param "LastUpdatedBy" (string) - The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. +@return ChatV2ServiceChannelMessage +*/ +func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*ChatV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoleParams Optional parameters for the method 'UpdateRole' +type UpdateRoleParams struct { + Permission *[]string `json:"Permission,omitempty"` +} + +/* +UpdateRole Method for UpdateRole + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Role resource in. + * @param Sid The SID of the Role resource to update. + * @param optional nil or *UpdateRoleOpts - Optional Parameters: + * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. +@return ChatV2ServiceRole +*/ +func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*ChatV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid The SID of the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "ConsumptionReportInterval" (int32) - DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. + * @param "DefaultChannelCreatorRoleSid" (string) - The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + * @param "DefaultChannelRoleSid" (string) - The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + * @param "DefaultServiceRoleSid" (string) - The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. + * @param "LimitsChannelMembers" (int32) - The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. + * @param "LimitsUserChannels" (int32) - The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. + * @param "MediaCompatibilityMessage" (string) - The message to send when a media message has no text. Can be used as placeholder message. + * @param "NotificationsAddedToChannelEnabled" (bool) - Whether to send a notification when a member is added to a channel. The default is `false`. + * @param "NotificationsAddedToChannelSound" (string) - The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + * @param "NotificationsAddedToChannelTemplate" (string) - The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + * @param "NotificationsInvitedToChannelEnabled" (bool) - Whether to send a notification when a user is invited to a channel. The default is `false`. + * @param "NotificationsInvitedToChannelSound" (string) - The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + * @param "NotificationsInvitedToChannelTemplate" (string) - The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + * @param "NotificationsLogEnabled" (bool) - Whether to log notifications. The default is `false`. + * @param "NotificationsNewMessageBadgeCountEnabled" (bool) - Whether the new message badge is enabled. The default is `false`. + * @param "NotificationsNewMessageEnabled" (bool) - Whether to send a notification when a new message is added to a channel. The default is `false`. + * @param "NotificationsNewMessageSound" (string) - The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + * @param "NotificationsNewMessageTemplate" (string) - The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + * @param "NotificationsRemovedFromChannelEnabled" (bool) - Whether to send a notification to a user when they are removed from a channel. The default is `false`. + * @param "NotificationsRemovedFromChannelSound" (string) - The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + * @param "NotificationsRemovedFromChannelTemplate" (string) - The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + * @param "PostWebhookRetryCount" (int32) - The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried. + * @param "PostWebhookUrl" (string) - The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + * @param "PreWebhookRetryCount" (int32) - The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried. + * @param "PreWebhookUrl" (string) - The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + * @param "ReachabilityEnabled" (bool) - Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. + * @param "ReadStatusEnabled" (bool) - Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. + * @param "TypingIndicatorTimeout" (int32) - How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. + * @param "WebhookFilters" ([]string) - The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + * @param "WebhookMethod" (string) - The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. +@return ChatV2Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ChatV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) + } + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserParams Optional parameters for the method 'UpdateUser' +type UpdateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateUser Method for UpdateUser + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User resource in. + * @param Sid The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. + * @param optional nil or *UpdateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A valid JSON string that contains application-specific data. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is often used for display purposes. + * @param "RoleSid" (string) - The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. +@return ChatV2ServiceUser +*/ +func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*ChatV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' +type UpdateUserChannelParams struct { + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` +} + +/* +UpdateUserChannel Method for UpdateUserChannel + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User Channel resource in. + * @param UserSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to update the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. + * @param ChannelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) with the User Channel resource to update. This value can be the Channel resource's `sid` or `unique_name`. + * @param optional nil or *UpdateUserChannelOpts - Optional Parameters: + * @param "LastConsumedMessageIndex" (*int32) - The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. + * @param "LastConsumptionTimestamp" (time.Time) - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + * @param "NotificationLevel" (string) - The push notification level to assign to the User Channel. Can be: `default` or `muted`. +@return ChatV2ServiceUserUserChannel +*/ +func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*ChatV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ChatV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/chat/v2/docs/ChatV2Credential.md b/rest/chat/v2/docs/ChatV2Credential.md new file mode 100644 index 000000000..813087455 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2Credential.md @@ -0,0 +1,18 @@ +# ChatV2Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2Service.md b/rest/chat/v2/docs/ChatV2Service.md new file mode 100644 index 000000000..1b8cb15bc --- /dev/null +++ b/rest/chat/v2/docs/ChatV2Service.md @@ -0,0 +1,33 @@ +# ChatV2Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConsumptionReportInterval** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultChannelCreatorRoleSid** | **string** | | [optional] +**DefaultChannelRoleSid** | **string** | | [optional] +**DefaultServiceRoleSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Limits** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Media** | [**map[string]interface{}**](.md) | | [optional] +**Notifications** | [**map[string]interface{}**](.md) | | [optional] +**PostWebhookRetryCount** | **int32** | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookRetryCount** | **int32** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**ReadStatusEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**TypingIndicatorTimeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WebhookFilters** | **[]string** | | [optional] +**WebhookMethod** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceBinding.md b/rest/chat/v2/docs/ChatV2ServiceBinding.md new file mode 100644 index 000000000..d32fb7618 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceBinding.md @@ -0,0 +1,22 @@ +# ChatV2ServiceBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MessageTypes** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceChannel.md b/rest/chat/v2/docs/ChatV2ServiceChannel.md new file mode 100644 index 000000000..78c36a6d9 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceChannel.md @@ -0,0 +1,24 @@ +# ChatV2ServiceChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MembersCount** | **int32** | | [optional] +**MessagesCount** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md b/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md new file mode 100644 index 000000000..c1763bf6f --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceChannelChannelWebhook.md @@ -0,0 +1,19 @@ +# ChatV2ServiceChannelChannelWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md b/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md new file mode 100644 index 000000000..862787912 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceChannelInvite.md @@ -0,0 +1,20 @@ +# ChatV2ServiceChannelInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceChannelMember.md b/rest/chat/v2/docs/ChatV2ServiceChannelMember.md new file mode 100644 index 000000000..d0a4220bd --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceChannelMember.md @@ -0,0 +1,22 @@ +# ChatV2ServiceChannelMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md b/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md new file mode 100644 index 000000000..379201d65 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceChannelMessage.md @@ -0,0 +1,26 @@ +# ChatV2ServiceChannelMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**Index** | **int32** | | [optional] +**LastUpdatedBy** | **string** | | [optional] +**Media** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**To** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] +**WasEdited** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceRole.md b/rest/chat/v2/docs/ChatV2ServiceRole.md new file mode 100644 index 000000000..a1c284259 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceRole.md @@ -0,0 +1,19 @@ +# ChatV2ServiceRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceUser.md b/rest/chat/v2/docs/ChatV2ServiceUser.md new file mode 100644 index 000000000..b67e81a72 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceUser.md @@ -0,0 +1,24 @@ +# ChatV2ServiceUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**JoinedChannelsCount** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md b/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md new file mode 100644 index 000000000..7f60f6612 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceUserUserBinding.md @@ -0,0 +1,22 @@ +# ChatV2ServiceUserUserBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**MessageTypes** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**UserSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md b/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md new file mode 100644 index 000000000..029746239 --- /dev/null +++ b/rest/chat/v2/docs/ChatV2ServiceUserUserChannel.md @@ -0,0 +1,21 @@ +# ChatV2ServiceUserUserChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MemberSid** | **string** | | [optional] +**NotificationLevel** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UnreadMessagesCount** | Pointer to **int32** | | [optional] +**Url** | **string** | | [optional] +**UserSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateChannelRequest.md b/rest/chat/v2/docs/CreateChannelRequest.md new file mode 100644 index 000000000..b5c849560 --- /dev/null +++ b/rest/chat/v2/docs/CreateChannelRequest.md @@ -0,0 +1,17 @@ +# CreateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**CreatedBy** | **string** | The `identity` of the User that created the channel. Default is: `system`. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**Type** | **string** | The visibility of the channel. Can be: `public` or `private` and defaults to `public`. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateChannelWebhookRequest.md b/rest/chat/v2/docs/CreateChannelWebhookRequest.md new file mode 100644 index 000000000..a29394a0f --- /dev/null +++ b/rest/chat/v2/docs/CreateChannelWebhookRequest.md @@ -0,0 +1,17 @@ +# CreateChannelWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). | [optional] +**ConfigurationFlowSid** | **string** | The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. | [optional] +**ConfigurationMethod** | **string** | The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**ConfigurationRetryCount** | **int32** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. | [optional] +**ConfigurationTriggers** | **[]string** | A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. | [optional] +**ConfigurationUrl** | **string** | The URL of the webhook to call using the `configuration.method`. | [optional] +**Type** | **string** | The type of webhook. Can be: `webhook`, `studio`, or `trigger`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateCredentialRequest.md b/rest/chat/v2/docs/CreateCredentialRequest.md new file mode 100644 index 000000000..a8d00dd96 --- /dev/null +++ b/rest/chat/v2/docs/CreateCredentialRequest.md @@ -0,0 +1,17 @@ +# CreateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] +**Type** | **string** | The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateInviteRequest.md b/rest/chat/v2/docs/CreateInviteRequest.md new file mode 100644 index 000000000..095a45a16 --- /dev/null +++ b/rest/chat/v2/docs/CreateInviteRequest.md @@ -0,0 +1,12 @@ +# CreateInviteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. | +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateMemberRequest.md b/rest/chat/v2/docs/CreateMemberRequest.md new file mode 100644 index 000000000..d6a0d986a --- /dev/null +++ b/rest/chat/v2/docs/CreateMemberRequest.md @@ -0,0 +1,17 @@ +# CreateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. | [optional] +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. | +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | [optional] +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateMessageRequest.md b/rest/chat/v2/docs/CreateMessageRequest.md new file mode 100644 index 000000000..5ad6d02f2 --- /dev/null +++ b/rest/chat/v2/docs/CreateMessageRequest.md @@ -0,0 +1,17 @@ +# CreateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**Body** | **string** | The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | [optional] +**From** | **string** | The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`. | [optional] +**LastUpdatedBy** | **string** | The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. | [optional] +**MediaSid** | **string** | The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateRoleRequest.md b/rest/chat/v2/docs/CreateRoleRequest.md new file mode 100644 index 000000000..aae8155a1 --- /dev/null +++ b/rest/chat/v2/docs/CreateRoleRequest.md @@ -0,0 +1,13 @@ +# CreateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | +**Permission** | **[]string** | A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | +**Type** | **string** | The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateServiceRequest.md b/rest/chat/v2/docs/CreateServiceRequest.md new file mode 100644 index 000000000..f65684f21 --- /dev/null +++ b/rest/chat/v2/docs/CreateServiceRequest.md @@ -0,0 +1,11 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/CreateUserRequest.md b/rest/chat/v2/docs/CreateUserRequest.md new file mode 100644 index 000000000..57641d90b --- /dev/null +++ b/rest/chat/v2/docs/CreateUserRequest.md @@ -0,0 +1,14 @@ +# CreateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. This value is often used for display purposes. | [optional] +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. | +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/DefaultApi.md b/rest/chat/v2/docs/DefaultApi.md new file mode 100644 index 000000000..0d2e0aa38 --- /dev/null +++ b/rest/chat/v2/docs/DefaultApi.md @@ -0,0 +1,2338 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateChannel**](DefaultApi.md#CreateChannel) | **Post** /v2/Services/{ServiceSid}/Channels | +[**CreateChannelWebhook**](DefaultApi.md#CreateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +[**CreateCredential**](DefaultApi.md#CreateCredential) | **Post** /v2/Credentials | +[**CreateInvite**](DefaultApi.md#CreateInvite) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**CreateMember**](DefaultApi.md#CreateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**CreateMessage**](DefaultApi.md#CreateMessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**CreateRole**](DefaultApi.md#CreateRole) | **Post** /v2/Services/{ServiceSid}/Roles | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v2/Services | +[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /v2/Services/{ServiceSid}/Users | +[**DeleteBinding**](DefaultApi.md#DeleteBinding) | **Delete** /v2/Services/{ServiceSid}/Bindings/{Sid} | +[**DeleteChannel**](DefaultApi.md#DeleteChannel) | **Delete** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**DeleteChannelWebhook**](DefaultApi.md#DeleteChannelWebhook) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**DeleteCredential**](DefaultApi.md#DeleteCredential) | **Delete** /v2/Credentials/{Sid} | +[**DeleteInvite**](DefaultApi.md#DeleteInvite) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**DeleteMember**](DefaultApi.md#DeleteMember) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**DeleteMessage**](DefaultApi.md#DeleteMessage) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v2/Services/{Sid} | +[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /v2/Services/{ServiceSid}/Users/{Sid} | +[**DeleteUserBinding**](DefaultApi.md#DeleteUserBinding) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +[**DeleteUserChannel**](DefaultApi.md#DeleteUserChannel) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +[**FetchBinding**](DefaultApi.md#FetchBinding) | **Get** /v2/Services/{ServiceSid}/Bindings/{Sid} | +[**FetchChannel**](DefaultApi.md#FetchChannel) | **Get** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**FetchChannelWebhook**](DefaultApi.md#FetchChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**FetchCredential**](DefaultApi.md#FetchCredential) | **Get** /v2/Credentials/{Sid} | +[**FetchInvite**](DefaultApi.md#FetchInvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**FetchMember**](DefaultApi.md#FetchMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**FetchMessage**](DefaultApi.md#FetchMessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**FetchRole**](DefaultApi.md#FetchRole) | **Get** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v2/Services/{Sid} | +[**FetchUser**](DefaultApi.md#FetchUser) | **Get** /v2/Services/{ServiceSid}/Users/{Sid} | +[**FetchUserBinding**](DefaultApi.md#FetchUserBinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +[**FetchUserChannel**](DefaultApi.md#FetchUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +[**ListBinding**](DefaultApi.md#ListBinding) | **Get** /v2/Services/{ServiceSid}/Bindings | +[**ListChannel**](DefaultApi.md#ListChannel) | **Get** /v2/Services/{ServiceSid}/Channels | +[**ListChannelWebhook**](DefaultApi.md#ListChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +[**ListCredential**](DefaultApi.md#ListCredential) | **Get** /v2/Credentials | +[**ListInvite**](DefaultApi.md#ListInvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**ListMember**](DefaultApi.md#ListMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**ListMessage**](DefaultApi.md#ListMessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**ListRole**](DefaultApi.md#ListRole) | **Get** /v2/Services/{ServiceSid}/Roles | +[**ListService**](DefaultApi.md#ListService) | **Get** /v2/Services | +[**ListUser**](DefaultApi.md#ListUser) | **Get** /v2/Services/{ServiceSid}/Users | +[**ListUserBinding**](DefaultApi.md#ListUserBinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings | +[**ListUserChannel**](DefaultApi.md#ListUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels | +[**UpdateChannel**](DefaultApi.md#UpdateChannel) | **Post** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**UpdateChannelWebhook**](DefaultApi.md#UpdateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**UpdateCredential**](DefaultApi.md#UpdateCredential) | **Post** /v2/Credentials/{Sid} | +[**UpdateMember**](DefaultApi.md#UpdateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**UpdateMessage**](DefaultApi.md#UpdateMessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**UpdateRole**](DefaultApi.md#UpdateRole) | **Post** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v2/Services/{Sid} | +[**UpdateUser**](DefaultApi.md#UpdateUser) | **Post** /v2/Services/{ServiceSid}/Users/{Sid} | +[**UpdateUserChannel**](DefaultApi.md#UpdateUserChannel) | **Post** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | + + + +## CreateChannel + +> ChatV2ServiceChannel CreateChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under. | + **optional** | ***CreateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **CreatedBy** | **optional.String**| The `identity` of the User that created the channel. Default is: `system`. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Type** | **optional.String**| The visibility of the channel. Can be: `public` or `private` and defaults to `public`. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. | + +### Return type + +[**ChatV2ServiceChannel**](chat.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateChannelWebhook + +> ChatV2ServiceChannelChannelWebhook CreateChannelWebhook(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). | + **ConfigurationFlowSid** | **optional.String**| The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. | + **ConfigurationMethod** | **optional.String**| The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. | + **ConfigurationRetryCount** | **optional.Int32**| The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. | + **ConfigurationUrl** | **optional.String**| The URL of the webhook to call using the `configuration.method`. | + **Type** | **optional.String**| The type of webhook. Can be: `webhook`, `studio`, or `trigger`. | + +### Return type + +[**ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredential + +> ChatV2Credential CreateCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + **Type** | **optional.String**| The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. | + +### Return type + +[**ChatV2Credential**](chat.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateInvite + +> ChatV2ServiceChannelInvite CreateInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. | + +### Return type + +[**ChatV2ServiceChannelInvite**](chat.v2.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMember + +> ChatV2ServiceChannelMember CreateMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. | + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. | + **LastConsumedMessageIndex** | **optional.Int32**| The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. | + **LastConsumptionTimestamp** | **optional.Time**| The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). | + +### Return type + +[**ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessage + +> ChatV2ServiceChannelMessage CreateMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***CreateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **Body** | **optional.String**| The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | + **From** | **optional.String**| The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`. | + **LastUpdatedBy** | **optional.String**| The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. | + **MediaSid** | **optional.String**| The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. | + +### Return type + +[**ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRole + +> ChatV2ServiceRole CreateRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under. | + **optional** | ***CreateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | + **Type** | **optional.String**| The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. | + +### Return type + +[**ChatV2ServiceRole**](chat.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> ChatV2Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. | + +### Return type + +[**ChatV2Service**](chat.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> ChatV2ServiceUser CreateUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under. | + **optional** | ***CreateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. This value is often used for display purposes. | + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. | + +### Return type + +[**ChatV2ServiceUser**](chat.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBinding + +> DeleteBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from. | +**Sid** | **string**| The SID of the Binding resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannel + +> DeleteChannel(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. | +**Sid** | **string**| The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete. | + **optional** | ***DeleteChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannelWebhook + +> DeleteChannelWebhook(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Channel Webhook resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Credential resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInvite + +> DeleteInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Invite resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Invite resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMember + +> DeleteMember(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Member resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value. | + **optional** | ***DeleteMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessage + +> DeleteMessage(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Message resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Message resource to delete. | + **optional** | ***DeleteMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Role resource from. | +**Sid** | **string**| The SID of the Role resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from. | +**Sid** | **string**| The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUserBinding + +> DeleteUserBinding(ctx, ServiceSid, UserSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | +**Sid** | **string**| The SID of the User Binding resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUserChannel + +> DeleteUserChannel(ctx, ServiceSid, UserSid, ChannelSid) + + + +Removes User from selected Channel. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBinding + +> ChatV2ServiceBinding FetchBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Binding resource from. | +**Sid** | **string**| The SID of the Binding resource to fetch. | + +### Return type + +[**ChatV2ServiceBinding**](chat.v2.service.binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannel + +> ChatV2ServiceChannel FetchChannel(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Channel resource from. | +**Sid** | **string**| The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch. | + +### Return type + +[**ChatV2ServiceChannel**](chat.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannelWebhook + +> ChatV2ServiceChannelChannelWebhook FetchChannelWebhook(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to fetch the Webhook resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Channel Webhook resource to fetch. | + +### Return type + +[**ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredential + +> ChatV2Credential FetchCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Credential resource to fetch. | + +### Return type + +[**ChatV2Credential**](chat.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInvite + +> ChatV2ServiceChannelInvite FetchInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Invite resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Invite resource to fetch. | + +### Return type + +[**ChatV2ServiceChannelInvite**](chat.v2.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMember + +> ChatV2ServiceChannelMember FetchMember(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Member resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value. | + +### Return type + +[**ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessage + +> ChatV2ServiceChannelMessage FetchMessage(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Message resource from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Message resource to fetch. | + +### Return type + +[**ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRole + +> ChatV2ServiceRole FetchRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Role resource from. | +**Sid** | **string**| The SID of the Role resource to fetch. | + +### Return type + +[**ChatV2ServiceRole**](chat.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> ChatV2Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to fetch. | + +### Return type + +[**ChatV2Service**](chat.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUser + +> ChatV2ServiceUser FetchUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from. | +**Sid** | **string**| The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. | + +### Return type + +[**ChatV2ServiceUser**](chat.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUserBinding + +> ChatV2ServiceUserUserBinding FetchUserBinding(ctx, ServiceSid, UserSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Binding resource from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource to fetch. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | +**Sid** | **string**| The SID of the User Binding resource to fetch. | + +### Return type + +[**ChatV2ServiceUserUserBinding**](chat.v2.service.user.user_binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUserChannel + +> ChatV2ServiceUserUserChannel FetchUserChannel(ctx, ServiceSid, UserSid, ChannelSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Channel resource from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch. | + +### Return type + +[**ChatV2ServiceUserUserChannel**](chat.v2.service.user.user_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBinding + +> ListBindingResponse ListBinding(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Binding resources from. | + **optional** | ***ListBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **BindingType** | [**optional.Interface of []string**](string.md)| The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBindingResponse**](ListBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannel + +> ListChannelResponse ListChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Channel resources from. | + **optional** | ***ListChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Type** | [**optional.Interface of []string**](string.md)| The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelResponse**](ListChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannelWebhook + +> ListChannelWebhookResponse ListChannelWebhook(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to read the resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***ListChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelWebhookResponse**](ListChannelWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredential + +> ListCredentialResponse ListCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInvite + +> ListInviteResponse ListInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Invite resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***ListInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInviteResponse**](ListInviteResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMember + +> ListMemberResponse ListMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Member resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***ListMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMemberResponse**](ListMemberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessage + +> ListMessageResponse ListMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Message resources from. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to read belongs to. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***ListMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessageResponse**](ListMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRole + +> ListRoleResponse ListRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Role resources from. | + **optional** | ***ListRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoleResponse**](ListRoleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUser + +> ListUserResponse ListUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User resources from. | + **optional** | ***ListUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserResponse**](ListUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUserBinding + +> ListUserBindingResponse ListUserBinding(ctx, ServiceSid, UserSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Binding resources from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to read. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | + **optional** | ***ListUserBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **BindingType** | [**optional.Interface of []string**](string.md)| The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserBindingResponse**](ListUserBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUserChannel + +> ListUserChannelResponse ListUserChannel(ctx, ServiceSid, UserSid, optional) + + + +List all Channels for a given User. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Channel resources from. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to read the User Channel resources from. This value can be either the `sid` or the `identity` of the User resource. | + **optional** | ***ListUserChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserChannelResponse**](ListUserChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChannel + +> ChatV2ServiceChannel UpdateChannel(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Channel resource in. | +**Sid** | **string**| The SID of the Channel resource to update. This value can be either the `sid` or the `unique_name` of the Channel resource to update. | + **optional** | ***UpdateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **CreatedBy** | **optional.String**| The `identity` of the User that created the channel. Default is: `system`. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 256 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. | + +### Return type + +[**ChatV2ServiceChannel**](chat.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChannelWebhook + +> ChatV2ServiceChannelChannelWebhook UpdateChannelWebhook(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel that has the Webhook resource to update. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Channel Webhook resource to update. | + **optional** | ***UpdateChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). | + **ConfigurationFlowSid** | **optional.String**| The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. | + **ConfigurationMethod** | **optional.String**| The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. | + **ConfigurationRetryCount** | **optional.Int32**| The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. | + **ConfigurationUrl** | **optional.String**| The URL of the webhook to call using the `configuration.method`. | + +### Return type + +[**ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredential + +> ChatV2Credential UpdateCredential(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Credential resource to update. | + **optional** | ***UpdateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + +### Return type + +[**ChatV2Credential**](chat.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMember + +> ChatV2ServiceChannelMember UpdateMember(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Member resource in. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Member resource to update. This value can be either the Member's `sid` or its `identity` value. | + **optional** | ***UpdateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | + **LastConsumedMessageIndex** | **optional.Int32**| The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). | + **LastConsumptionTimestamp** | **optional.Time**| The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). | + +### Return type + +[**ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessage + +> ChatV2ServiceChannelMessage UpdateMessage(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Message resource in. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`. | +**Sid** | **string**| The SID of the Message resource to update. | + **optional** | ***UpdateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **Body** | **optional.String**| The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | + **DateCreated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. | + **DateUpdated** | **optional.Time**| The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | + **From** | **optional.String**| The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. | + **LastUpdatedBy** | **optional.String**| The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. | + +### Return type + +[**ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> ChatV2ServiceRole UpdateRole(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Role resource in. | +**Sid** | **string**| The SID of the Role resource to update. | + **optional** | ***UpdateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +### Return type + +[**ChatV2ServiceRole**](chat.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ChatV2Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ConsumptionReportInterval** | **optional.Int32**| DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. | + **DefaultChannelCreatorRoleSid** | **optional.String**| The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | + **DefaultChannelRoleSid** | **optional.String**| The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | + **DefaultServiceRoleSid** | **optional.String**| The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. | + **LimitsChannelMembers** | **optional.Int32**| The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. | + **LimitsUserChannels** | **optional.Int32**| The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. | + **MediaCompatibilityMessage** | **optional.String**| The message to send when a media message has no text. Can be used as placeholder message. | + **NotificationsAddedToChannelEnabled** | **optional.Bool**| Whether to send a notification when a member is added to a channel. The default is `false`. | + **NotificationsAddedToChannelSound** | **optional.String**| The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | + **NotificationsAddedToChannelTemplate** | **optional.String**| The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | + **NotificationsInvitedToChannelEnabled** | **optional.Bool**| Whether to send a notification when a user is invited to a channel. The default is `false`. | + **NotificationsInvitedToChannelSound** | **optional.String**| The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | + **NotificationsInvitedToChannelTemplate** | **optional.String**| The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | + **NotificationsLogEnabled** | **optional.Bool**| Whether to log notifications. The default is `false`. | + **NotificationsNewMessageBadgeCountEnabled** | **optional.Bool**| Whether the new message badge is enabled. The default is `false`. | + **NotificationsNewMessageEnabled** | **optional.Bool**| Whether to send a notification when a new message is added to a channel. The default is `false`. | + **NotificationsNewMessageSound** | **optional.String**| The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | + **NotificationsNewMessageTemplate** | **optional.String**| The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | + **NotificationsRemovedFromChannelEnabled** | **optional.Bool**| Whether to send a notification to a user when they are removed from a channel. The default is `false`. | + **NotificationsRemovedFromChannelSound** | **optional.String**| The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | + **NotificationsRemovedFromChannelTemplate** | **optional.String**| The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | + **PostWebhookRetryCount** | **optional.Int32**| The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried. | + **PostWebhookUrl** | **optional.String**| The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + **PreWebhookRetryCount** | **optional.Int32**| The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried. | + **PreWebhookUrl** | **optional.String**| The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + **ReachabilityEnabled** | **optional.Bool**| Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. | + **ReadStatusEnabled** | **optional.Bool**| Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. | + **TypingIndicatorTimeout** | **optional.Int32**| How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. | + **WebhookFilters** | [**optional.Interface of []string**](string.md)| The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + **WebhookMethod** | **optional.String**| The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | + +### Return type + +[**ChatV2Service**](chat.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> ChatV2ServiceUser UpdateUser(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User resource in. | +**Sid** | **string**| The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. | + **optional** | ***UpdateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A valid JSON string that contains application-specific data. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is often used for display purposes. | + **RoleSid** | **optional.String**| The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. | + +### Return type + +[**ChatV2ServiceUser**](chat.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUserChannel + +> ChatV2ServiceUserUserChannel UpdateUserChannel(ctx, ServiceSid, UserSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User Channel resource in. | +**UserSid** | **string**| The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to update the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource. | +**ChannelSid** | **string**| The SID of the [Channel](https://www.twilio.com/docs/chat/channels) with the User Channel resource to update. This value can be the Channel resource's `sid` or `unique_name`. | + **optional** | ***UpdateUserChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **LastConsumedMessageIndex** | **optional.Int32**| The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. | + **LastConsumptionTimestamp** | **optional.Time**| The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | + **NotificationLevel** | **optional.String**| The push notification level to assign to the User Channel. Can be: `default` or `muted`. | + +### Return type + +[**ChatV2ServiceUserUserChannel**](chat.v2.service.user.user_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/chat/v2/docs/ListBindingResponse.md b/rest/chat/v2/docs/ListBindingResponse.md new file mode 100644 index 000000000..5527d97c3 --- /dev/null +++ b/rest/chat/v2/docs/ListBindingResponse.md @@ -0,0 +1,12 @@ +# ListBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ChatV2ServiceBinding**](chat.v2.service.binding.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListChannelResponse.md b/rest/chat/v2/docs/ListChannelResponse.md new file mode 100644 index 000000000..561c2e9ca --- /dev/null +++ b/rest/chat/v2/docs/ListChannelResponse.md @@ -0,0 +1,12 @@ +# ListChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV2ServiceChannel**](chat.v2.service.channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListChannelWebhookResponse.md b/rest/chat/v2/docs/ListChannelWebhookResponse.md new file mode 100644 index 000000000..98f0fc2cd --- /dev/null +++ b/rest/chat/v2/docs/ListChannelWebhookResponse.md @@ -0,0 +1,12 @@ +# ListChannelWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Webhooks** | [**[]ChatV2ServiceChannelChannelWebhook**](chat.v2.service.channel.channel_webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListCredentialResponse.md b/rest/chat/v2/docs/ListCredentialResponse.md new file mode 100644 index 000000000..c871187f8 --- /dev/null +++ b/rest/chat/v2/docs/ListCredentialResponse.md @@ -0,0 +1,12 @@ +# ListCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ChatV2Credential**](chat.v2.credential.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListCredentialResponseMeta.md b/rest/chat/v2/docs/ListCredentialResponseMeta.md new file mode 100644 index 000000000..20d8e9381 --- /dev/null +++ b/rest/chat/v2/docs/ListCredentialResponseMeta.md @@ -0,0 +1,17 @@ +# ListCredentialResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListInviteResponse.md b/rest/chat/v2/docs/ListInviteResponse.md new file mode 100644 index 000000000..365e9cc4a --- /dev/null +++ b/rest/chat/v2/docs/ListInviteResponse.md @@ -0,0 +1,12 @@ +# ListInviteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]ChatV2ServiceChannelInvite**](chat.v2.service.channel.invite.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListMemberResponse.md b/rest/chat/v2/docs/ListMemberResponse.md new file mode 100644 index 000000000..11af97014 --- /dev/null +++ b/rest/chat/v2/docs/ListMemberResponse.md @@ -0,0 +1,12 @@ +# ListMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]ChatV2ServiceChannelMember**](chat.v2.service.channel.member.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListMessageResponse.md b/rest/chat/v2/docs/ListMessageResponse.md new file mode 100644 index 000000000..251929e5c --- /dev/null +++ b/rest/chat/v2/docs/ListMessageResponse.md @@ -0,0 +1,12 @@ +# ListMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ChatV2ServiceChannelMessage**](chat.v2.service.channel.message.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListRoleResponse.md b/rest/chat/v2/docs/ListRoleResponse.md new file mode 100644 index 000000000..55cb45744 --- /dev/null +++ b/rest/chat/v2/docs/ListRoleResponse.md @@ -0,0 +1,12 @@ +# ListRoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Roles** | [**[]ChatV2ServiceRole**](chat.v2.service.role.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListServiceResponse.md b/rest/chat/v2/docs/ListServiceResponse.md new file mode 100644 index 000000000..aad4b0eb3 --- /dev/null +++ b/rest/chat/v2/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Services** | [**[]ChatV2Service**](chat.v2.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListUserBindingResponse.md b/rest/chat/v2/docs/ListUserBindingResponse.md new file mode 100644 index 000000000..e1f200a37 --- /dev/null +++ b/rest/chat/v2/docs/ListUserBindingResponse.md @@ -0,0 +1,12 @@ +# ListUserBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ChatV2ServiceUserUserBinding**](chat.v2.service.user.user_binding.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListUserChannelResponse.md b/rest/chat/v2/docs/ListUserChannelResponse.md new file mode 100644 index 000000000..2e3b53536 --- /dev/null +++ b/rest/chat/v2/docs/ListUserChannelResponse.md @@ -0,0 +1,12 @@ +# ListUserChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]ChatV2ServiceUserUserChannel**](chat.v2.service.user.user_channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/ListUserResponse.md b/rest/chat/v2/docs/ListUserResponse.md new file mode 100644 index 000000000..f2a07885a --- /dev/null +++ b/rest/chat/v2/docs/ListUserResponse.md @@ -0,0 +1,12 @@ +# ListUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Users** | [**[]ChatV2ServiceUser**](chat.v2.service.user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateChannelRequest.md b/rest/chat/v2/docs/UpdateChannelRequest.md new file mode 100644 index 000000000..24ab633e8 --- /dev/null +++ b/rest/chat/v2/docs/UpdateChannelRequest.md @@ -0,0 +1,16 @@ +# UpdateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**CreatedBy** | **string** | The `identity` of the User that created the channel. Default is: `system`. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 256 characters long. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateChannelWebhookRequest.md b/rest/chat/v2/docs/UpdateChannelWebhookRequest.md new file mode 100644 index 000000000..a70fc987f --- /dev/null +++ b/rest/chat/v2/docs/UpdateChannelWebhookRequest.md @@ -0,0 +1,16 @@ +# UpdateChannelWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). | [optional] +**ConfigurationFlowSid** | **string** | The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. | [optional] +**ConfigurationMethod** | **string** | The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. | [optional] +**ConfigurationRetryCount** | **int32** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. | [optional] +**ConfigurationTriggers** | **[]string** | A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. | [optional] +**ConfigurationUrl** | **string** | The URL of the webhook to call using the `configuration.method`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateCredentialRequest.md b/rest/chat/v2/docs/UpdateCredentialRequest.md new file mode 100644 index 000000000..10b2dc102 --- /dev/null +++ b/rest/chat/v2/docs/UpdateCredentialRequest.md @@ -0,0 +1,16 @@ +# UpdateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateMemberRequest.md b/rest/chat/v2/docs/UpdateMemberRequest.md new file mode 100644 index 000000000..bc1839faa --- /dev/null +++ b/rest/chat/v2/docs/UpdateMemberRequest.md @@ -0,0 +1,16 @@ +# UpdateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | [optional] +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateMessageRequest.md b/rest/chat/v2/docs/UpdateMessageRequest.md new file mode 100644 index 000000000..7e6485918 --- /dev/null +++ b/rest/chat/v2/docs/UpdateMessageRequest.md @@ -0,0 +1,16 @@ +# UpdateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**Body** | **string** | The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. | [optional] +**From** | **string** | The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. | [optional] +**LastUpdatedBy** | **string** | The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateRoleRequest.md b/rest/chat/v2/docs/UpdateRoleRequest.md new file mode 100644 index 000000000..6482ab20c --- /dev/null +++ b/rest/chat/v2/docs/UpdateRoleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Permission** | **[]string** | A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateServiceRequest.md b/rest/chat/v2/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..9886b12ce --- /dev/null +++ b/rest/chat/v2/docs/UpdateServiceRequest.md @@ -0,0 +1,41 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConsumptionReportInterval** | **int32** | DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. | [optional] +**DefaultChannelCreatorRoleSid** | **string** | The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | [optional] +**DefaultChannelRoleSid** | **string** | The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | [optional] +**DefaultServiceRoleSid** | **string** | The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. | [optional] +**LimitsChannelMembers** | **int32** | The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. | [optional] +**LimitsUserChannels** | **int32** | The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. | [optional] +**MediaCompatibilityMessage** | **string** | The message to send when a media message has no text. Can be used as placeholder message. | [optional] +**NotificationsAddedToChannelEnabled** | **bool** | Whether to send a notification when a member is added to a channel. The default is `false`. | [optional] +**NotificationsAddedToChannelSound** | **string** | The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | [optional] +**NotificationsAddedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. | [optional] +**NotificationsInvitedToChannelEnabled** | **bool** | Whether to send a notification when a user is invited to a channel. The default is `false`. | [optional] +**NotificationsInvitedToChannelSound** | **string** | The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | [optional] +**NotificationsInvitedToChannelTemplate** | **string** | The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. | [optional] +**NotificationsLogEnabled** | **bool** | Whether to log notifications. The default is `false`. | [optional] +**NotificationsNewMessageBadgeCountEnabled** | **bool** | Whether the new message badge is enabled. The default is `false`. | [optional] +**NotificationsNewMessageEnabled** | **bool** | Whether to send a notification when a new message is added to a channel. The default is `false`. | [optional] +**NotificationsNewMessageSound** | **string** | The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | [optional] +**NotificationsNewMessageTemplate** | **string** | The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. | [optional] +**NotificationsRemovedFromChannelEnabled** | **bool** | Whether to send a notification to a user when they are removed from a channel. The default is `false`. | [optional] +**NotificationsRemovedFromChannelSound** | **string** | The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | [optional] +**NotificationsRemovedFromChannelTemplate** | **string** | The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. | [optional] +**PostWebhookRetryCount** | **int32** | The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried. | [optional] +**PostWebhookUrl** | **string** | The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] +**PreWebhookRetryCount** | **int32** | The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried. | [optional] +**PreWebhookUrl** | **string** | The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] +**ReachabilityEnabled** | **bool** | Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. | [optional] +**ReadStatusEnabled** | **bool** | Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. | [optional] +**TypingIndicatorTimeout** | **int32** | How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. | [optional] +**WebhookFilters** | **[]string** | The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] +**WebhookMethod** | **string** | The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateUserChannelRequest.md b/rest/chat/v2/docs/UpdateUserChannelRequest.md new file mode 100644 index 000000000..eb8e46cdc --- /dev/null +++ b/rest/chat/v2/docs/UpdateUserChannelRequest.md @@ -0,0 +1,13 @@ +# UpdateUserChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LastConsumedMessageIndex** | Pointer to **int32** | The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). | [optional] +**NotificationLevel** | **string** | The push notification level to assign to the User Channel. Can be: `default` or `muted`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/docs/UpdateUserRequest.md b/rest/chat/v2/docs/UpdateUserRequest.md new file mode 100644 index 000000000..1c2fefc2a --- /dev/null +++ b/rest/chat/v2/docs/UpdateUserRequest.md @@ -0,0 +1,13 @@ +# UpdateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A valid JSON string that contains application-specific data. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is often used for display purposes. | [optional] +**RoleSid** | **string** | The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/chat/v2/model_chat_v2_credential.go b/rest/chat/v2/model_chat_v2_credential.go new file mode 100644 index 000000000..c73181120 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2Credential struct for ChatV2Credential +type ChatV2Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service.go b/rest/chat/v2/model_chat_v2_service.go new file mode 100644 index 000000000..f63dbad92 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service.go @@ -0,0 +1,40 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2Service struct for ChatV2Service +type ChatV2Service struct { + AccountSid string `json:"AccountSid,omitempty"` + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Limits map[string]interface{} `json:"Limits,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Media map[string]interface{} `json:"Media,omitempty"` + Notifications map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookRetryCount int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + Url string `json:"Url,omitempty"` + WebhookFilters []string `json:"WebhookFilters,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_binding.go b/rest/chat/v2/model_chat_v2_service_binding.go new file mode 100644 index 000000000..962b6aefa --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_binding.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceBinding struct for ChatV2ServiceBinding +type ChatV2ServiceBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + BindingType string `json:"BindingType,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MessageTypes []string `json:"MessageTypes,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_channel.go b/rest/chat/v2/model_chat_v2_service_channel.go new file mode 100644 index 000000000..ec0a4c104 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_channel.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceChannel struct for ChatV2ServiceChannel +type ChatV2ServiceChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MembersCount int32 `json:"MembersCount,omitempty"` + MessagesCount int32 `json:"MessagesCount,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go b/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go new file mode 100644 index 000000000..2b17d5cde --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_channel_channel_webhook.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceChannelChannelWebhook struct for ChatV2ServiceChannelChannelWebhook +type ChatV2ServiceChannelChannelWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_channel_invite.go b/rest/chat/v2/model_chat_v2_service_channel_invite.go new file mode 100644 index 000000000..9a6904561 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_channel_invite.go @@ -0,0 +1,27 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceChannelInvite struct for ChatV2ServiceChannelInvite +type ChatV2ServiceChannelInvite struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_channel_member.go b/rest/chat/v2/model_chat_v2_service_channel_member.go new file mode 100644 index 000000000..d12fa5476 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_channel_member.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceChannelMember struct for ChatV2ServiceChannelMember +type ChatV2ServiceChannelMember struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_channel_message.go b/rest/chat/v2/model_chat_v2_service_channel_message.go new file mode 100644 index 000000000..c0787b5d8 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_channel_message.go @@ -0,0 +1,33 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceChannelMessage struct for ChatV2ServiceChannelMessage +type ChatV2ServiceChannelMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + Index int32 `json:"Index,omitempty"` + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` + Media map[string]interface{} `json:"Media,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + To string `json:"To,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` + WasEdited bool `json:"WasEdited,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_role.go b/rest/chat/v2/model_chat_v2_service_role.go new file mode 100644 index 000000000..ba7f303aa --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceRole struct for ChatV2ServiceRole +type ChatV2ServiceRole struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_user.go b/rest/chat/v2/model_chat_v2_service_user.go new file mode 100644 index 000000000..6da872e38 --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_user.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceUser struct for ChatV2ServiceUser +type ChatV2ServiceUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + JoinedChannelsCount int32 `json:"JoinedChannelsCount,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_user_user_binding.go b/rest/chat/v2/model_chat_v2_service_user_user_binding.go new file mode 100644 index 000000000..37b45be2a --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_user_user_binding.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ChatV2ServiceUserUserBinding struct for ChatV2ServiceUserUserBinding +type ChatV2ServiceUserUserBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + BindingType string `json:"BindingType,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + MessageTypes []string `json:"MessageTypes,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + UserSid string `json:"UserSid,omitempty"` +} diff --git a/rest/chat/v2/model_chat_v2_service_user_user_channel.go b/rest/chat/v2/model_chat_v2_service_user_user_channel.go new file mode 100644 index 000000000..b1fd0bbec --- /dev/null +++ b/rest/chat/v2/model_chat_v2_service_user_user_channel.go @@ -0,0 +1,25 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ChatV2ServiceUserUserChannel struct for ChatV2ServiceUserUserChannel +type ChatV2ServiceUserUserChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MemberSid string `json:"MemberSid,omitempty"` + NotificationLevel string `json:"NotificationLevel,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Status string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + Url string `json:"Url,omitempty"` + UserSid string `json:"UserSid,omitempty"` +} diff --git a/rest/chat/v2/model_create_channel_request.go b/rest/chat/v2/model_create_channel_request.go new file mode 100644 index 000000000..e99708fa0 --- /dev/null +++ b/rest/chat/v2/model_create_channel_request.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateChannelRequest struct for CreateChannelRequest +type CreateChannelRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The `identity` of the User that created the channel. Default is: `system`. + CreatedBy string `json:"CreatedBy,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The visibility of the channel. Can be: `public` or `private` and defaults to `public`. + Type string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/chat/v2/model_create_channel_webhook_request.go b/rest/chat/v2/model_create_channel_webhook_request.go new file mode 100644 index 000000000..cdd3c8a02 --- /dev/null +++ b/rest/chat/v2/model_create_channel_webhook_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateChannelWebhookRequest struct for CreateChannelWebhookRequest +type CreateChannelWebhookRequest struct { + // The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. + ConfigurationRetryCount int32 `json:"ConfigurationRetryCount,omitempty"` + // A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The URL of the webhook to call using the `configuration.method`. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` + // The type of webhook. Can be: `webhook`, `studio`, or `trigger`. + Type string `json:"Type"` +} diff --git a/rest/chat/v2/model_create_credential_request.go b/rest/chat/v2/model_create_credential_request.go new file mode 100644 index 000000000..690291b16 --- /dev/null +++ b/rest/chat/v2/model_create_credential_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialRequest struct for CreateCredentialRequest +type CreateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` + // The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`. + Type string `json:"Type"` +} diff --git a/rest/chat/v2/model_create_invite_request.go b/rest/chat/v2/model_create_invite_request.go new file mode 100644 index 000000000..2041fdf99 --- /dev/null +++ b/rest/chat/v2/model_create_invite_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateInviteRequest struct for CreateInviteRequest +type CreateInviteRequest struct { + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. + Identity string `json:"Identity"` + // The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v2/model_create_member_request.go b/rest/chat/v2/model_create_member_request.go new file mode 100644 index 000000000..b487fd009 --- /dev/null +++ b/rest/chat/v2/model_create_member_request.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateMemberRequest struct for CreateMemberRequest +type CreateMemberRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info. + Identity string `json:"Identity"` + // The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source. + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + // The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v2/model_create_message_request.go b/rest/chat/v2/model_create_message_request.go new file mode 100644 index 000000000..9ffa95438 --- /dev/null +++ b/rest/chat/v2/model_create_message_request.go @@ -0,0 +1,31 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateMessageRequest struct for CreateMessageRequest +type CreateMessageRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + Body string `json:"Body,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`. + From string `json:"From,omitempty"` + // The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` + // The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message. + MediaSid string `json:"MediaSid,omitempty"` +} diff --git a/rest/chat/v2/model_create_role_request.go b/rest/chat/v2/model_create_role_request.go new file mode 100644 index 000000000..a5c2d836e --- /dev/null +++ b/rest/chat/v2/model_create_role_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRoleRequest struct for CreateRoleRequest +type CreateRoleRequest struct { + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` + // The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles. + Type string `json:"Type"` +} diff --git a/rest/chat/v2/model_create_service_request.go b/rest/chat/v2/model_create_service_request.go new file mode 100644 index 000000000..1a4f1eae3 --- /dev/null +++ b/rest/chat/v2/model_create_service_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // A descriptive string that you create to describe the new resource. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/chat/v2/model_create_user_request.go b/rest/chat/v2/model_create_user_request.go new file mode 100644 index 000000000..9539eae4f --- /dev/null +++ b/rest/chat/v2/model_create_user_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateUserRequest struct for CreateUserRequest +type CreateUserRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the new resource. This value is often used for display purposes. + FriendlyName string `json:"FriendlyName,omitempty"` + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info. + Identity string `json:"Identity"` + // The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v2/model_list_binding_response.go b/rest/chat/v2/model_list_binding_response.go new file mode 100644 index 000000000..fd99b68f5 --- /dev/null +++ b/rest/chat/v2/model_list_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBindingResponse struct for ListBindingResponse +type ListBindingResponse struct { + Bindings []ChatV2ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_channel_response.go b/rest/chat/v2/model_list_channel_response.go new file mode 100644 index 000000000..f4f37e92c --- /dev/null +++ b/rest/chat/v2/model_list_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelResponse struct for ListChannelResponse +type ListChannelResponse struct { + Channels []ChatV2ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_channel_webhook_response.go b/rest/chat/v2/model_list_channel_webhook_response.go new file mode 100644 index 000000000..7d1b063b1 --- /dev/null +++ b/rest/chat/v2/model_list_channel_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelWebhookResponse struct for ListChannelWebhookResponse +type ListChannelWebhookResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Webhooks []ChatV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/chat/v2/model_list_credential_response.go b/rest/chat/v2/model_list_credential_response.go new file mode 100644 index 000000000..1dc8434b5 --- /dev/null +++ b/rest/chat/v2/model_list_credential_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponse struct for ListCredentialResponse +type ListCredentialResponse struct { + Credentials []ChatV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_credential_response_meta.go b/rest/chat/v2/model_list_credential_response_meta.go new file mode 100644 index 000000000..eb79df196 --- /dev/null +++ b/rest/chat/v2/model_list_credential_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponseMeta struct for ListCredentialResponseMeta +type ListCredentialResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/chat/v2/model_list_invite_response.go b/rest/chat/v2/model_list_invite_response.go new file mode 100644 index 000000000..6b55ca8af --- /dev/null +++ b/rest/chat/v2/model_list_invite_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInviteResponse struct for ListInviteResponse +type ListInviteResponse struct { + Invites []ChatV2ServiceChannelInvite `json:"Invites,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_member_response.go b/rest/chat/v2/model_list_member_response.go new file mode 100644 index 000000000..e4a9a789c --- /dev/null +++ b/rest/chat/v2/model_list_member_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMemberResponse struct for ListMemberResponse +type ListMemberResponse struct { + Members []ChatV2ServiceChannelMember `json:"Members,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_message_response.go b/rest/chat/v2/model_list_message_response.go new file mode 100644 index 000000000..8c49aedc6 --- /dev/null +++ b/rest/chat/v2/model_list_message_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessageResponse struct for ListMessageResponse +type ListMessageResponse struct { + Messages []ChatV2ServiceChannelMessage `json:"Messages,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_role_response.go b/rest/chat/v2/model_list_role_response.go new file mode 100644 index 000000000..73e334b7e --- /dev/null +++ b/rest/chat/v2/model_list_role_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoleResponse struct for ListRoleResponse +type ListRoleResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []ChatV2ServiceRole `json:"Roles,omitempty"` +} diff --git a/rest/chat/v2/model_list_service_response.go b/rest/chat/v2/model_list_service_response.go new file mode 100644 index 000000000..950a0b694 --- /dev/null +++ b/rest/chat/v2/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []ChatV2Service `json:"Services,omitempty"` +} diff --git a/rest/chat/v2/model_list_user_binding_response.go b/rest/chat/v2/model_list_user_binding_response.go new file mode 100644 index 000000000..fde09b028 --- /dev/null +++ b/rest/chat/v2/model_list_user_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserBindingResponse struct for ListUserBindingResponse +type ListUserBindingResponse struct { + Bindings []ChatV2ServiceUserUserBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_user_channel_response.go b/rest/chat/v2/model_list_user_channel_response.go new file mode 100644 index 000000000..15c1ccf93 --- /dev/null +++ b/rest/chat/v2/model_list_user_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserChannelResponse struct for ListUserChannelResponse +type ListUserChannelResponse struct { + Channels []ChatV2ServiceUserUserChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/chat/v2/model_list_user_response.go b/rest/chat/v2/model_list_user_response.go new file mode 100644 index 000000000..033947408 --- /dev/null +++ b/rest/chat/v2/model_list_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserResponse struct for ListUserResponse +type ListUserResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []ChatV2ServiceUser `json:"Users,omitempty"` +} diff --git a/rest/chat/v2/model_update_channel_request.go b/rest/chat/v2/model_update_channel_request.go new file mode 100644 index 000000000..8daf7be60 --- /dev/null +++ b/rest/chat/v2/model_update_channel_request.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateChannelRequest struct for UpdateChannelRequest +type UpdateChannelRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The `identity` of the User that created the channel. Default is: `system`. + CreatedBy string `json:"CreatedBy,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/chat/v2/model_update_channel_webhook_request.go b/rest/chat/v2/model_update_channel_webhook_request.go new file mode 100644 index 000000000..8d32b904f --- /dev/null +++ b/rest/chat/v2/model_update_channel_webhook_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateChannelWebhookRequest struct for UpdateChannelWebhookRequest +type UpdateChannelWebhookRequest struct { + // The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger). + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0. + ConfigurationRetryCount int32 `json:"ConfigurationRetryCount,omitempty"` + // A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The URL of the webhook to call using the `configuration.method`. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` +} diff --git a/rest/chat/v2/model_update_credential_request.go b/rest/chat/v2/model_update_credential_request.go new file mode 100644 index 000000000..9d69f1f7d --- /dev/null +++ b/rest/chat/v2/model_update_credential_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialRequest struct for UpdateCredentialRequest +type UpdateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` +} diff --git a/rest/chat/v2/model_update_member_request.go b/rest/chat/v2/model_update_member_request.go new file mode 100644 index 000000000..1a81ae932 --- /dev/null +++ b/rest/chat/v2/model_update_member_request.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateMemberRequest struct for UpdateMemberRequest +type UpdateMemberRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels). + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + // The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource). + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v2/model_update_message_request.go b/rest/chat/v2/model_update_message_request.go new file mode 100644 index 000000000..221a315f0 --- /dev/null +++ b/rest/chat/v2/model_update_message_request.go @@ -0,0 +1,29 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateMessageRequest struct for UpdateMessageRequest +type UpdateMessageRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string. + Body string `json:"Body,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. + From string `json:"From,omitempty"` + // The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable. + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` +} diff --git a/rest/chat/v2/model_update_role_request.go b/rest/chat/v2/model_update_role_request.go new file mode 100644 index 000000000..cac978e56 --- /dev/null +++ b/rest/chat/v2/model_update_role_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoleRequest struct for UpdateRoleRequest +type UpdateRoleRequest struct { + // A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` +} diff --git a/rest/chat/v2/model_update_service_request.go b/rest/chat/v2/model_update_service_request.go new file mode 100644 index 000000000..dcb81c1a8 --- /dev/null +++ b/rest/chat/v2/model_update_service_request.go @@ -0,0 +1,76 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints. + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + // The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + // The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + // The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles. + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + // A descriptive string that you create to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000. + LimitsChannelMembers int32 `json:"LimitsChannelMembers,omitempty"` + // The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000. + LimitsUserChannels int32 `json:"LimitsUserChannels,omitempty"` + // The message to send when a media message has no text. Can be used as placeholder message. + MediaCompatibilityMessage string `json:"MediaCompatibilityMessage,omitempty"` + // Whether to send a notification when a member is added to a channel. The default is `false`. + NotificationsAddedToChannelEnabled bool `json:"NotificationsAddedToChannelEnabled,omitempty"` + // The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + NotificationsAddedToChannelSound string `json:"NotificationsAddedToChannelSound,omitempty"` + // The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`. + NotificationsAddedToChannelTemplate string `json:"NotificationsAddedToChannelTemplate,omitempty"` + // Whether to send a notification when a user is invited to a channel. The default is `false`. + NotificationsInvitedToChannelEnabled bool `json:"NotificationsInvitedToChannelEnabled,omitempty"` + // The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + NotificationsInvitedToChannelSound string `json:"NotificationsInvitedToChannelSound,omitempty"` + // The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`. + NotificationsInvitedToChannelTemplate string `json:"NotificationsInvitedToChannelTemplate,omitempty"` + // Whether to log notifications. The default is `false`. + NotificationsLogEnabled bool `json:"NotificationsLogEnabled,omitempty"` + // Whether the new message badge is enabled. The default is `false`. + NotificationsNewMessageBadgeCountEnabled bool `json:"NotificationsNewMessageBadgeCountEnabled,omitempty"` + // Whether to send a notification when a new message is added to a channel. The default is `false`. + NotificationsNewMessageEnabled bool `json:"NotificationsNewMessageEnabled,omitempty"` + // The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + NotificationsNewMessageSound string `json:"NotificationsNewMessageSound,omitempty"` + // The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`. + NotificationsNewMessageTemplate string `json:"NotificationsNewMessageTemplate,omitempty"` + // Whether to send a notification to a user when they are removed from a channel. The default is `false`. + NotificationsRemovedFromChannelEnabled bool `json:"NotificationsRemovedFromChannelEnabled,omitempty"` + // The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + NotificationsRemovedFromChannelSound string `json:"NotificationsRemovedFromChannelSound,omitempty"` + // The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`. + NotificationsRemovedFromChannelTemplate string `json:"NotificationsRemovedFromChannelTemplate,omitempty"` + // The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried. + PostWebhookRetryCount int32 `json:"PostWebhookRetryCount,omitempty"` + // The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + // The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried. + PreWebhookRetryCount int32 `json:"PreWebhookRetryCount,omitempty"` + // The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + // Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`. + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + // Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`. + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + // How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds. + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + // The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + WebhookFilters []string `json:"WebhookFilters,omitempty"` + // The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details. + WebhookMethod string `json:"WebhookMethod,omitempty"` +} diff --git a/rest/chat/v2/model_update_user_channel_request.go b/rest/chat/v2/model_update_user_channel_request.go new file mode 100644 index 000000000..f89c470c9 --- /dev/null +++ b/rest/chat/v2/model_update_user_channel_request.go @@ -0,0 +1,23 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateUserChannelRequest struct for UpdateUserChannelRequest +type UpdateUserChannelRequest struct { + // The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + // The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels). + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + // The push notification level to assign to the User Channel. Can be: `default` or `muted`. + NotificationLevel string `json:"NotificationLevel,omitempty"` +} diff --git a/rest/chat/v2/model_update_user_request.go b/rest/chat/v2/model_update_user_request.go new file mode 100644 index 000000000..fb84db7fc --- /dev/null +++ b/rest/chat/v2/model_update_user_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateUserRequest struct for UpdateUserRequest +type UpdateUserRequest struct { + // A valid JSON string that contains application-specific data. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the resource. It is often used for display purposes. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/chat/v2/response.go b/rest/chat/v2/response.go new file mode 100644 index 000000000..d2790903e --- /dev/null +++ b/rest/chat/v2/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Chat + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/conversations/v1/.openapi-generator-ignore b/rest/conversations/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/conversations/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/conversations/v1/README.md b/rest/conversations/v1/README.md new file mode 100644 index 000000000..6fb21adda --- /dev/null +++ b/rest/conversations/v1/README.md @@ -0,0 +1,216 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateConversation**](docs/DefaultApi.md#createconversation) | **Post** /v1/Conversations | +*DefaultApi* | [**CreateConversationMessage**](docs/DefaultApi.md#createconversationmessage) | **Post** /v1/Conversations/{ConversationSid}/Messages | +*DefaultApi* | [**CreateConversationParticipant**](docs/DefaultApi.md#createconversationparticipant) | **Post** /v1/Conversations/{ConversationSid}/Participants | +*DefaultApi* | [**CreateConversationScopedWebhook**](docs/DefaultApi.md#createconversationscopedwebhook) | **Post** /v1/Conversations/{ConversationSid}/Webhooks | +*DefaultApi* | [**CreateCredential**](docs/DefaultApi.md#createcredential) | **Post** /v1/Credentials | +*DefaultApi* | [**CreateRole**](docs/DefaultApi.md#createrole) | **Post** /v1/Roles | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateServiceConversation**](docs/DefaultApi.md#createserviceconversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations | +*DefaultApi* | [**CreateServiceConversationMessage**](docs/DefaultApi.md#createserviceconversationmessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | +*DefaultApi* | [**CreateServiceConversationParticipant**](docs/DefaultApi.md#createserviceconversationparticipant) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants | +*DefaultApi* | [**CreateServiceConversationScopedWebhook**](docs/DefaultApi.md#createserviceconversationscopedwebhook) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks | +*DefaultApi* | [**CreateServiceRole**](docs/DefaultApi.md#createservicerole) | **Post** /v1/Services/{ChatServiceSid}/Roles | +*DefaultApi* | [**CreateServiceUser**](docs/DefaultApi.md#createserviceuser) | **Post** /v1/Services/{ChatServiceSid}/Users | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /v1/Users | +*DefaultApi* | [**DeleteConversation**](docs/DefaultApi.md#deleteconversation) | **Delete** /v1/Conversations/{Sid} | +*DefaultApi* | [**DeleteConversationMessage**](docs/DefaultApi.md#deleteconversationmessage) | **Delete** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**DeleteConversationParticipant**](docs/DefaultApi.md#deleteconversationparticipant) | **Delete** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**DeleteConversationScopedWebhook**](docs/DefaultApi.md#deleteconversationscopedwebhook) | **Delete** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**DeleteCredential**](docs/DefaultApi.md#deletecredential) | **Delete** /v1/Credentials/{Sid} | +*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /v1/Roles/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteServiceBinding**](docs/DefaultApi.md#deleteservicebinding) | **Delete** /v1/Services/{ChatServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteServiceConversation**](docs/DefaultApi.md#deleteserviceconversation) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +*DefaultApi* | [**DeleteServiceConversationMessage**](docs/DefaultApi.md#deleteserviceconversationmessage) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**DeleteServiceConversationParticipant**](docs/DefaultApi.md#deleteserviceconversationparticipant) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**DeleteServiceConversationScopedWebhook**](docs/DefaultApi.md#deleteserviceconversationscopedwebhook) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**DeleteServiceRole**](docs/DefaultApi.md#deleteservicerole) | **Delete** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +*DefaultApi* | [**DeleteServiceUser**](docs/DefaultApi.md#deleteserviceuser) | **Delete** /v1/Services/{ChatServiceSid}/Users/{Sid} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /v1/Users/{Sid} | +*DefaultApi* | [**FetchConfiguration**](docs/DefaultApi.md#fetchconfiguration) | **Get** /v1/Configuration | +*DefaultApi* | [**FetchConfigurationWebhook**](docs/DefaultApi.md#fetchconfigurationwebhook) | **Get** /v1/Configuration/Webhooks | +*DefaultApi* | [**FetchConversation**](docs/DefaultApi.md#fetchconversation) | **Get** /v1/Conversations/{Sid} | +*DefaultApi* | [**FetchConversationMessage**](docs/DefaultApi.md#fetchconversationmessage) | **Get** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**FetchConversationMessageReceipt**](docs/DefaultApi.md#fetchconversationmessagereceipt) | **Get** /v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid} | +*DefaultApi* | [**FetchConversationParticipant**](docs/DefaultApi.md#fetchconversationparticipant) | **Get** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**FetchConversationScopedWebhook**](docs/DefaultApi.md#fetchconversationscopedwebhook) | **Get** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchCredential**](docs/DefaultApi.md#fetchcredential) | **Get** /v1/Credentials/{Sid} | +*DefaultApi* | [**FetchRole**](docs/DefaultApi.md#fetchrole) | **Get** /v1/Roles/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchServiceBinding**](docs/DefaultApi.md#fetchservicebinding) | **Get** /v1/Services/{ChatServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchServiceConfiguration**](docs/DefaultApi.md#fetchserviceconfiguration) | **Get** /v1/Services/{ChatServiceSid}/Configuration | +*DefaultApi* | [**FetchServiceConversation**](docs/DefaultApi.md#fetchserviceconversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +*DefaultApi* | [**FetchServiceConversationMessage**](docs/DefaultApi.md#fetchserviceconversationmessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**FetchServiceConversationMessageReceipt**](docs/DefaultApi.md#fetchserviceconversationmessagereceipt) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid} | +*DefaultApi* | [**FetchServiceConversationParticipant**](docs/DefaultApi.md#fetchserviceconversationparticipant) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**FetchServiceConversationScopedWebhook**](docs/DefaultApi.md#fetchserviceconversationscopedwebhook) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchServiceNotification**](docs/DefaultApi.md#fetchservicenotification) | **Get** /v1/Services/{ChatServiceSid}/Configuration/Notifications | +*DefaultApi* | [**FetchServiceRole**](docs/DefaultApi.md#fetchservicerole) | **Get** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +*DefaultApi* | [**FetchServiceUser**](docs/DefaultApi.md#fetchserviceuser) | **Get** /v1/Services/{ChatServiceSid}/Users/{Sid} | +*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **Get** /v1/Users/{Sid} | +*DefaultApi* | [**ListConversation**](docs/DefaultApi.md#listconversation) | **Get** /v1/Conversations | +*DefaultApi* | [**ListConversationMessage**](docs/DefaultApi.md#listconversationmessage) | **Get** /v1/Conversations/{ConversationSid}/Messages | +*DefaultApi* | [**ListConversationMessageReceipt**](docs/DefaultApi.md#listconversationmessagereceipt) | **Get** /v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts | +*DefaultApi* | [**ListConversationParticipant**](docs/DefaultApi.md#listconversationparticipant) | **Get** /v1/Conversations/{ConversationSid}/Participants | +*DefaultApi* | [**ListConversationScopedWebhook**](docs/DefaultApi.md#listconversationscopedwebhook) | **Get** /v1/Conversations/{ConversationSid}/Webhooks | +*DefaultApi* | [**ListCredential**](docs/DefaultApi.md#listcredential) | **Get** /v1/Credentials | +*DefaultApi* | [**ListRole**](docs/DefaultApi.md#listrole) | **Get** /v1/Roles | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListServiceBinding**](docs/DefaultApi.md#listservicebinding) | **Get** /v1/Services/{ChatServiceSid}/Bindings | +*DefaultApi* | [**ListServiceConversation**](docs/DefaultApi.md#listserviceconversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations | +*DefaultApi* | [**ListServiceConversationMessage**](docs/DefaultApi.md#listserviceconversationmessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | +*DefaultApi* | [**ListServiceConversationMessageReceipt**](docs/DefaultApi.md#listserviceconversationmessagereceipt) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts | +*DefaultApi* | [**ListServiceConversationParticipant**](docs/DefaultApi.md#listserviceconversationparticipant) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants | +*DefaultApi* | [**ListServiceConversationScopedWebhook**](docs/DefaultApi.md#listserviceconversationscopedwebhook) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks | +*DefaultApi* | [**ListServiceRole**](docs/DefaultApi.md#listservicerole) | **Get** /v1/Services/{ChatServiceSid}/Roles | +*DefaultApi* | [**ListServiceUser**](docs/DefaultApi.md#listserviceuser) | **Get** /v1/Services/{ChatServiceSid}/Users | +*DefaultApi* | [**ListUser**](docs/DefaultApi.md#listuser) | **Get** /v1/Users | +*DefaultApi* | [**UpdateConfiguration**](docs/DefaultApi.md#updateconfiguration) | **Post** /v1/Configuration | +*DefaultApi* | [**UpdateConfigurationWebhook**](docs/DefaultApi.md#updateconfigurationwebhook) | **Post** /v1/Configuration/Webhooks | +*DefaultApi* | [**UpdateConversation**](docs/DefaultApi.md#updateconversation) | **Post** /v1/Conversations/{Sid} | +*DefaultApi* | [**UpdateConversationMessage**](docs/DefaultApi.md#updateconversationmessage) | **Post** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**UpdateConversationParticipant**](docs/DefaultApi.md#updateconversationparticipant) | **Post** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**UpdateConversationScopedWebhook**](docs/DefaultApi.md#updateconversationscopedwebhook) | **Post** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**UpdateCredential**](docs/DefaultApi.md#updatecredential) | **Post** /v1/Credentials/{Sid} | +*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Post** /v1/Roles/{Sid} | +*DefaultApi* | [**UpdateServiceConfiguration**](docs/DefaultApi.md#updateserviceconfiguration) | **Post** /v1/Services/{ChatServiceSid}/Configuration | +*DefaultApi* | [**UpdateServiceConversation**](docs/DefaultApi.md#updateserviceconversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +*DefaultApi* | [**UpdateServiceConversationMessage**](docs/DefaultApi.md#updateserviceconversationmessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +*DefaultApi* | [**UpdateServiceConversationParticipant**](docs/DefaultApi.md#updateserviceconversationparticipant) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +*DefaultApi* | [**UpdateServiceConversationScopedWebhook**](docs/DefaultApi.md#updateserviceconversationscopedwebhook) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +*DefaultApi* | [**UpdateServiceNotification**](docs/DefaultApi.md#updateservicenotification) | **Post** /v1/Services/{ChatServiceSid}/Configuration/Notifications | +*DefaultApi* | [**UpdateServiceRole**](docs/DefaultApi.md#updateservicerole) | **Post** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +*DefaultApi* | [**UpdateServiceUser**](docs/DefaultApi.md#updateserviceuser) | **Post** /v1/Services/{ChatServiceSid}/Users/{Sid} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Post** /v1/Users/{Sid} | + + +## Documentation For Models + + - [ConversationsV1Configuration](docs/ConversationsV1Configuration.md) + - [ConversationsV1ConfigurationConfigurationWebhook](docs/ConversationsV1ConfigurationConfigurationWebhook.md) + - [ConversationsV1Conversation](docs/ConversationsV1Conversation.md) + - [ConversationsV1ConversationConversationMessage](docs/ConversationsV1ConversationConversationMessage.md) + - [ConversationsV1ConversationConversationMessageConversationMessageReceipt](docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md) + - [ConversationsV1ConversationConversationParticipant](docs/ConversationsV1ConversationConversationParticipant.md) + - [ConversationsV1ConversationConversationScopedWebhook](docs/ConversationsV1ConversationConversationScopedWebhook.md) + - [ConversationsV1Credential](docs/ConversationsV1Credential.md) + - [ConversationsV1Role](docs/ConversationsV1Role.md) + - [ConversationsV1Service](docs/ConversationsV1Service.md) + - [ConversationsV1ServiceServiceBinding](docs/ConversationsV1ServiceServiceBinding.md) + - [ConversationsV1ServiceServiceConfiguration](docs/ConversationsV1ServiceServiceConfiguration.md) + - [ConversationsV1ServiceServiceConfigurationServiceNotification](docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md) + - [ConversationsV1ServiceServiceConversation](docs/ConversationsV1ServiceServiceConversation.md) + - [ConversationsV1ServiceServiceConversationServiceConversationMessage](docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md) + - [ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt](docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md) + - [ConversationsV1ServiceServiceConversationServiceConversationParticipant](docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md) + - [ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook](docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md) + - [ConversationsV1ServiceServiceRole](docs/ConversationsV1ServiceServiceRole.md) + - [ConversationsV1ServiceServiceUser](docs/ConversationsV1ServiceServiceUser.md) + - [ConversationsV1User](docs/ConversationsV1User.md) + - [CreateConversationMessageRequest](docs/CreateConversationMessageRequest.md) + - [CreateConversationParticipantRequest](docs/CreateConversationParticipantRequest.md) + - [CreateConversationRequest](docs/CreateConversationRequest.md) + - [CreateConversationScopedWebhookRequest](docs/CreateConversationScopedWebhookRequest.md) + - [CreateCredentialRequest](docs/CreateCredentialRequest.md) + - [CreateRoleRequest](docs/CreateRoleRequest.md) + - [CreateServiceConversationMessageRequest](docs/CreateServiceConversationMessageRequest.md) + - [CreateServiceConversationParticipantRequest](docs/CreateServiceConversationParticipantRequest.md) + - [CreateServiceConversationRequest](docs/CreateServiceConversationRequest.md) + - [CreateServiceConversationScopedWebhookRequest](docs/CreateServiceConversationScopedWebhookRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateServiceRoleRequest](docs/CreateServiceRoleRequest.md) + - [CreateServiceUserRequest](docs/CreateServiceUserRequest.md) + - [CreateUserRequest](docs/CreateUserRequest.md) + - [ListConversationMessageReceiptResponse](docs/ListConversationMessageReceiptResponse.md) + - [ListConversationMessageResponse](docs/ListConversationMessageResponse.md) + - [ListConversationParticipantResponse](docs/ListConversationParticipantResponse.md) + - [ListConversationResponse](docs/ListConversationResponse.md) + - [ListConversationResponseMeta](docs/ListConversationResponseMeta.md) + - [ListConversationScopedWebhookResponse](docs/ListConversationScopedWebhookResponse.md) + - [ListCredentialResponse](docs/ListCredentialResponse.md) + - [ListRoleResponse](docs/ListRoleResponse.md) + - [ListServiceBindingResponse](docs/ListServiceBindingResponse.md) + - [ListServiceConversationMessageReceiptResponse](docs/ListServiceConversationMessageReceiptResponse.md) + - [ListServiceConversationMessageResponse](docs/ListServiceConversationMessageResponse.md) + - [ListServiceConversationParticipantResponse](docs/ListServiceConversationParticipantResponse.md) + - [ListServiceConversationResponse](docs/ListServiceConversationResponse.md) + - [ListServiceConversationScopedWebhookResponse](docs/ListServiceConversationScopedWebhookResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceRoleResponse](docs/ListServiceRoleResponse.md) + - [ListServiceUserResponse](docs/ListServiceUserResponse.md) + - [ListUserResponse](docs/ListUserResponse.md) + - [UpdateConfigurationRequest](docs/UpdateConfigurationRequest.md) + - [UpdateConfigurationWebhookRequest](docs/UpdateConfigurationWebhookRequest.md) + - [UpdateConversationMessageRequest](docs/UpdateConversationMessageRequest.md) + - [UpdateConversationParticipantRequest](docs/UpdateConversationParticipantRequest.md) + - [UpdateConversationRequest](docs/UpdateConversationRequest.md) + - [UpdateConversationScopedWebhookRequest](docs/UpdateConversationScopedWebhookRequest.md) + - [UpdateCredentialRequest](docs/UpdateCredentialRequest.md) + - [UpdateRoleRequest](docs/UpdateRoleRequest.md) + - [UpdateServiceConfigurationRequest](docs/UpdateServiceConfigurationRequest.md) + - [UpdateServiceConversationMessageRequest](docs/UpdateServiceConversationMessageRequest.md) + - [UpdateServiceConversationParticipantRequest](docs/UpdateServiceConversationParticipantRequest.md) + - [UpdateServiceConversationRequest](docs/UpdateServiceConversationRequest.md) + - [UpdateServiceConversationScopedWebhookRequest](docs/UpdateServiceConversationScopedWebhookRequest.md) + - [UpdateServiceNotificationRequest](docs/UpdateServiceNotificationRequest.md) + - [UpdateServiceRoleRequest](docs/UpdateServiceRoleRequest.md) + - [UpdateServiceUserRequest](docs/UpdateServiceUserRequest.md) + - [UpdateUserRequest](docs/UpdateUserRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/conversations/v1/api_default.go b/rest/conversations/v1/api_default.go new file mode 100644 index 000000000..801465be4 --- /dev/null +++ b/rest/conversations/v1/api_default.go @@ -0,0 +1,3944 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://conversations.twilio.com"), + } +} +// CreateConversationParams Optional parameters for the method 'CreateConversation' +type CreateConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateConversation Method for CreateConversation +Create a new conversation in your account's default service + * @param optional nil or *CreateConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "FriendlyName" (string) - The human-readable name of this conversation, limited to 256 characters. Optional. + * @param "MessagingServiceSid" (string) - The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + * @param "State" (string) - Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + * @param "TimersClosed" (string) - ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. +@return ConversationsV1Conversation +*/ +func (c *DefaultApiService) CreateConversation(params *CreateConversationParams) (*ConversationsV1Conversation, error) { + path := "/v1/Conversations" + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateConversationMessageParams Optional parameters for the method 'CreateConversationMessage' +type CreateConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` +} + +/* +CreateConversationMessage Method for CreateConversationMessage +Add a new message to the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param optional nil or *CreateConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "Author" (string) - The channel specific identifier of the message's author. Defaults to `system`. + * @param "Body" (string) - The content of the message, can be up to 1,600 characters long. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. + * @param "MediaSid" (string) - The Media SID to be attached to the new Message. +@return ConversationsV1ConversationConversationMessage +*/ +func (c *DefaultApiService) CreateConversationMessage(ConversationSid string, params *CreateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { + path := "/v1/Conversations/{ConversationSid}/Messages" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateConversationParticipantParams Optional parameters for the method 'CreateConversationParticipant' +type CreateConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateConversationParticipant Method for CreateConversationParticipant +Add a new participant to the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param optional nil or *CreateConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "Identity" (string) - A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. + * @param "MessagingBindingAddress" (string) - The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + * @param "MessagingBindingProjectedAddress" (string) - The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. + * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. +@return ConversationsV1ConversationConversationParticipant +*/ +func (c *DefaultApiService) CreateConversationParticipant(ConversationSid string, params *CreateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { + path := "/v1/Conversations/{ConversationSid}/Participants" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateConversationScopedWebhookParams Optional parameters for the method 'CreateConversationScopedWebhook' +type CreateConversationScopedWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` +} + +/* +CreateConversationScopedWebhook Method for CreateConversationScopedWebhook +Create a new webhook scoped to the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param optional nil or *CreateConversationScopedWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The list of events, firing webhook event for this Conversation. + * @param "ConfigurationFlowSid" (string) - The studio flow SID, where the webhook should be sent to. + * @param "ConfigurationMethod" (string) - The HTTP method to be used when sending a webhook request. + * @param "ConfigurationReplayAfter" (int32) - The message index for which and it's successors the webhook will be replayed. Not set by default + * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. + * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. + * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` +@return ConversationsV1ConversationConversationScopedWebhook +*/ +func (c *DefaultApiService) CreateConversationScopedWebhook(ConversationSid string, params *CreateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialParams Optional parameters for the method 'CreateCredential' +type CreateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateCredential Method for CreateCredential +Add a new push notification credential to your account + * @param optional nil or *CreateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. +@return ConversationsV1Credential +*/ +func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*ConversationsV1Credential, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRoleParams Optional parameters for the method 'CreateRole' +type CreateRoleParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateRole Method for CreateRole +Create a new user role in your account's default service + * @param optional nil or *CreateRoleOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. +@return ConversationsV1Role +*/ +func (c *DefaultApiService) CreateRole(params *CreateRoleParams) (*ConversationsV1Role, error) { + path := "/v1/Roles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateService Method for CreateService +Create a new conversation service on your account + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - The human-readable name of this service, limited to 256 characters. Optional. +@return ConversationsV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ConversationsV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceConversationParams Optional parameters for the method 'CreateServiceConversation' +type CreateServiceConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateServiceConversation Method for CreateServiceConversation +Create a new conversation in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. + * @param optional nil or *CreateServiceConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "FriendlyName" (string) - The human-readable name of this conversation, limited to 256 characters. Optional. + * @param "MessagingServiceSid" (string) - The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + * @param "State" (string) - Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + * @param "TimersClosed" (string) - ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. +@return ConversationsV1ServiceServiceConversation +*/ +func (c *DefaultApiService) CreateServiceConversation(ChatServiceSid string, params *CreateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceConversationMessageParams Optional parameters for the method 'CreateServiceConversationMessage' +type CreateServiceConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` +} + +/* +CreateServiceConversationMessage Method for CreateServiceConversationMessage +Add a new message to the conversation in a specific service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param optional nil or *CreateServiceConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "Author" (string) - The channel specific identifier of the message's author. Defaults to `system`. + * @param "Body" (string) - The content of the message, can be up to 1,600 characters long. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. + * @param "MediaSid" (string) - The Media SID to be attached to the new Message. +@return ConversationsV1ServiceServiceConversationServiceConversationMessage +*/ +func (c *DefaultApiService) CreateServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceConversationParticipantParams Optional parameters for the method 'CreateServiceConversationParticipant' +type CreateServiceConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + MessagingBindingAddress *string `json:"MessagingBinding.Address,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateServiceConversationParticipant Method for CreateServiceConversationParticipant +Add a new participant to the conversation in a specific service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param optional nil or *CreateServiceConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "Identity" (string) - A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. + * @param "MessagingBindingAddress" (string) - The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + * @param "MessagingBindingProjectedAddress" (string) - The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. + * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. +@return ConversationsV1ServiceServiceConversationServiceConversationParticipant +*/ +func (c *DefaultApiService) CreateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.MessagingBindingAddress != nil { + data.Set("MessagingBindingAddress", *params.MessagingBindingAddress) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceConversationScopedWebhookParams Optional parameters for the method 'CreateServiceConversationScopedWebhook' +type CreateServiceConversationScopedWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationReplayAfter *int32 `json:"Configuration.ReplayAfter,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Target *string `json:"Target,omitempty"` +} + +/* +CreateServiceConversationScopedWebhook Method for CreateServiceConversationScopedWebhook +Create a new webhook scoped to the conversation in a specific service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param optional nil or *CreateServiceConversationScopedWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The list of events, firing webhook event for this Conversation. + * @param "ConfigurationFlowSid" (string) - The studio flow SID, where the webhook should be sent to. + * @param "ConfigurationMethod" (string) - The HTTP method to be used when sending a webhook request. + * @param "ConfigurationReplayAfter" (int32) - The message index for which and it's successors the webhook will be replayed. Not set by default + * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. + * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. + * @param "Target" (string) - The target of this webhook: `webhook`, `studio`, `trigger` +@return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook +*/ +func (c *DefaultApiService) CreateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *CreateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationReplayAfter != nil { + data.Set("ConfigurationReplayAfter", fmt.Sprint(*params.ConfigurationReplayAfter)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceRoleParams Optional parameters for the method 'CreateServiceRole' +type CreateServiceRoleParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateServiceRole Method for CreateServiceRole +Create a new user role in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to create the Role resource under. + * @param optional nil or *CreateServiceRoleOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "Permission" ([]string) - A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + * @param "Type" (string) - The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. +@return ConversationsV1ServiceServiceRole +*/ +func (c *DefaultApiService) CreateServiceRole(ChatServiceSid string, params *CreateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { + path := "/v1/Services/{ChatServiceSid}/Roles" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceUserParams Optional parameters for the method 'CreateServiceUser' +type CreateServiceUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateServiceUser Method for CreateServiceUser +Add a new conversation user to your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the User resource is associated with. + * @param optional nil or *CreateServiceUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. + * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. +@return ConversationsV1ServiceServiceUser +*/ +func (c *DefaultApiService) CreateServiceUser(ChatServiceSid string, params *CreateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { + path := "/v1/Services/{ChatServiceSid}/Users" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateUserParams Optional parameters for the method 'CreateUser' +type CreateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateUser Method for CreateUser +Add a new conversation user to your account's default service + * @param optional nil or *CreateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "Identity" (string) - The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. + * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. +@return ConversationsV1User +*/ +func (c *DefaultApiService) CreateUser(params *CreateUserParams) (*ConversationsV1User, error) { + path := "/v1/Users" + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// DeleteConversationParams Optional parameters for the method 'DeleteConversation' +type DeleteConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteConversation Method for DeleteConversation +Remove a conversation from your account's default service + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. + * @param optional nil or *DeleteConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteConversation(Sid string, params *DeleteConversationParams) (error) { + path := "/v1/Conversations/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteConversationMessageParams Optional parameters for the method 'DeleteConversationMessage' +type DeleteConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteConversationMessage Method for DeleteConversationMessage +Remove a message from the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *DeleteConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteConversationMessage(ConversationSid string, Sid string, params *DeleteConversationMessageParams) (error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteConversationParticipantParams Optional parameters for the method 'DeleteConversationParticipant' +type DeleteConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteConversationParticipant Method for DeleteConversationParticipant +Remove a participant from the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *DeleteConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteConversationParticipant(ConversationSid string, Sid string, params *DeleteConversationParticipantParams) (error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteConversationScopedWebhook Method for DeleteConversationScopedWebhook +Remove an existing webhook scoped to the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteConversationScopedWebhook(ConversationSid string, Sid string) (error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredential Method for DeleteCredential +Remove a push notification credential from your account + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteCredential(Sid string) (error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRole Method for DeleteRole +Remove a user role from your account's default service + * @param Sid The SID of the Role resource to delete. +*/ +func (c *DefaultApiService) DeleteRole(Sid string) (error) { + path := "/v1/Roles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService +Remove a conversation service with all its nested resources from your account + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteServiceBinding Method for DeleteServiceBinding +Remove a push notification binding from the conversation service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Binding resource from. + * @param Sid The SID of the Binding resource to delete. +*/ +func (c *DefaultApiService) DeleteServiceBinding(ChatServiceSid string, Sid string) (error) { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteServiceConversationParams Optional parameters for the method 'DeleteServiceConversation' +type DeleteServiceConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteServiceConversation Method for DeleteServiceConversation +Remove a conversation from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. + * @param optional nil or *DeleteServiceConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteServiceConversation(ChatServiceSid string, Sid string, params *DeleteServiceConversationParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteServiceConversationMessageParams Optional parameters for the method 'DeleteServiceConversationMessage' +type DeleteServiceConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteServiceConversationMessage Method for DeleteServiceConversationMessage +Remove a message from the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *DeleteServiceConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationMessageParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteServiceConversationParticipantParams Optional parameters for the method 'DeleteServiceConversationParticipant' +type DeleteServiceConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteServiceConversationParticipant Method for DeleteServiceConversationParticipant +Remove a participant from the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *DeleteServiceConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *DeleteServiceConversationParticipantParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteServiceConversationScopedWebhook Method for DeleteServiceConversationScopedWebhook +Remove an existing webhook scoped to the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) (error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteServiceRole Method for DeleteServiceRole +Remove a user role from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Role resource from. + * @param Sid The SID of the Role resource to delete. +*/ +func (c *DefaultApiService) DeleteServiceRole(ChatServiceSid string, Sid string) (error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteServiceUserParams Optional parameters for the method 'DeleteServiceUser' +type DeleteServiceUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteServiceUser Method for DeleteServiceUser +Remove a conversation user from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the User resource from. + * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. + * @param optional nil or *DeleteServiceUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteServiceUser(ChatServiceSid string, Sid string, params *DeleteServiceUserParams) (error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteUserParams Optional parameters for the method 'DeleteUser' +type DeleteUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteUser Method for DeleteUser +Remove a conversation user from your account's default service + * @param Sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. + * @param optional nil or *DeleteUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteUser(Sid string, params *DeleteUserParams) (error) { + path := "/v1/Users/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchConfiguration Method for FetchConfiguration +Fetch the global configuration of conversations on your account +@return ConversationsV1Configuration +*/ +func (c *DefaultApiService) FetchConfiguration() (*ConversationsV1Configuration, error) { + path := "/v1/Configuration" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConfigurationWebhook Method for FetchConfigurationWebhook +@return ConversationsV1ConfigurationConfigurationWebhook +*/ +func (c *DefaultApiService) FetchConfigurationWebhook() (*ConversationsV1ConfigurationConfigurationWebhook, error) { + path := "/v1/Configuration/Webhooks" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConversation Method for FetchConversation +Fetch a conversation from your account's default service + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. +@return ConversationsV1Conversation +*/ +func (c *DefaultApiService) FetchConversation(Sid string) (*ConversationsV1Conversation, error) { + path := "/v1/Conversations/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConversationMessage Method for FetchConversationMessage +Fetch a message from the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ConversationConversationMessage +*/ +func (c *DefaultApiService) FetchConversationMessage(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationMessage, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConversationMessageReceipt Method for FetchConversationMessageReceipt +Fetch the delivery and read receipts of the conversation message + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ConversationConversationMessageConversationMessageReceipt +*/ +func (c *DefaultApiService) FetchConversationMessageReceipt(ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ConversationConversationMessageConversationMessageReceipt, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationMessageConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConversationParticipant Method for FetchConversationParticipant +Fetch a participant of the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ConversationConversationParticipant +*/ +func (c *DefaultApiService) FetchConversationParticipant(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationParticipant, error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConversationScopedWebhook Method for FetchConversationScopedWebhook +Fetch the configuration of a conversation-scoped webhook + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ConversationConversationScopedWebhook +*/ +func (c *DefaultApiService) FetchConversationScopedWebhook(ConversationSid string, Sid string) (*ConversationsV1ConversationConversationScopedWebhook, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredential Method for FetchCredential +Fetch a push notification credential from your account + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1Credential +*/ +func (c *DefaultApiService) FetchCredential(Sid string) (*ConversationsV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRole Method for FetchRole +Fetch a user role from your account's default service + * @param Sid The SID of the Role resource to fetch. +@return ConversationsV1Role +*/ +func (c *DefaultApiService) FetchRole(Sid string) (*ConversationsV1Role, error) { + path := "/v1/Roles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService +Fetch a conversation service from your account + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*ConversationsV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceBinding Method for FetchServiceBinding +Fetch a push notification binding from the conversation service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ServiceServiceBinding +*/ +func (c *DefaultApiService) FetchServiceBinding(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceBinding, error) { + path := "/v1/Services/{ChatServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConfiguration Method for FetchServiceConfiguration +Fetch the configuration of a conversation service + * @param ChatServiceSid The SID of the Service configuration resource to fetch. +@return ConversationsV1ServiceServiceConfiguration +*/ +func (c *DefaultApiService) FetchServiceConfiguration(ChatServiceSid string) (*ConversationsV1ServiceServiceConfiguration, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConversation Method for FetchServiceConversation +Fetch a conversation from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. +@return ConversationsV1ServiceServiceConversation +*/ +func (c *DefaultApiService) FetchServiceConversation(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceConversation, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConversationMessage Method for FetchServiceConversationMessage +Fetch a message from the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ServiceServiceConversationServiceConversationMessage +*/ +func (c *DefaultApiService) FetchServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConversationMessageReceipt Method for FetchServiceConversationMessageReceipt +Fetch the delivery and read receipts of the conversation message + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Message resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt +*/ +func (c *DefaultApiService) FetchServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConversationParticipant Method for FetchServiceConversationParticipant +Fetch a participant of the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ServiceServiceConversationServiceConversationParticipant +*/ +func (c *DefaultApiService) FetchServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceConversationScopedWebhook Method for FetchServiceConversationScopedWebhook +Fetch the configuration of a conversation-scoped webhook + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. +@return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook +*/ +func (c *DefaultApiService) FetchServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceNotification Method for FetchServiceNotification +Fetch push notification service settings + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. +@return ConversationsV1ServiceServiceConfigurationServiceNotification +*/ +func (c *DefaultApiService) FetchServiceNotification(ChatServiceSid string) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceRole Method for FetchServiceRole +Fetch a user role from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the Role resource from. + * @param Sid The SID of the Role resource to fetch. +@return ConversationsV1ServiceServiceRole +*/ +func (c *DefaultApiService) FetchServiceRole(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceRole, error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchServiceUser Method for FetchServiceUser +Fetch a conversation user from your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the User resource from. + * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. +@return ConversationsV1ServiceServiceUser +*/ +func (c *DefaultApiService) FetchServiceUser(ChatServiceSid string, Sid string) (*ConversationsV1ServiceServiceUser, error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUser Method for FetchUser +Fetch a conversation user from your account's default service + * @param Sid The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. +@return ConversationsV1User +*/ +func (c *DefaultApiService) FetchUser(Sid string) (*ConversationsV1User, error) { + path := "/v1/Users/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConversationParams Optional parameters for the method 'ListConversation' +type ListConversationParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConversation Method for ListConversation +Retrieve a list of conversations in your account's default service + * @param optional nil or *ListConversationOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConversationResponse +*/ +func (c *DefaultApiService) ListConversation(params *ListConversationParams) (*ListConversationResponse, error) { + path := "/v1/Conversations" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConversationMessageParams Optional parameters for the method 'ListConversationMessage' +type ListConversationMessageParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConversationMessage Method for ListConversationMessage +Retrieve a list of all messages in the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages. + * @param optional nil or *ListConversationMessageOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConversationMessageResponse +*/ +func (c *DefaultApiService) ListConversationMessage(ConversationSid string, params *ListConversationMessageParams) (*ListConversationMessageResponse, error) { + path := "/v1/Conversations/{ConversationSid}/Messages" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConversationMessageReceiptParams Optional parameters for the method 'ListConversationMessageReceipt' +type ListConversationMessageReceiptParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConversationMessageReceipt Method for ListConversationMessageReceipt +Retrieve a list of all delivery and read receipts of the conversation message + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. + * @param optional nil or *ListConversationMessageReceiptOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConversationMessageReceiptResponse +*/ +func (c *DefaultApiService) ListConversationMessageReceipt(ConversationSid string, MessageSid string, params *ListConversationMessageReceiptParams) (*ListConversationMessageReceiptResponse, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConversationParticipantParams Optional parameters for the method 'ListConversationParticipant' +type ListConversationParticipantParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConversationParticipant Method for ListConversationParticipant +Retrieve a list of all participants of the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for participants. + * @param optional nil or *ListConversationParticipantOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConversationParticipantResponse +*/ +func (c *DefaultApiService) ListConversationParticipant(ConversationSid string, params *ListConversationParticipantParams) (*ListConversationParticipantResponse, error) { + path := "/v1/Conversations/{ConversationSid}/Participants" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConversationScopedWebhookParams Optional parameters for the method 'ListConversationScopedWebhook' +type ListConversationScopedWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConversationScopedWebhook Method for ListConversationScopedWebhook +Retrieve a list of all webhooks scoped to the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param optional nil or *ListConversationScopedWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConversationScopedWebhookResponse +*/ +func (c *DefaultApiService) ListConversationScopedWebhook(ConversationSid string, params *ListConversationScopedWebhookParams) (*ListConversationScopedWebhookResponse, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialParams Optional parameters for the method 'ListCredential' +type ListCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredential Method for ListCredential +Retrieve a list of all push notification credentials on your account + * @param optional nil or *ListCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialResponse +*/ +func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoleParams Optional parameters for the method 'ListRole' +type ListRoleParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRole Method for ListRole +Retrieve a list of all user roles in your account's default service + * @param optional nil or *ListRoleOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoleResponse +*/ +func (c *DefaultApiService) ListRole(params *ListRoleParams) (*ListRoleResponse, error) { + path := "/v1/Roles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService +Retrieve a list of all conversation services on your account + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceBindingParams Optional parameters for the method 'ListServiceBinding' +type ListServiceBindingParams struct { + BindingType *[]string `json:"BindingType,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceBinding Method for ListServiceBinding +Retrieve a list of all push notification bindings in the conversation service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. + * @param optional nil or *ListServiceBindingOpts - Optional Parameters: + * @param "BindingType" ([]string) - The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. + * @param "Identity" ([]string) - The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceBindingResponse +*/ +func (c *DefaultApiService) ListServiceBinding(ChatServiceSid string, params *ListServiceBindingParams) (*ListServiceBindingResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Bindings" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceConversationParams Optional parameters for the method 'ListServiceConversation' +type ListServiceConversationParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceConversation Method for ListServiceConversation +Retrieve a list of conversations in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. + * @param optional nil or *ListServiceConversationOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceConversationResponse +*/ +func (c *DefaultApiService) ListServiceConversation(ChatServiceSid string, params *ListServiceConversationParams) (*ListServiceConversationResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceConversationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceConversationMessageParams Optional parameters for the method 'ListServiceConversationMessage' +type ListServiceConversationMessageParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceConversationMessage Method for ListServiceConversationMessage +Retrieve a list of all messages in the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages. + * @param optional nil or *ListServiceConversationMessageOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceConversationMessageResponse +*/ +func (c *DefaultApiService) ListServiceConversationMessage(ChatServiceSid string, ConversationSid string, params *ListServiceConversationMessageParams) (*ListServiceConversationMessageResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceConversationMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceConversationMessageReceiptParams Optional parameters for the method 'ListServiceConversationMessageReceipt' +type ListServiceConversationMessageReceiptParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceConversationMessageReceipt Method for ListServiceConversationMessageReceipt +Retrieve a list of all delivery and read receipts of the conversation message + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Message resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param MessageSid The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. + * @param optional nil or *ListServiceConversationMessageReceiptOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceConversationMessageReceiptResponse +*/ +func (c *DefaultApiService) ListServiceConversationMessageReceipt(ChatServiceSid string, ConversationSid string, MessageSid string, params *ListServiceConversationMessageReceiptParams) (*ListServiceConversationMessageReceiptResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"MessageSid"+"}", MessageSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceConversationMessageReceiptResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceConversationParticipantParams Optional parameters for the method 'ListServiceConversationParticipant' +type ListServiceConversationParticipantParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceConversationParticipant Method for ListServiceConversationParticipant +Retrieve a list of all participants of the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for participants. + * @param optional nil or *ListServiceConversationParticipantOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceConversationParticipantResponse +*/ +func (c *DefaultApiService) ListServiceConversationParticipant(ChatServiceSid string, ConversationSid string, params *ListServiceConversationParticipantParams) (*ListServiceConversationParticipantResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceConversationParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceConversationScopedWebhookParams Optional parameters for the method 'ListServiceConversationScopedWebhook' +type ListServiceConversationScopedWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceConversationScopedWebhook Method for ListServiceConversationScopedWebhook +Retrieve a list of all webhooks scoped to the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param optional nil or *ListServiceConversationScopedWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceConversationScopedWebhookResponse +*/ +func (c *DefaultApiService) ListServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, params *ListServiceConversationScopedWebhookParams) (*ListServiceConversationScopedWebhookResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceConversationScopedWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceRoleParams Optional parameters for the method 'ListServiceRole' +type ListServiceRoleParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceRole Method for ListServiceRole +Retrieve a list of all user roles in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to read the Role resources from. + * @param optional nil or *ListServiceRoleOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceRoleResponse +*/ +func (c *DefaultApiService) ListServiceRole(ChatServiceSid string, params *ListServiceRoleParams) (*ListServiceRoleResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Roles" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceUserParams Optional parameters for the method 'ListServiceUser' +type ListServiceUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListServiceUser Method for ListServiceUser +Retrieve a list of all conversation users in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to read the User resources from. + * @param optional nil or *ListServiceUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceUserResponse +*/ +func (c *DefaultApiService) ListServiceUser(ChatServiceSid string, params *ListServiceUserParams) (*ListServiceUserResponse, error) { + path := "/v1/Services/{ChatServiceSid}/Users" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserParams Optional parameters for the method 'ListUser' +type ListUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUser Method for ListUser +Retrieve a list of all conversation users in your account's default service + * @param optional nil or *ListUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserResponse +*/ +func (c *DefaultApiService) ListUser(params *ListUserParams) (*ListUserResponse, error) { + path := "/v1/Users" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConfigurationParams Optional parameters for the method 'UpdateConfiguration' +type UpdateConfigurationParams struct { + DefaultChatServiceSid *string `json:"DefaultChatServiceSid,omitempty"` + DefaultClosedTimer *string `json:"DefaultClosedTimer,omitempty"` + DefaultInactiveTimer *string `json:"DefaultInactiveTimer,omitempty"` + DefaultMessagingServiceSid *string `json:"DefaultMessagingServiceSid,omitempty"` +} + +/* +UpdateConfiguration Method for UpdateConfiguration +Update the global configuration of conversations on your account + * @param optional nil or *UpdateConfigurationOpts - Optional Parameters: + * @param "DefaultChatServiceSid" (string) - The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. + * @param "DefaultClosedTimer" (string) - Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + * @param "DefaultInactiveTimer" (string) - Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + * @param "DefaultMessagingServiceSid" (string) - The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. +@return ConversationsV1Configuration +*/ +func (c *DefaultApiService) UpdateConfiguration(params *UpdateConfigurationParams) (*ConversationsV1Configuration, error) { + path := "/v1/Configuration" + + + data := url.Values{} + headers := 0 + + if params != nil && params.DefaultChatServiceSid != nil { + data.Set("DefaultChatServiceSid", *params.DefaultChatServiceSid) + } + if params != nil && params.DefaultClosedTimer != nil { + data.Set("DefaultClosedTimer", *params.DefaultClosedTimer) + } + if params != nil && params.DefaultInactiveTimer != nil { + data.Set("DefaultInactiveTimer", *params.DefaultInactiveTimer) + } + if params != nil && params.DefaultMessagingServiceSid != nil { + data.Set("DefaultMessagingServiceSid", *params.DefaultMessagingServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConfigurationWebhookParams Optional parameters for the method 'UpdateConfigurationWebhook' +type UpdateConfigurationWebhookParams struct { + Filters *[]string `json:"Filters,omitempty"` + Method *string `json:"Method,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + Target *string `json:"Target,omitempty"` +} + +/* +UpdateConfigurationWebhook Method for UpdateConfigurationWebhook + * @param optional nil or *UpdateConfigurationWebhookOpts - Optional Parameters: + * @param "Filters" ([]string) - The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved` + * @param "Method" (string) - The HTTP method to be used when sending a webhook request. + * @param "PostWebhookUrl" (string) - The absolute url the post-event webhook request should be sent to. + * @param "PreWebhookUrl" (string) - The absolute url the pre-event webhook request should be sent to. + * @param "Target" (string) - The routing target of the webhook. +@return ConversationsV1ConfigurationConfigurationWebhook +*/ +func (c *DefaultApiService) UpdateConfigurationWebhook(params *UpdateConfigurationWebhookParams) (*ConversationsV1ConfigurationConfigurationWebhook, error) { + path := "/v1/Configuration/Webhooks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Filters != nil { + data.Set("Filters", strings.Join(*params.Filters, ",")) + } + if params != nil && params.Method != nil { + data.Set("Method", *params.Method) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConfigurationConfigurationWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConversationParams Optional parameters for the method 'UpdateConversation' +type UpdateConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateConversation Method for UpdateConversation +Update an existing conversation in your account's default service + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. + * @param optional nil or *UpdateConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "FriendlyName" (string) - The human-readable name of this conversation, limited to 256 characters. Optional. + * @param "MessagingServiceSid" (string) - The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + * @param "State" (string) - Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + * @param "TimersClosed" (string) - ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. +@return ConversationsV1Conversation +*/ +func (c *DefaultApiService) UpdateConversation(Sid string, params *UpdateConversationParams) (*ConversationsV1Conversation, error) { + path := "/v1/Conversations/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Conversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConversationMessageParams Optional parameters for the method 'UpdateConversationMessage' +type UpdateConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` +} + +/* +UpdateConversationMessage Method for UpdateConversationMessage +Update an existing message in the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "Author" (string) - The channel specific identifier of the message's author. Defaults to `system`. + * @param "Body" (string) - The content of the message, can be up to 1,600 characters long. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. +@return ConversationsV1ConversationConversationMessage +*/ +func (c *DefaultApiService) UpdateConversationMessage(ConversationSid string, Sid string, params *UpdateConversationMessageParams) (*ConversationsV1ConversationConversationMessage, error) { + path := "/v1/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConversationParticipantParams Optional parameters for the method 'UpdateConversationParticipant' +type UpdateConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateConversationParticipant Method for UpdateConversationParticipant +Update an existing participant in the conversation + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "Identity" (string) - A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. + * @param "LastReadMessageIndex" (*int32) - Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + * @param "LastReadTimestamp" (string) - Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + * @param "MessagingBindingProjectedAddress" (string) - The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. + * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. + * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. +@return ConversationsV1ConversationConversationParticipant +*/ +func (c *DefaultApiService) UpdateConversationParticipant(ConversationSid string, Sid string, params *UpdateConversationParticipantParams) (*ConversationsV1ConversationConversationParticipant, error) { + path := "/v1/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) + } + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConversationScopedWebhookParams Optional parameters for the method 'UpdateConversationScopedWebhook' +type UpdateConversationScopedWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` +} + +/* +UpdateConversationScopedWebhook Method for UpdateConversationScopedWebhook +Update an existing conversation-scoped webhook + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateConversationScopedWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The list of events, firing webhook event for this Conversation. + * @param "ConfigurationFlowSid" (string) - The studio flow SID, where the webhook should be sent to. + * @param "ConfigurationMethod" (string) - The HTTP method to be used when sending a webhook request. + * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. + * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. +@return ConversationsV1ConversationConversationScopedWebhook +*/ +func (c *DefaultApiService) UpdateConversationScopedWebhook(ConversationSid string, Sid string, params *UpdateConversationScopedWebhookParams) (*ConversationsV1ConversationConversationScopedWebhook, error) { + path := "/v1/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ConversationConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialParams Optional parameters for the method 'UpdateCredential' +type UpdateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +UpdateCredential Method for UpdateCredential +Update an existing push notification credential on your account + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + * @param "Certificate" (string) - [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + * @param "Type" (string) - The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. +@return ConversationsV1Credential +*/ +func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*ConversationsV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoleParams Optional parameters for the method 'UpdateRole' +type UpdateRoleParams struct { + Permission *[]string `json:"Permission,omitempty"` +} + +/* +UpdateRole Method for UpdateRole +Update an existing user role in your account's default service + * @param Sid The SID of the Role resource to update. + * @param optional nil or *UpdateRoleOpts - Optional Parameters: + * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. +@return ConversationsV1Role +*/ +func (c *DefaultApiService) UpdateRole(Sid string, params *UpdateRoleParams) (*ConversationsV1Role, error) { + path := "/v1/Roles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1Role{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceConfigurationParams Optional parameters for the method 'UpdateServiceConfiguration' +type UpdateServiceConfigurationParams struct { + DefaultChatServiceRoleSid *string `json:"DefaultChatServiceRoleSid,omitempty"` + DefaultConversationCreatorRoleSid *string `json:"DefaultConversationCreatorRoleSid,omitempty"` + DefaultConversationRoleSid *string `json:"DefaultConversationRoleSid,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` +} + +/* +UpdateServiceConfiguration Method for UpdateServiceConfiguration +Update configuration settings of a conversation service + * @param ChatServiceSid The SID of the Service configuration resource to update. + * @param optional nil or *UpdateServiceConfigurationOpts - Optional Parameters: + * @param "DefaultChatServiceRoleSid" (string) - The service-level role assigned to users when they are added to the service. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + * @param "DefaultConversationCreatorRoleSid" (string) - The conversation-level role assigned to a conversation creator when they join a new conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + * @param "DefaultConversationRoleSid" (string) - The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + * @param "ReachabilityEnabled" (bool) - Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. +@return ConversationsV1ServiceServiceConfiguration +*/ +func (c *DefaultApiService) UpdateServiceConfiguration(ChatServiceSid string, params *UpdateServiceConfigurationParams) (*ConversationsV1ServiceServiceConfiguration, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DefaultChatServiceRoleSid != nil { + data.Set("DefaultChatServiceRoleSid", *params.DefaultChatServiceRoleSid) + } + if params != nil && params.DefaultConversationCreatorRoleSid != nil { + data.Set("DefaultConversationCreatorRoleSid", *params.DefaultConversationCreatorRoleSid) + } + if params != nil && params.DefaultConversationRoleSid != nil { + data.Set("DefaultConversationRoleSid", *params.DefaultConversationRoleSid) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceConversationParams Optional parameters for the method 'UpdateServiceConversation' +type UpdateServiceConversationParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` + State *string `json:"State,omitempty"` + TimersClosed *string `json:"Timers.Closed,omitempty"` + TimersInactive *string `json:"Timers.Inactive,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateServiceConversation Method for UpdateServiceConversation +Update an existing conversation in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. + * @param Sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. + * @param optional nil or *UpdateServiceConversationOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "FriendlyName" (string) - The human-readable name of this conversation, limited to 256 characters. Optional. + * @param "MessagingServiceSid" (string) - The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + * @param "State" (string) - Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + * @param "TimersClosed" (string) - ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + * @param "TimersInactive" (string) - ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. +@return ConversationsV1ServiceServiceConversation +*/ +func (c *DefaultApiService) UpdateServiceConversation(ChatServiceSid string, Sid string, params *UpdateServiceConversationParams) (*ConversationsV1ServiceServiceConversation, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + if params != nil && params.State != nil { + data.Set("State", *params.State) + } + if params != nil && params.TimersClosed != nil { + data.Set("TimersClosed", *params.TimersClosed) + } + if params != nil && params.TimersInactive != nil { + data.Set("TimersInactive", *params.TimersInactive) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceConversationMessageParams Optional parameters for the method 'UpdateServiceConversationMessage' +type UpdateServiceConversationMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Author *string `json:"Author,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` +} + +/* +UpdateServiceConversationMessage Method for UpdateServiceConversationMessage +Update an existing message in the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateServiceConversationMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "Author" (string) - The channel specific identifier of the message's author. Defaults to `system`. + * @param "Body" (string) - The content of the message, can be up to 1,600 characters long. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. `null` if the message has not been edited. +@return ConversationsV1ServiceServiceConversationServiceConversationMessage +*/ +func (c *DefaultApiService) UpdateServiceConversationMessage(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationMessageParams) (*ConversationsV1ServiceServiceConversationServiceConversationMessage, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Author != nil { + data.Set("Author", *params.Author) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceConversationParticipantParams Optional parameters for the method 'UpdateServiceConversationParticipant' +type UpdateServiceConversationParticipantParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp *string `json:"LastReadTimestamp,omitempty"` + MessagingBindingProjectedAddress *string `json:"MessagingBinding.ProjectedAddress,omitempty"` + MessagingBindingProxyAddress *string `json:"MessagingBinding.ProxyAddress,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateServiceConversationParticipant Method for UpdateServiceConversationParticipant +Update an existing participant in the conversation + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateServiceConversationParticipantOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. + * @param "DateCreated" (time.Time) - The date that this resource was created. + * @param "DateUpdated" (time.Time) - The date that this resource was last updated. + * @param "Identity" (string) - A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. + * @param "LastReadMessageIndex" (*int32) - Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + * @param "LastReadTimestamp" (string) - Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + * @param "MessagingBindingProjectedAddress" (string) - The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. + * @param "MessagingBindingProxyAddress" (string) - The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. + * @param "RoleSid" (string) - The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. +@return ConversationsV1ServiceServiceConversationServiceConversationParticipant +*/ +func (c *DefaultApiService) UpdateServiceConversationParticipant(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationParticipantParams) (*ConversationsV1ServiceServiceConversationServiceConversationParticipant, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastReadMessageIndex != nil { + data.Set("LastReadMessageIndex", fmt.Sprint(*params.LastReadMessageIndex)) + } + if params != nil && params.LastReadTimestamp != nil { + data.Set("LastReadTimestamp", *params.LastReadTimestamp) + } + if params != nil && params.MessagingBindingProjectedAddress != nil { + data.Set("MessagingBindingProjectedAddress", *params.MessagingBindingProjectedAddress) + } + if params != nil && params.MessagingBindingProxyAddress != nil { + data.Set("MessagingBindingProxyAddress", *params.MessagingBindingProxyAddress) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceConversationScopedWebhookParams Optional parameters for the method 'UpdateServiceConversationScopedWebhook' +type UpdateServiceConversationScopedWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` +} + +/* +UpdateServiceConversationScopedWebhook Method for UpdateServiceConversationScopedWebhook +Update an existing conversation-scoped webhook + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. + * @param ConversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateServiceConversationScopedWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - The list of events, firing webhook event for this Conversation. + * @param "ConfigurationFlowSid" (string) - The studio flow SID, where the webhook should be sent to. + * @param "ConfigurationMethod" (string) - The HTTP method to be used when sending a webhook request. + * @param "ConfigurationTriggers" ([]string) - The list of keywords, firing webhook event for this Conversation. + * @param "ConfigurationUrl" (string) - The absolute url the webhook request should be sent to. +@return ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook +*/ +func (c *DefaultApiService) UpdateServiceConversationScopedWebhook(ChatServiceSid string, ConversationSid string, Sid string, params *UpdateServiceConversationScopedWebhookParams) (*ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook, error) { + path := "/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"ConversationSid"+"}", ConversationSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceNotificationParams Optional parameters for the method 'UpdateServiceNotification' +type UpdateServiceNotificationParams struct { + AddedToConversationEnabled *bool `json:"AddedToConversation.Enabled,omitempty"` + AddedToConversationSound *string `json:"AddedToConversation.Sound,omitempty"` + AddedToConversationTemplate *string `json:"AddedToConversation.Template,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + NewMessageBadgeCountEnabled *bool `json:"NewMessage.BadgeCountEnabled,omitempty"` + NewMessageEnabled *bool `json:"NewMessage.Enabled,omitempty"` + NewMessageSound *string `json:"NewMessage.Sound,omitempty"` + NewMessageTemplate *string `json:"NewMessage.Template,omitempty"` + RemovedFromConversationEnabled *bool `json:"RemovedFromConversation.Enabled,omitempty"` + RemovedFromConversationSound *string `json:"RemovedFromConversation.Sound,omitempty"` + RemovedFromConversationTemplate *string `json:"RemovedFromConversation.Template,omitempty"` +} + +/* +UpdateServiceNotification Method for UpdateServiceNotification +Update push notification service settings + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. + * @param optional nil or *UpdateServiceNotificationOpts - Optional Parameters: + * @param "AddedToConversationEnabled" (bool) - Whether to send a notification when a participant is added to a conversation. The default is `false`. + * @param "AddedToConversationSound" (string) - The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. + * @param "AddedToConversationTemplate" (string) - The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. + * @param "LogEnabled" (bool) - Weather the notification logging is enabled. + * @param "NewMessageBadgeCountEnabled" (bool) - Whether the new message badge is enabled. The default is `false`. + * @param "NewMessageEnabled" (bool) - Whether to send a notification when a new message is added to a conversation. The default is `false`. + * @param "NewMessageSound" (string) - The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`. + * @param "NewMessageTemplate" (string) - The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`. + * @param "RemovedFromConversationEnabled" (bool) - Whether to send a notification to a user when they are removed from a conversation. The default is `false`. + * @param "RemovedFromConversationSound" (string) - The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. + * @param "RemovedFromConversationTemplate" (string) - The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. +@return ConversationsV1ServiceServiceConfigurationServiceNotification +*/ +func (c *DefaultApiService) UpdateServiceNotification(ChatServiceSid string, params *UpdateServiceNotificationParams) (*ConversationsV1ServiceServiceConfigurationServiceNotification, error) { + path := "/v1/Services/{ChatServiceSid}/Configuration/Notifications" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddedToConversationEnabled != nil { + data.Set("AddedToConversationEnabled", fmt.Sprint(*params.AddedToConversationEnabled)) + } + if params != nil && params.AddedToConversationSound != nil { + data.Set("AddedToConversationSound", *params.AddedToConversationSound) + } + if params != nil && params.AddedToConversationTemplate != nil { + data.Set("AddedToConversationTemplate", *params.AddedToConversationTemplate) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.NewMessageBadgeCountEnabled != nil { + data.Set("NewMessageBadgeCountEnabled", fmt.Sprint(*params.NewMessageBadgeCountEnabled)) + } + if params != nil && params.NewMessageEnabled != nil { + data.Set("NewMessageEnabled", fmt.Sprint(*params.NewMessageEnabled)) + } + if params != nil && params.NewMessageSound != nil { + data.Set("NewMessageSound", *params.NewMessageSound) + } + if params != nil && params.NewMessageTemplate != nil { + data.Set("NewMessageTemplate", *params.NewMessageTemplate) + } + if params != nil && params.RemovedFromConversationEnabled != nil { + data.Set("RemovedFromConversationEnabled", fmt.Sprint(*params.RemovedFromConversationEnabled)) + } + if params != nil && params.RemovedFromConversationSound != nil { + data.Set("RemovedFromConversationSound", *params.RemovedFromConversationSound) + } + if params != nil && params.RemovedFromConversationTemplate != nil { + data.Set("RemovedFromConversationTemplate", *params.RemovedFromConversationTemplate) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceConfigurationServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceRoleParams Optional parameters for the method 'UpdateServiceRole' +type UpdateServiceRoleParams struct { + Permission *[]string `json:"Permission,omitempty"` +} + +/* +UpdateServiceRole Method for UpdateServiceRole +Update an existing user role in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to update the Role resource in. + * @param Sid The SID of the Role resource to update. + * @param optional nil or *UpdateServiceRoleOpts - Optional Parameters: + * @param "Permission" ([]string) - A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. +@return ConversationsV1ServiceServiceRole +*/ +func (c *DefaultApiService) UpdateServiceRole(ChatServiceSid string, Sid string, params *UpdateServiceRoleParams) (*ConversationsV1ServiceServiceRole, error) { + path := "/v1/Services/{ChatServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceUserParams Optional parameters for the method 'UpdateServiceUser' +type UpdateServiceUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateServiceUser Method for UpdateServiceUser +Update an existing conversation user in your service + * @param ChatServiceSid The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the User resource is associated with. + * @param Sid The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. + * @param optional nil or *UpdateServiceUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. +@return ConversationsV1ServiceServiceUser +*/ +func (c *DefaultApiService) UpdateServiceUser(ChatServiceSid string, Sid string, params *UpdateServiceUserParams) (*ConversationsV1ServiceServiceUser, error) { + path := "/v1/Services/{ChatServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ChatServiceSid"+"}", ChatServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1ServiceServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserParams Optional parameters for the method 'UpdateUser' +type UpdateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateUser Method for UpdateUser +Update an existing conversation user in your account's default service + * @param Sid The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. + * @param optional nil or *UpdateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "RoleSid" (string) - The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. +@return ConversationsV1User +*/ +func (c *DefaultApiService) UpdateUser(Sid string, params *UpdateUserParams) (*ConversationsV1User, error) { + path := "/v1/Users/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ConversationsV1User{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/conversations/v1/docs/ConversationsV1Configuration.md b/rest/conversations/v1/docs/ConversationsV1Configuration.md new file mode 100644 index 000000000..8a0719c5b --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1Configuration.md @@ -0,0 +1,17 @@ +# ConversationsV1Configuration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DefaultChatServiceSid** | **string** | | [optional] +**DefaultClosedTimer** | **string** | | [optional] +**DefaultInactiveTimer** | **string** | | [optional] +**DefaultMessagingServiceSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md b/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md new file mode 100644 index 000000000..512dceed8 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ConfigurationConfigurationWebhook.md @@ -0,0 +1,17 @@ +# ConversationsV1ConfigurationConfigurationWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Filters** | **[]string** | | [optional] +**Method** | **string** | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**Target** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1Conversation.md b/rest/conversations/v1/docs/ConversationsV1Conversation.md new file mode 100644 index 000000000..26a01c548 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1Conversation.md @@ -0,0 +1,23 @@ +# ConversationsV1Conversation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MessagingServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**State** | **string** | | [optional] +**Timers** | [**map[string]interface{}**](.md) | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md b/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md new file mode 100644 index 000000000..da9302c5d --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessage.md @@ -0,0 +1,24 @@ +# ConversationsV1ConversationConversationMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Author** | **string** | | [optional] +**Body** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Delivery** | [**map[string]interface{}**](.md) | | [optional] +**Index** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Media** | **[]map[string]interface{}** | | [optional] +**ParticipantSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md b/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md new file mode 100644 index 000000000..2653b53c3 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ConversationConversationMessageConversationMessageReceipt.md @@ -0,0 +1,21 @@ +# ConversationsV1ConversationConversationMessageConversationMessageReceipt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelMessageSid** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | **int32** | | [optional] +**MessageSid** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md b/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md new file mode 100644 index 000000000..0c7b124ad --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ConversationConversationParticipant.md @@ -0,0 +1,22 @@ +# ConversationsV1ConversationConversationParticipant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastReadMessageIndex** | Pointer to **int32** | | [optional] +**LastReadTimestamp** | **string** | | [optional] +**MessagingBinding** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md b/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md new file mode 100644 index 000000000..dc055a6b7 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ConversationConversationScopedWebhook.md @@ -0,0 +1,18 @@ +# ConversationsV1ConversationConversationScopedWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Sid** | **string** | | [optional] +**Target** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1Credential.md b/rest/conversations/v1/docs/ConversationsV1Credential.md new file mode 100644 index 000000000..c720ccb11 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1Credential.md @@ -0,0 +1,18 @@ +# ConversationsV1Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1Role.md b/rest/conversations/v1/docs/ConversationsV1Role.md new file mode 100644 index 000000000..a6fede42b --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1Role.md @@ -0,0 +1,19 @@ +# ConversationsV1Role + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1Service.md b/rest/conversations/v1/docs/ConversationsV1Service.md new file mode 100644 index 000000000..c50d2924b --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1Service.md @@ -0,0 +1,17 @@ +# ConversationsV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md new file mode 100644 index 000000000..6eeae2ddb --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceBinding.md @@ -0,0 +1,21 @@ +# ConversationsV1ServiceServiceBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**MessageTypes** | **[]string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md new file mode 100644 index 000000000..e898ef8a1 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfiguration.md @@ -0,0 +1,17 @@ +# ConversationsV1ServiceServiceConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChatServiceSid** | **string** | | [optional] +**DefaultChatServiceRoleSid** | **string** | | [optional] +**DefaultConversationCreatorRoleSid** | **string** | | [optional] +**DefaultConversationRoleSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md new file mode 100644 index 000000000..9c4bfa232 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConfigurationServiceNotification.md @@ -0,0 +1,17 @@ +# ConversationsV1ServiceServiceConfigurationServiceNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddedToConversation** | [**map[string]interface{}**](.md) | | [optional] +**ChatServiceSid** | **string** | | [optional] +**LogEnabled** | **bool** | | [optional] +**NewMessage** | [**map[string]interface{}**](.md) | | [optional] +**RemovedFromConversation** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md new file mode 100644 index 000000000..2af72de22 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversation.md @@ -0,0 +1,23 @@ +# ConversationsV1ServiceServiceConversation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MessagingServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**State** | **string** | | [optional] +**Timers** | [**map[string]interface{}**](.md) | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md new file mode 100644 index 000000000..083717435 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessage.md @@ -0,0 +1,25 @@ +# ConversationsV1ServiceServiceConversationServiceConversationMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Author** | **string** | | [optional] +**Body** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Delivery** | [**map[string]interface{}**](.md) | | [optional] +**Index** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Media** | **[]map[string]interface{}** | | [optional] +**ParticipantSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md new file mode 100644 index 000000000..fab08e042 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt.md @@ -0,0 +1,22 @@ +# ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelMessageSid** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | **int32** | | [optional] +**MessageSid** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md new file mode 100644 index 000000000..0bf9d2a54 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationParticipant.md @@ -0,0 +1,23 @@ +# ConversationsV1ServiceServiceConversationServiceConversationParticipant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastReadMessageIndex** | Pointer to **int32** | | [optional] +**LastReadTimestamp** | **string** | | [optional] +**MessagingBinding** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md new file mode 100644 index 000000000..0c13f0626 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook.md @@ -0,0 +1,19 @@ +# ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**ConversationSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Sid** | **string** | | [optional] +**Target** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md new file mode 100644 index 000000000..cb51c169f --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceRole.md @@ -0,0 +1,19 @@ +# ConversationsV1ServiceServiceRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md b/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md new file mode 100644 index 000000000..73813f336 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1ServiceServiceUser.md @@ -0,0 +1,22 @@ +# ConversationsV1ServiceServiceUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**RoleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ConversationsV1User.md b/rest/conversations/v1/docs/ConversationsV1User.md new file mode 100644 index 000000000..fbd820a72 --- /dev/null +++ b/rest/conversations/v1/docs/ConversationsV1User.md @@ -0,0 +1,22 @@ +# ConversationsV1User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**RoleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateConversationMessageRequest.md b/rest/conversations/v1/docs/CreateConversationMessageRequest.md new file mode 100644 index 000000000..825b071ed --- /dev/null +++ b/rest/conversations/v1/docs/CreateConversationMessageRequest.md @@ -0,0 +1,16 @@ +# CreateConversationMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. | [optional] +**Body** | **string** | The content of the message, can be up to 1,600 characters long. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. `null` if the message has not been edited. | [optional] +**MediaSid** | **string** | The Media SID to be attached to the new Message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateConversationParticipantRequest.md b/rest/conversations/v1/docs/CreateConversationParticipantRequest.md new file mode 100644 index 000000000..ead783a98 --- /dev/null +++ b/rest/conversations/v1/docs/CreateConversationParticipantRequest.md @@ -0,0 +1,18 @@ +# CreateConversationParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**Identity** | **string** | A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. | [optional] +**MessagingBindingAddress** | **string** | The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | [optional] +**MessagingBindingProjectedAddress** | **string** | The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. | [optional] +**MessagingBindingProxyAddress** | **string** | The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | [optional] +**RoleSid** | **string** | The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateConversationRequest.md b/rest/conversations/v1/docs/CreateConversationRequest.md new file mode 100644 index 000000000..395cd509c --- /dev/null +++ b/rest/conversations/v1/docs/CreateConversationRequest.md @@ -0,0 +1,19 @@ +# CreateConversationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional. | [optional] +**MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | [optional] +**State** | **string** | Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | [optional] +**TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | [optional] +**TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateConversationScopedWebhookRequest.md b/rest/conversations/v1/docs/CreateConversationScopedWebhookRequest.md new file mode 100644 index 000000000..59bd5b346 --- /dev/null +++ b/rest/conversations/v1/docs/CreateConversationScopedWebhookRequest.md @@ -0,0 +1,17 @@ +# CreateConversationScopedWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The list of events, firing webhook event for this Conversation. | [optional] +**ConfigurationFlowSid** | **string** | The studio flow SID, where the webhook should be sent to. | [optional] +**ConfigurationMethod** | **string** | The HTTP method to be used when sending a webhook request. | [optional] +**ConfigurationReplayAfter** | **int32** | The message index for which and it's successors the webhook will be replayed. Not set by default | [optional] +**ConfigurationTriggers** | **[]string** | The list of keywords, firing webhook event for this Conversation. | [optional] +**ConfigurationUrl** | **string** | The absolute url the webhook request should be sent to. | [optional] +**Target** | **string** | The target of this webhook: `webhook`, `studio`, `trigger` | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateCredentialRequest.md b/rest/conversations/v1/docs/CreateCredentialRequest.md new file mode 100644 index 000000000..3484fe761 --- /dev/null +++ b/rest/conversations/v1/docs/CreateCredentialRequest.md @@ -0,0 +1,17 @@ +# CreateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] +**Type** | **string** | The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateRoleRequest.md b/rest/conversations/v1/docs/CreateRoleRequest.md new file mode 100644 index 000000000..a08585b91 --- /dev/null +++ b/rest/conversations/v1/docs/CreateRoleRequest.md @@ -0,0 +1,13 @@ +# CreateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | +**Permission** | **[]string** | A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | +**Type** | **string** | The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceConversationMessageRequest.md b/rest/conversations/v1/docs/CreateServiceConversationMessageRequest.md new file mode 100644 index 000000000..3f642b8e9 --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceConversationMessageRequest.md @@ -0,0 +1,16 @@ +# CreateServiceConversationMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. | [optional] +**Body** | **string** | The content of the message, can be up to 1,600 characters long. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. `null` if the message has not been edited. | [optional] +**MediaSid** | **string** | The Media SID to be attached to the new Message. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceConversationParticipantRequest.md b/rest/conversations/v1/docs/CreateServiceConversationParticipantRequest.md new file mode 100644 index 000000000..1b79380ef --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceConversationParticipantRequest.md @@ -0,0 +1,18 @@ +# CreateServiceConversationParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**Identity** | **string** | A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. | [optional] +**MessagingBindingAddress** | **string** | The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | [optional] +**MessagingBindingProjectedAddress** | **string** | The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. | [optional] +**MessagingBindingProxyAddress** | **string** | The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | [optional] +**RoleSid** | **string** | The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceConversationRequest.md b/rest/conversations/v1/docs/CreateServiceConversationRequest.md new file mode 100644 index 000000000..e945bf65c --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceConversationRequest.md @@ -0,0 +1,19 @@ +# CreateServiceConversationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional. | [optional] +**MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | [optional] +**State** | **string** | Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | [optional] +**TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | [optional] +**TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceConversationScopedWebhookRequest.md b/rest/conversations/v1/docs/CreateServiceConversationScopedWebhookRequest.md new file mode 100644 index 000000000..b815fd288 --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceConversationScopedWebhookRequest.md @@ -0,0 +1,17 @@ +# CreateServiceConversationScopedWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The list of events, firing webhook event for this Conversation. | [optional] +**ConfigurationFlowSid** | **string** | The studio flow SID, where the webhook should be sent to. | [optional] +**ConfigurationMethod** | **string** | The HTTP method to be used when sending a webhook request. | [optional] +**ConfigurationReplayAfter** | **int32** | The message index for which and it's successors the webhook will be replayed. Not set by default | [optional] +**ConfigurationTriggers** | **[]string** | The list of keywords, firing webhook event for this Conversation. | [optional] +**ConfigurationUrl** | **string** | The absolute url the webhook request should be sent to. | [optional] +**Target** | **string** | The target of this webhook: `webhook`, `studio`, `trigger` | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceRequest.md b/rest/conversations/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..6ccc55b3c --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceRequest.md @@ -0,0 +1,11 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | The human-readable name of this service, limited to 256 characters. Optional. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceRoleRequest.md b/rest/conversations/v1/docs/CreateServiceRoleRequest.md new file mode 100644 index 000000000..a0e131958 --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceRoleRequest.md @@ -0,0 +1,13 @@ +# CreateServiceRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | +**Permission** | **[]string** | A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | +**Type** | **string** | The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateServiceUserRequest.md b/rest/conversations/v1/docs/CreateServiceUserRequest.md new file mode 100644 index 000000000..35b91307b --- /dev/null +++ b/rest/conversations/v1/docs/CreateServiceUserRequest.md @@ -0,0 +1,14 @@ +# CreateServiceUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] +**Identity** | **string** | The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. | +**RoleSid** | **string** | The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/CreateUserRequest.md b/rest/conversations/v1/docs/CreateUserRequest.md new file mode 100644 index 000000000..60fc0cf87 --- /dev/null +++ b/rest/conversations/v1/docs/CreateUserRequest.md @@ -0,0 +1,14 @@ +# CreateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] +**Identity** | **string** | The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. | +**RoleSid** | **string** | The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/DefaultApi.md b/rest/conversations/v1/docs/DefaultApi.md new file mode 100644 index 000000000..563e93ba1 --- /dev/null +++ b/rest/conversations/v1/docs/DefaultApi.md @@ -0,0 +1,3773 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateConversation**](DefaultApi.md#CreateConversation) | **Post** /v1/Conversations | +[**CreateConversationMessage**](DefaultApi.md#CreateConversationMessage) | **Post** /v1/Conversations/{ConversationSid}/Messages | +[**CreateConversationParticipant**](DefaultApi.md#CreateConversationParticipant) | **Post** /v1/Conversations/{ConversationSid}/Participants | +[**CreateConversationScopedWebhook**](DefaultApi.md#CreateConversationScopedWebhook) | **Post** /v1/Conversations/{ConversationSid}/Webhooks | +[**CreateCredential**](DefaultApi.md#CreateCredential) | **Post** /v1/Credentials | +[**CreateRole**](DefaultApi.md#CreateRole) | **Post** /v1/Roles | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateServiceConversation**](DefaultApi.md#CreateServiceConversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations | +[**CreateServiceConversationMessage**](DefaultApi.md#CreateServiceConversationMessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | +[**CreateServiceConversationParticipant**](DefaultApi.md#CreateServiceConversationParticipant) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants | +[**CreateServiceConversationScopedWebhook**](DefaultApi.md#CreateServiceConversationScopedWebhook) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks | +[**CreateServiceRole**](DefaultApi.md#CreateServiceRole) | **Post** /v1/Services/{ChatServiceSid}/Roles | +[**CreateServiceUser**](DefaultApi.md#CreateServiceUser) | **Post** /v1/Services/{ChatServiceSid}/Users | +[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /v1/Users | +[**DeleteConversation**](DefaultApi.md#DeleteConversation) | **Delete** /v1/Conversations/{Sid} | +[**DeleteConversationMessage**](DefaultApi.md#DeleteConversationMessage) | **Delete** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +[**DeleteConversationParticipant**](DefaultApi.md#DeleteConversationParticipant) | **Delete** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +[**DeleteConversationScopedWebhook**](DefaultApi.md#DeleteConversationScopedWebhook) | **Delete** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**DeleteCredential**](DefaultApi.md#DeleteCredential) | **Delete** /v1/Credentials/{Sid} | +[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /v1/Roles/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteServiceBinding**](DefaultApi.md#DeleteServiceBinding) | **Delete** /v1/Services/{ChatServiceSid}/Bindings/{Sid} | +[**DeleteServiceConversation**](DefaultApi.md#DeleteServiceConversation) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +[**DeleteServiceConversationMessage**](DefaultApi.md#DeleteServiceConversationMessage) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +[**DeleteServiceConversationParticipant**](DefaultApi.md#DeleteServiceConversationParticipant) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +[**DeleteServiceConversationScopedWebhook**](DefaultApi.md#DeleteServiceConversationScopedWebhook) | **Delete** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**DeleteServiceRole**](DefaultApi.md#DeleteServiceRole) | **Delete** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +[**DeleteServiceUser**](DefaultApi.md#DeleteServiceUser) | **Delete** /v1/Services/{ChatServiceSid}/Users/{Sid} | +[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /v1/Users/{Sid} | +[**FetchConfiguration**](DefaultApi.md#FetchConfiguration) | **Get** /v1/Configuration | +[**FetchConfigurationWebhook**](DefaultApi.md#FetchConfigurationWebhook) | **Get** /v1/Configuration/Webhooks | +[**FetchConversation**](DefaultApi.md#FetchConversation) | **Get** /v1/Conversations/{Sid} | +[**FetchConversationMessage**](DefaultApi.md#FetchConversationMessage) | **Get** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +[**FetchConversationMessageReceipt**](DefaultApi.md#FetchConversationMessageReceipt) | **Get** /v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid} | +[**FetchConversationParticipant**](DefaultApi.md#FetchConversationParticipant) | **Get** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +[**FetchConversationScopedWebhook**](DefaultApi.md#FetchConversationScopedWebhook) | **Get** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**FetchCredential**](DefaultApi.md#FetchCredential) | **Get** /v1/Credentials/{Sid} | +[**FetchRole**](DefaultApi.md#FetchRole) | **Get** /v1/Roles/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchServiceBinding**](DefaultApi.md#FetchServiceBinding) | **Get** /v1/Services/{ChatServiceSid}/Bindings/{Sid} | +[**FetchServiceConfiguration**](DefaultApi.md#FetchServiceConfiguration) | **Get** /v1/Services/{ChatServiceSid}/Configuration | +[**FetchServiceConversation**](DefaultApi.md#FetchServiceConversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +[**FetchServiceConversationMessage**](DefaultApi.md#FetchServiceConversationMessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +[**FetchServiceConversationMessageReceipt**](DefaultApi.md#FetchServiceConversationMessageReceipt) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid} | +[**FetchServiceConversationParticipant**](DefaultApi.md#FetchServiceConversationParticipant) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +[**FetchServiceConversationScopedWebhook**](DefaultApi.md#FetchServiceConversationScopedWebhook) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**FetchServiceNotification**](DefaultApi.md#FetchServiceNotification) | **Get** /v1/Services/{ChatServiceSid}/Configuration/Notifications | +[**FetchServiceRole**](DefaultApi.md#FetchServiceRole) | **Get** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +[**FetchServiceUser**](DefaultApi.md#FetchServiceUser) | **Get** /v1/Services/{ChatServiceSid}/Users/{Sid} | +[**FetchUser**](DefaultApi.md#FetchUser) | **Get** /v1/Users/{Sid} | +[**ListConversation**](DefaultApi.md#ListConversation) | **Get** /v1/Conversations | +[**ListConversationMessage**](DefaultApi.md#ListConversationMessage) | **Get** /v1/Conversations/{ConversationSid}/Messages | +[**ListConversationMessageReceipt**](DefaultApi.md#ListConversationMessageReceipt) | **Get** /v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts | +[**ListConversationParticipant**](DefaultApi.md#ListConversationParticipant) | **Get** /v1/Conversations/{ConversationSid}/Participants | +[**ListConversationScopedWebhook**](DefaultApi.md#ListConversationScopedWebhook) | **Get** /v1/Conversations/{ConversationSid}/Webhooks | +[**ListCredential**](DefaultApi.md#ListCredential) | **Get** /v1/Credentials | +[**ListRole**](DefaultApi.md#ListRole) | **Get** /v1/Roles | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListServiceBinding**](DefaultApi.md#ListServiceBinding) | **Get** /v1/Services/{ChatServiceSid}/Bindings | +[**ListServiceConversation**](DefaultApi.md#ListServiceConversation) | **Get** /v1/Services/{ChatServiceSid}/Conversations | +[**ListServiceConversationMessage**](DefaultApi.md#ListServiceConversationMessage) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages | +[**ListServiceConversationMessageReceipt**](DefaultApi.md#ListServiceConversationMessageReceipt) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts | +[**ListServiceConversationParticipant**](DefaultApi.md#ListServiceConversationParticipant) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants | +[**ListServiceConversationScopedWebhook**](DefaultApi.md#ListServiceConversationScopedWebhook) | **Get** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks | +[**ListServiceRole**](DefaultApi.md#ListServiceRole) | **Get** /v1/Services/{ChatServiceSid}/Roles | +[**ListServiceUser**](DefaultApi.md#ListServiceUser) | **Get** /v1/Services/{ChatServiceSid}/Users | +[**ListUser**](DefaultApi.md#ListUser) | **Get** /v1/Users | +[**UpdateConfiguration**](DefaultApi.md#UpdateConfiguration) | **Post** /v1/Configuration | +[**UpdateConfigurationWebhook**](DefaultApi.md#UpdateConfigurationWebhook) | **Post** /v1/Configuration/Webhooks | +[**UpdateConversation**](DefaultApi.md#UpdateConversation) | **Post** /v1/Conversations/{Sid} | +[**UpdateConversationMessage**](DefaultApi.md#UpdateConversationMessage) | **Post** /v1/Conversations/{ConversationSid}/Messages/{Sid} | +[**UpdateConversationParticipant**](DefaultApi.md#UpdateConversationParticipant) | **Post** /v1/Conversations/{ConversationSid}/Participants/{Sid} | +[**UpdateConversationScopedWebhook**](DefaultApi.md#UpdateConversationScopedWebhook) | **Post** /v1/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**UpdateCredential**](DefaultApi.md#UpdateCredential) | **Post** /v1/Credentials/{Sid} | +[**UpdateRole**](DefaultApi.md#UpdateRole) | **Post** /v1/Roles/{Sid} | +[**UpdateServiceConfiguration**](DefaultApi.md#UpdateServiceConfiguration) | **Post** /v1/Services/{ChatServiceSid}/Configuration | +[**UpdateServiceConversation**](DefaultApi.md#UpdateServiceConversation) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{Sid} | +[**UpdateServiceConversationMessage**](DefaultApi.md#UpdateServiceConversationMessage) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid} | +[**UpdateServiceConversationParticipant**](DefaultApi.md#UpdateServiceConversationParticipant) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid} | +[**UpdateServiceConversationScopedWebhook**](DefaultApi.md#UpdateServiceConversationScopedWebhook) | **Post** /v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Webhooks/{Sid} | +[**UpdateServiceNotification**](DefaultApi.md#UpdateServiceNotification) | **Post** /v1/Services/{ChatServiceSid}/Configuration/Notifications | +[**UpdateServiceRole**](DefaultApi.md#UpdateServiceRole) | **Post** /v1/Services/{ChatServiceSid}/Roles/{Sid} | +[**UpdateServiceUser**](DefaultApi.md#UpdateServiceUser) | **Post** /v1/Services/{ChatServiceSid}/Users/{Sid} | +[**UpdateUser**](DefaultApi.md#UpdateUser) | **Post** /v1/Users/{Sid} | + + + +## CreateConversation + +> ConversationsV1Conversation CreateConversation(ctx, optional) + + + +Create a new conversation in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **FriendlyName** | **optional.String**| The human-readable name of this conversation, limited to 256 characters. Optional. | + **MessagingServiceSid** | **optional.String**| The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | + **State** | **optional.String**| Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | + **TimersClosed** | **optional.String**| ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | + **TimersInactive** | **optional.String**| ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | + +### Return type + +[**ConversationsV1Conversation**](conversations.v1.conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateConversationMessage + +> ConversationsV1ConversationConversationMessage CreateConversationMessage(ctx, ConversationSid, optional) + + + +Add a new message to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | + **optional** | ***CreateConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **Author** | **optional.String**| The channel specific identifier of the message's author. Defaults to `system`. | + **Body** | **optional.String**| The content of the message, can be up to 1,600 characters long. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. `null` if the message has not been edited. | + **MediaSid** | **optional.String**| The Media SID to be attached to the new Message. | + +### Return type + +[**ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateConversationParticipant + +> ConversationsV1ConversationConversationParticipant CreateConversationParticipant(ctx, ConversationSid, optional) + + + +Add a new participant to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | + **optional** | ***CreateConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **Identity** | **optional.String**| A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. | + **MessagingBindingAddress** | **optional.String**| The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | + **MessagingBindingProjectedAddress** | **optional.String**| The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. | + **MessagingBindingProxyAddress** | **optional.String**| The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | + **RoleSid** | **optional.String**| The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | + +### Return type + +[**ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateConversationScopedWebhook + +> ConversationsV1ConversationConversationScopedWebhook CreateConversationScopedWebhook(ctx, ConversationSid, optional) + + + +Create a new webhook scoped to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | + **optional** | ***CreateConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The list of events, firing webhook event for this Conversation. | + **ConfigurationFlowSid** | **optional.String**| The studio flow SID, where the webhook should be sent to. | + **ConfigurationMethod** | **optional.String**| The HTTP method to be used when sending a webhook request. | + **ConfigurationReplayAfter** | **optional.Int32**| The message index for which and it's successors the webhook will be replayed. Not set by default | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| The list of keywords, firing webhook event for this Conversation. | + **ConfigurationUrl** | **optional.String**| The absolute url the webhook request should be sent to. | + **Target** | **optional.String**| The target of this webhook: `webhook`, `studio`, `trigger` | + +### Return type + +[**ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredential + +> ConversationsV1Credential CreateCredential(ctx, optional) + + + +Add a new push notification credential to your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + **Type** | **optional.String**| The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. | + +### Return type + +[**ConversationsV1Credential**](conversations.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRole + +> ConversationsV1Role CreateRole(ctx, optional) + + + +Create a new user role in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | + **Type** | **optional.String**| The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. | + +### Return type + +[**ConversationsV1Role**](conversations.v1.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> ConversationsV1Service CreateService(ctx, optional) + + + +Create a new conversation service on your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| The human-readable name of this service, limited to 256 characters. Optional. | + +### Return type + +[**ConversationsV1Service**](conversations.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceConversation + +> ConversationsV1ServiceServiceConversation CreateServiceConversation(ctx, ChatServiceSid, optional) + + + +Create a new conversation in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. | + **optional** | ***CreateServiceConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **FriendlyName** | **optional.String**| The human-readable name of this conversation, limited to 256 characters. Optional. | + **MessagingServiceSid** | **optional.String**| The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | + **State** | **optional.String**| Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | + **TimersClosed** | **optional.String**| ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | + **TimersInactive** | **optional.String**| ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | + +### Return type + +[**ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceConversationMessage + +> ConversationsV1ServiceServiceConversationServiceConversationMessage CreateServiceConversationMessage(ctx, ChatServiceSid, ConversationSid, optional) + + + +Add a new message to the conversation in a specific service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | + **optional** | ***CreateServiceConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **Author** | **optional.String**| The channel specific identifier of the message's author. Defaults to `system`. | + **Body** | **optional.String**| The content of the message, can be up to 1,600 characters long. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. `null` if the message has not been edited. | + **MediaSid** | **optional.String**| The Media SID to be attached to the new Message. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceConversationParticipant + +> ConversationsV1ServiceServiceConversationServiceConversationParticipant CreateServiceConversationParticipant(ctx, ChatServiceSid, ConversationSid, optional) + + + +Add a new participant to the conversation in a specific service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | + **optional** | ***CreateServiceConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **Identity** | **optional.String**| A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. | + **MessagingBindingAddress** | **optional.String**| The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | + **MessagingBindingProjectedAddress** | **optional.String**| The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. | + **MessagingBindingProxyAddress** | **optional.String**| The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). | + **RoleSid** | **optional.String**| The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceConversationScopedWebhook + +> ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook CreateServiceConversationScopedWebhook(ctx, ChatServiceSid, ConversationSid, optional) + + + +Create a new webhook scoped to the conversation in a specific service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | + **optional** | ***CreateServiceConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The list of events, firing webhook event for this Conversation. | + **ConfigurationFlowSid** | **optional.String**| The studio flow SID, where the webhook should be sent to. | + **ConfigurationMethod** | **optional.String**| The HTTP method to be used when sending a webhook request. | + **ConfigurationReplayAfter** | **optional.Int32**| The message index for which and it's successors the webhook will be replayed. Not set by default | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| The list of keywords, firing webhook event for this Conversation. | + **ConfigurationUrl** | **optional.String**| The absolute url the webhook request should be sent to. | + **Target** | **optional.String**| The target of this webhook: `webhook`, `studio`, `trigger` | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceRole + +> ConversationsV1ServiceServiceRole CreateServiceRole(ctx, ChatServiceSid, optional) + + + +Create a new user role in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to create the Role resource under. | + **optional** | ***CreateServiceRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. | + **Type** | **optional.String**| The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. | + +### Return type + +[**ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateServiceUser + +> ConversationsV1ServiceServiceUser CreateServiceUser(ctx, ChatServiceSid, optional) + + + +Add a new conversation user to your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the User resource is associated with. | + **optional** | ***CreateServiceUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **Identity** | **optional.String**| The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. | + **RoleSid** | **optional.String**| The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | + +### Return type + +[**ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> ConversationsV1User CreateUser(ctx, optional) + + + +Add a new conversation user to your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **Identity** | **optional.String**| The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. | + **RoleSid** | **optional.String**| The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | + +### Return type + +[**ConversationsV1User**](conversations.v1.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConversation + +> DeleteConversation(ctx, Sid, optional) + + + +Remove a conversation from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + **optional** | ***DeleteConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConversationMessage + +> DeleteConversationMessage(ctx, ConversationSid, Sid, optional) + + + +Remove a message from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***DeleteConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConversationParticipant + +> DeleteConversationParticipant(ctx, ConversationSid, Sid, optional) + + + +Remove a participant from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***DeleteConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConversationScopedWebhook + +> DeleteConversationScopedWebhook(ctx, ConversationSid, Sid) + + + +Remove an existing webhook scoped to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteCredential(ctx, Sid) + + + +Remove a push notification credential from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, Sid) + + + +Remove a user role from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Role resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +Remove a conversation service with all its nested resources from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceBinding + +> DeleteServiceBinding(ctx, ChatServiceSid, Sid) + + + +Remove a push notification binding from the conversation service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Binding resource from. | +**Sid** | **string**| The SID of the Binding resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceConversation + +> DeleteServiceConversation(ctx, ChatServiceSid, Sid, optional) + + + +Remove a conversation from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + **optional** | ***DeleteServiceConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteServiceConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceConversationMessage + +> DeleteServiceConversationMessage(ctx, ChatServiceSid, ConversationSid, Sid, optional) + + + +Remove a message from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***DeleteServiceConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteServiceConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceConversationParticipant + +> DeleteServiceConversationParticipant(ctx, ChatServiceSid, ConversationSid, Sid, optional) + + + +Remove a participant from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***DeleteServiceConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteServiceConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceConversationScopedWebhook + +> DeleteServiceConversationScopedWebhook(ctx, ChatServiceSid, ConversationSid, Sid) + + + +Remove an existing webhook scoped to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceRole + +> DeleteServiceRole(ctx, ChatServiceSid, Sid) + + + +Remove a user role from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the Role resource from. | +**Sid** | **string**| The SID of the Role resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceUser + +> DeleteServiceUser(ctx, ChatServiceSid, Sid, optional) + + + +Remove a conversation user from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to delete the User resource from. | +**Sid** | **string**| The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. | + **optional** | ***DeleteServiceUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteServiceUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, Sid, optional) + + + +Remove a conversation user from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete. | + **optional** | ***DeleteUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConfiguration + +> ConversationsV1Configuration FetchConfiguration(ctx, ) + + + +Fetch the global configuration of conversations on your account + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ConversationsV1Configuration**](conversations.v1.configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConfigurationWebhook + +> ConversationsV1ConfigurationConfigurationWebhook FetchConfigurationWebhook(ctx, ) + + + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ConversationsV1ConfigurationConfigurationWebhook**](conversations.v1.configuration.configuration_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConversation + +> ConversationsV1Conversation FetchConversation(ctx, Sid) + + + +Fetch a conversation from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + +### Return type + +[**ConversationsV1Conversation**](conversations.v1.conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConversationMessage + +> ConversationsV1ConversationConversationMessage FetchConversationMessage(ctx, ConversationSid, Sid) + + + +Fetch a message from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConversationMessageReceipt + +> ConversationsV1ConversationConversationMessageConversationMessageReceipt FetchConversationMessageReceipt(ctx, ConversationSid, MessageSid, Sid) + + + +Fetch the delivery and read receipts of the conversation message + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**MessageSid** | **string**| The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ConversationConversationMessageConversationMessageReceipt**](conversations.v1.conversation.conversation_message.conversation_message_receipt.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConversationParticipant + +> ConversationsV1ConversationConversationParticipant FetchConversationParticipant(ctx, ConversationSid, Sid) + + + +Fetch a participant of the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConversationScopedWebhook + +> ConversationsV1ConversationConversationScopedWebhook FetchConversationScopedWebhook(ctx, ConversationSid, Sid) + + + +Fetch the configuration of a conversation-scoped webhook + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredential + +> ConversationsV1Credential FetchCredential(ctx, Sid) + + + +Fetch a push notification credential from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1Credential**](conversations.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRole + +> ConversationsV1Role FetchRole(ctx, Sid) + + + +Fetch a user role from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Role resource to fetch. | + +### Return type + +[**ConversationsV1Role**](conversations.v1.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> ConversationsV1Service FetchService(ctx, Sid) + + + +Fetch a conversation service from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1Service**](conversations.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceBinding + +> ConversationsV1ServiceServiceBinding FetchServiceBinding(ctx, ChatServiceSid, Sid) + + + +Fetch a push notification binding from the conversation service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ServiceServiceBinding**](conversations.v1.service.service_binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConfiguration + +> ConversationsV1ServiceServiceConfiguration FetchServiceConfiguration(ctx, ChatServiceSid) + + + +Fetch the configuration of a conversation service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the Service configuration resource to fetch. | + +### Return type + +[**ConversationsV1ServiceServiceConfiguration**](conversations.v1.service.service_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConversation + +> ConversationsV1ServiceServiceConversation FetchServiceConversation(ctx, ChatServiceSid, Sid) + + + +Fetch a conversation from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + +### Return type + +[**ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConversationMessage + +> ConversationsV1ServiceServiceConversationServiceConversationMessage FetchServiceConversationMessage(ctx, ChatServiceSid, ConversationSid, Sid) + + + +Fetch a message from the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConversationMessageReceipt + +> ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt FetchServiceConversationMessageReceipt(ctx, ChatServiceSid, ConversationSid, MessageSid, Sid) + + + +Fetch the delivery and read receipts of the conversation message + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Message resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**MessageSid** | **string**| The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt**](conversations.v1.service.service_conversation.service_conversation_message.service_conversation_message_receipt.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConversationParticipant + +> ConversationsV1ServiceServiceConversationServiceConversationParticipant FetchServiceConversationParticipant(ctx, ChatServiceSid, ConversationSid, Sid) + + + +Fetch a participant of the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceConversationScopedWebhook + +> ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook FetchServiceConversationScopedWebhook(ctx, ChatServiceSid, ConversationSid, Sid) + + + +Fetch the configuration of a conversation-scoped webhook + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceNotification + +> ConversationsV1ServiceServiceConfigurationServiceNotification FetchServiceNotification(ctx, ChatServiceSid) + + + +Fetch push notification service settings + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. | + +### Return type + +[**ConversationsV1ServiceServiceConfigurationServiceNotification**](conversations.v1.service.service_configuration.service_notification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceRole + +> ConversationsV1ServiceServiceRole FetchServiceRole(ctx, ChatServiceSid, Sid) + + + +Fetch a user role from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the Role resource from. | +**Sid** | **string**| The SID of the Role resource to fetch. | + +### Return type + +[**ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchServiceUser + +> ConversationsV1ServiceServiceUser FetchServiceUser(ctx, ChatServiceSid, Sid) + + + +Fetch a conversation user from your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to fetch the User resource from. | +**Sid** | **string**| The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. | + +### Return type + +[**ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUser + +> ConversationsV1User FetchUser(ctx, Sid) + + + +Fetch a conversation user from your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch. | + +### Return type + +[**ConversationsV1User**](conversations.v1.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConversation + +> ListConversationResponse ListConversation(ctx, optional) + + + +Retrieve a list of conversations in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConversationResponse**](ListConversationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConversationMessage + +> ListConversationMessageResponse ListConversationMessage(ctx, ConversationSid, optional) + + + +Retrieve a list of all messages in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages. | + **optional** | ***ListConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConversationMessageResponse**](ListConversationMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConversationMessageReceipt + +> ListConversationMessageReceiptResponse ListConversationMessageReceipt(ctx, ConversationSid, MessageSid, optional) + + + +Retrieve a list of all delivery and read receipts of the conversation message + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**MessageSid** | **string**| The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. | + **optional** | ***ListConversationMessageReceiptOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConversationMessageReceiptOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConversationMessageReceiptResponse**](ListConversationMessageReceiptResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConversationParticipant + +> ListConversationParticipantResponse ListConversationParticipant(ctx, ConversationSid, optional) + + + +Retrieve a list of all participants of the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for participants. | + **optional** | ***ListConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConversationParticipantResponse**](ListConversationParticipantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConversationScopedWebhook + +> ListConversationScopedWebhookResponse ListConversationScopedWebhook(ctx, ConversationSid, optional) + + + +Retrieve a list of all webhooks scoped to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | + **optional** | ***ListConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConversationScopedWebhookResponse**](ListConversationScopedWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredential + +> ListCredentialResponse ListCredential(ctx, optional) + + + +Retrieve a list of all push notification credentials on your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRole + +> ListRoleResponse ListRole(ctx, optional) + + + +Retrieve a list of all user roles in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoleResponse**](ListRoleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +Retrieve a list of all conversation services on your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceBinding + +> ListServiceBindingResponse ListServiceBinding(ctx, ChatServiceSid, optional) + + + +Retrieve a list of all push notification bindings in the conversation service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Binding resource is associated with. | + **optional** | ***ListServiceBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **BindingType** | [**optional.Interface of []string**](string.md)| The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info. | + **Identity** | [**optional.Interface of []string**](string.md)| The identity of a [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource) this binding belongs to. See [access tokens](https://www.twilio.com/docs/conversations/create-tokens) for more details. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceBindingResponse**](ListServiceBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceConversation + +> ListServiceConversationResponse ListServiceConversation(ctx, ChatServiceSid, optional) + + + +Retrieve a list of conversations in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. | + **optional** | ***ListServiceConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceConversationResponse**](ListServiceConversationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceConversationMessage + +> ListServiceConversationMessageResponse ListServiceConversationMessage(ctx, ChatServiceSid, ConversationSid, optional) + + + +Retrieve a list of all messages in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for messages. | + **optional** | ***ListServiceConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceConversationMessageResponse**](ListServiceConversationMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceConversationMessageReceipt + +> ListServiceConversationMessageReceiptResponse ListServiceConversationMessageReceipt(ctx, ChatServiceSid, ConversationSid, MessageSid, optional) + + + +Retrieve a list of all delivery and read receipts of the conversation message + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Message resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**MessageSid** | **string**| The SID of the message within a [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) the delivery receipt belongs to. | + **optional** | ***ListServiceConversationMessageReceiptOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceConversationMessageReceiptOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceConversationMessageReceiptResponse**](ListServiceConversationMessageReceiptResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceConversationParticipant + +> ListServiceConversationParticipantResponse ListServiceConversationParticipant(ctx, ChatServiceSid, ConversationSid, optional) + + + +Retrieve a list of all participants of the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for participants. | + **optional** | ***ListServiceConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceConversationParticipantResponse**](ListServiceConversationParticipantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceConversationScopedWebhook + +> ListServiceConversationScopedWebhookResponse ListServiceConversationScopedWebhook(ctx, ChatServiceSid, ConversationSid, optional) + + + +Retrieve a list of all webhooks scoped to the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | + **optional** | ***ListServiceConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceConversationScopedWebhookResponse**](ListServiceConversationScopedWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceRole + +> ListServiceRoleResponse ListServiceRole(ctx, ChatServiceSid, optional) + + + +Retrieve a list of all user roles in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to read the Role resources from. | + **optional** | ***ListServiceRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceRoleResponse**](ListServiceRoleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceUser + +> ListServiceUserResponse ListServiceUser(ctx, ChatServiceSid, optional) + + + +Retrieve a list of all conversation users in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to read the User resources from. | + **optional** | ***ListServiceUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceUserResponse**](ListServiceUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUser + +> ListUserResponse ListUser(ctx, optional) + + + +Retrieve a list of all conversation users in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserResponse**](ListUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConfiguration + +> ConversationsV1Configuration UpdateConfiguration(ctx, optional) + + + +Update the global configuration of conversations on your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***UpdateConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **DefaultChatServiceSid** | **optional.String**| The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. | + **DefaultClosedTimer** | **optional.String**| Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | + **DefaultInactiveTimer** | **optional.String**| Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | + **DefaultMessagingServiceSid** | **optional.String**| The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. | + +### Return type + +[**ConversationsV1Configuration**](conversations.v1.configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConfigurationWebhook + +> ConversationsV1ConfigurationConfigurationWebhook UpdateConfigurationWebhook(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***UpdateConfigurationWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConfigurationWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Filters** | [**optional.Interface of []string**](string.md)| The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved` | + **Method** | **optional.String**| The HTTP method to be used when sending a webhook request. | + **PostWebhookUrl** | **optional.String**| The absolute url the post-event webhook request should be sent to. | + **PreWebhookUrl** | **optional.String**| The absolute url the pre-event webhook request should be sent to. | + **Target** | **optional.String**| The routing target of the webhook. | + +### Return type + +[**ConversationsV1ConfigurationConfigurationWebhook**](conversations.v1.configuration.configuration_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConversation + +> ConversationsV1Conversation UpdateConversation(ctx, Sid, optional) + + + +Update an existing conversation in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + **optional** | ***UpdateConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **FriendlyName** | **optional.String**| The human-readable name of this conversation, limited to 256 characters. Optional. | + **MessagingServiceSid** | **optional.String**| The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | + **State** | **optional.String**| Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | + **TimersClosed** | **optional.String**| ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | + **TimersInactive** | **optional.String**| ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | + +### Return type + +[**ConversationsV1Conversation**](conversations.v1.conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConversationMessage + +> ConversationsV1ConversationConversationMessage UpdateConversationMessage(ctx, ConversationSid, Sid, optional) + + + +Update an existing message in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **Author** | **optional.String**| The channel specific identifier of the message's author. Defaults to `system`. | + **Body** | **optional.String**| The content of the message, can be up to 1,600 characters long. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. `null` if the message has not been edited. | + +### Return type + +[**ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConversationParticipant + +> ConversationsV1ConversationConversationParticipant UpdateConversationParticipant(ctx, ConversationSid, Sid, optional) + + + +Update an existing participant in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **Identity** | **optional.String**| A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. | + **LastReadMessageIndex** | **optional.Int32**| Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | + **LastReadTimestamp** | **optional.String**| Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | + **MessagingBindingProjectedAddress** | **optional.String**| The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. | + **MessagingBindingProxyAddress** | **optional.String**| The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. | + **RoleSid** | **optional.String**| The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | + +### Return type + +[**ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConversationScopedWebhook + +> ConversationsV1ConversationConversationScopedWebhook UpdateConversationScopedWebhook(ctx, ConversationSid, Sid, optional) + + + +Update an existing conversation-scoped webhook + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The list of events, firing webhook event for this Conversation. | + **ConfigurationFlowSid** | **optional.String**| The studio flow SID, where the webhook should be sent to. | + **ConfigurationMethod** | **optional.String**| The HTTP method to be used when sending a webhook request. | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| The list of keywords, firing webhook event for this Conversation. | + **ConfigurationUrl** | **optional.String**| The absolute url the webhook request should be sent to. | + +### Return type + +[**ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredential + +> ConversationsV1Credential UpdateCredential(ctx, Sid, optional) + + + +Update an existing push notification credential on your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiKey** | **optional.String**| [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | + **Certificate** | **optional.String**| [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | + **Type** | **optional.String**| The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. | + +### Return type + +[**ConversationsV1Credential**](conversations.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> ConversationsV1Role UpdateRole(ctx, Sid, optional) + + + +Update an existing user role in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Role resource to update. | + **optional** | ***UpdateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +### Return type + +[**ConversationsV1Role**](conversations.v1.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceConfiguration + +> ConversationsV1ServiceServiceConfiguration UpdateServiceConfiguration(ctx, ChatServiceSid, optional) + + + +Update configuration settings of a conversation service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the Service configuration resource to update. | + **optional** | ***UpdateServiceConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DefaultChatServiceRoleSid** | **optional.String**| The service-level role assigned to users when they are added to the service. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | + **DefaultConversationCreatorRoleSid** | **optional.String**| The conversation-level role assigned to a conversation creator when they join a new conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | + **DefaultConversationRoleSid** | **optional.String**| The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | + **ReachabilityEnabled** | **optional.Bool**| Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. | + +### Return type + +[**ConversationsV1ServiceServiceConfiguration**](conversations.v1.service.service_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceConversation + +> ConversationsV1ServiceServiceConversation UpdateServiceConversation(ctx, ChatServiceSid, Sid, optional) + + + +Update an existing conversation in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Conversation resource is associated with. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation. | + **optional** | ***UpdateServiceConversationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceConversationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **FriendlyName** | **optional.String**| The human-readable name of this conversation, limited to 256 characters. Optional. | + **MessagingServiceSid** | **optional.String**| The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | + **State** | **optional.String**| Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | + **TimersClosed** | **optional.String**| ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | + **TimersInactive** | **optional.String**| ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | + +### Return type + +[**ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceConversationMessage + +> ConversationsV1ServiceServiceConversationServiceConversationMessage UpdateServiceConversationMessage(ctx, ChatServiceSid, ConversationSid, Sid, optional) + + + +Update an existing message in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateServiceConversationMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceConversationMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **Author** | **optional.String**| The channel specific identifier of the message's author. Defaults to `system`. | + **Body** | **optional.String**| The content of the message, can be up to 1,600 characters long. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. `null` if the message has not been edited. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceConversationParticipant + +> ConversationsV1ServiceServiceConversationServiceConversationParticipant UpdateServiceConversationParticipant(ctx, ChatServiceSid, ConversationSid, Sid, optional) + + + +Update an existing participant in the conversation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateServiceConversationParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceConversationParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. | + **DateCreated** | **optional.Time**| The date that this resource was created. | + **DateUpdated** | **optional.Time**| The date that this resource was last updated. | + **Identity** | **optional.String**| A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. | + **LastReadMessageIndex** | **optional.Int32**| Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | + **LastReadTimestamp** | **optional.String**| Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | + **MessagingBindingProjectedAddress** | **optional.String**| The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. | + **MessagingBindingProxyAddress** | **optional.String**| The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. | + **RoleSid** | **optional.String**| The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceConversationScopedWebhook + +> ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook UpdateServiceConversationScopedWebhook(ctx, ChatServiceSid, ConversationSid, Sid, optional) + + + +Update an existing conversation-scoped webhook + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Participant resource is associated with. | +**ConversationSid** | **string**| The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateServiceConversationScopedWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceConversationScopedWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| The list of events, firing webhook event for this Conversation. | + **ConfigurationFlowSid** | **optional.String**| The studio flow SID, where the webhook should be sent to. | + **ConfigurationMethod** | **optional.String**| The HTTP method to be used when sending a webhook request. | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| The list of keywords, firing webhook event for this Conversation. | + **ConfigurationUrl** | **optional.String**| The absolute url the webhook request should be sent to. | + +### Return type + +[**ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceNotification + +> ConversationsV1ServiceServiceConfigurationServiceNotification UpdateServiceNotification(ctx, ChatServiceSid, optional) + + + +Update push notification service settings + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the Configuration applies to. | + **optional** | ***UpdateServiceNotificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceNotificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddedToConversationEnabled** | **optional.Bool**| Whether to send a notification when a participant is added to a conversation. The default is `false`. | + **AddedToConversationSound** | **optional.String**| The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. | + **AddedToConversationTemplate** | **optional.String**| The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. | + **LogEnabled** | **optional.Bool**| Weather the notification logging is enabled. | + **NewMessageBadgeCountEnabled** | **optional.Bool**| Whether the new message badge is enabled. The default is `false`. | + **NewMessageEnabled** | **optional.Bool**| Whether to send a notification when a new message is added to a conversation. The default is `false`. | + **NewMessageSound** | **optional.String**| The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`. | + **NewMessageTemplate** | **optional.String**| The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`. | + **RemovedFromConversationEnabled** | **optional.Bool**| Whether to send a notification to a user when they are removed from a conversation. The default is `false`. | + **RemovedFromConversationSound** | **optional.String**| The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. | + **RemovedFromConversationTemplate** | **optional.String**| The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. | + +### Return type + +[**ConversationsV1ServiceServiceConfigurationServiceNotification**](conversations.v1.service.service_configuration.service_notification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceRole + +> ConversationsV1ServiceServiceRole UpdateServiceRole(ctx, ChatServiceSid, Sid, optional) + + + +Update an existing user role in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to update the Role resource in. | +**Sid** | **string**| The SID of the Role resource to update. | + **optional** | ***UpdateServiceRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Permission** | [**optional.Interface of []string**](string.md)| A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +### Return type + +[**ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceUser + +> ConversationsV1ServiceServiceUser UpdateServiceUser(ctx, ChatServiceSid, Sid, optional) + + + +Update an existing conversation user in your service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ChatServiceSid** | **string**| The SID of the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) the User resource is associated with. | +**Sid** | **string**| The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. | + **optional** | ***UpdateServiceUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **RoleSid** | **optional.String**| The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | + +### Return type + +[**ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> ConversationsV1User UpdateUser(ctx, Sid, optional) + + + +Update an existing conversation user in your account's default service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update. | + **optional** | ***UpdateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **RoleSid** | **optional.String**| The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | + +### Return type + +[**ConversationsV1User**](conversations.v1.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md b/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md new file mode 100644 index 000000000..b957d586b --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationMessageReceiptResponse.md @@ -0,0 +1,12 @@ +# ListConversationMessageReceiptResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryReceipts** | [**[]ConversationsV1ConversationConversationMessageConversationMessageReceipt**](conversations.v1.conversation.conversation_message.conversation_message_receipt.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListConversationMessageResponse.md b/rest/conversations/v1/docs/ListConversationMessageResponse.md new file mode 100644 index 000000000..5bfd9645c --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationMessageResponse.md @@ -0,0 +1,12 @@ +# ListConversationMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ConversationsV1ConversationConversationMessage**](conversations.v1.conversation.conversation_message.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListConversationParticipantResponse.md b/rest/conversations/v1/docs/ListConversationParticipantResponse.md new file mode 100644 index 000000000..d0173fe9e --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationParticipantResponse.md @@ -0,0 +1,12 @@ +# ListConversationParticipantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Participants** | [**[]ConversationsV1ConversationConversationParticipant**](conversations.v1.conversation.conversation_participant.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListConversationResponse.md b/rest/conversations/v1/docs/ListConversationResponse.md new file mode 100644 index 000000000..c9c00b05a --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationResponse.md @@ -0,0 +1,12 @@ +# ListConversationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conversations** | [**[]ConversationsV1Conversation**](conversations.v1.conversation.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListConversationResponseMeta.md b/rest/conversations/v1/docs/ListConversationResponseMeta.md new file mode 100644 index 000000000..0fc77478d --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationResponseMeta.md @@ -0,0 +1,17 @@ +# ListConversationResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md b/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md new file mode 100644 index 000000000..a0302d098 --- /dev/null +++ b/rest/conversations/v1/docs/ListConversationScopedWebhookResponse.md @@ -0,0 +1,12 @@ +# ListConversationScopedWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Webhooks** | [**[]ConversationsV1ConversationConversationScopedWebhook**](conversations.v1.conversation.conversation_scoped_webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListCredentialResponse.md b/rest/conversations/v1/docs/ListCredentialResponse.md new file mode 100644 index 000000000..c9ab73fb3 --- /dev/null +++ b/rest/conversations/v1/docs/ListCredentialResponse.md @@ -0,0 +1,12 @@ +# ListCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]ConversationsV1Credential**](conversations.v1.credential.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListRoleResponse.md b/rest/conversations/v1/docs/ListRoleResponse.md new file mode 100644 index 000000000..6a47ca9a4 --- /dev/null +++ b/rest/conversations/v1/docs/ListRoleResponse.md @@ -0,0 +1,12 @@ +# ListRoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Roles** | [**[]ConversationsV1Role**](conversations.v1.role.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceBindingResponse.md b/rest/conversations/v1/docs/ListServiceBindingResponse.md new file mode 100644 index 000000000..b47d343d1 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceBindingResponse.md @@ -0,0 +1,12 @@ +# ListServiceBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]ConversationsV1ServiceServiceBinding**](conversations.v1.service.service_binding.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md b/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md new file mode 100644 index 000000000..a83c72e18 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceConversationMessageReceiptResponse.md @@ -0,0 +1,12 @@ +# ListServiceConversationMessageReceiptResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryReceipts** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt**](conversations.v1.service.service_conversation.service_conversation_message.service_conversation_message_receipt.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md b/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md new file mode 100644 index 000000000..8239b9a1b --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceConversationMessageResponse.md @@ -0,0 +1,12 @@ +# ListServiceConversationMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]ConversationsV1ServiceServiceConversationServiceConversationMessage**](conversations.v1.service.service_conversation.service_conversation_message.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md b/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md new file mode 100644 index 000000000..cd913710d --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceConversationParticipantResponse.md @@ -0,0 +1,12 @@ +# ListServiceConversationParticipantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Participants** | [**[]ConversationsV1ServiceServiceConversationServiceConversationParticipant**](conversations.v1.service.service_conversation.service_conversation_participant.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceConversationResponse.md b/rest/conversations/v1/docs/ListServiceConversationResponse.md new file mode 100644 index 000000000..24a38e925 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceConversationResponse.md @@ -0,0 +1,12 @@ +# ListServiceConversationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conversations** | [**[]ConversationsV1ServiceServiceConversation**](conversations.v1.service.service_conversation.md) | | [optional] +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md b/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md new file mode 100644 index 000000000..67e4e2280 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceConversationScopedWebhookResponse.md @@ -0,0 +1,12 @@ +# ListServiceConversationScopedWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Webhooks** | [**[]ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook**](conversations.v1.service.service_conversation.service_conversation_scoped_webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceResponse.md b/rest/conversations/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..ea759bf84 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Services** | [**[]ConversationsV1Service**](conversations.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceRoleResponse.md b/rest/conversations/v1/docs/ListServiceRoleResponse.md new file mode 100644 index 000000000..fc4629ca5 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceRoleResponse.md @@ -0,0 +1,12 @@ +# ListServiceRoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Roles** | [**[]ConversationsV1ServiceServiceRole**](conversations.v1.service.service_role.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListServiceUserResponse.md b/rest/conversations/v1/docs/ListServiceUserResponse.md new file mode 100644 index 000000000..bc0a81830 --- /dev/null +++ b/rest/conversations/v1/docs/ListServiceUserResponse.md @@ -0,0 +1,12 @@ +# ListServiceUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Users** | [**[]ConversationsV1ServiceServiceUser**](conversations.v1.service.service_user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/ListUserResponse.md b/rest/conversations/v1/docs/ListUserResponse.md new file mode 100644 index 000000000..f90a6a491 --- /dev/null +++ b/rest/conversations/v1/docs/ListUserResponse.md @@ -0,0 +1,12 @@ +# ListUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListConversationResponseMeta**](ListConversationResponse_meta.md) | | [optional] +**Users** | [**[]ConversationsV1User**](conversations.v1.user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConfigurationRequest.md b/rest/conversations/v1/docs/UpdateConfigurationRequest.md new file mode 100644 index 000000000..a3387e614 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConfigurationRequest.md @@ -0,0 +1,14 @@ +# UpdateConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultChatServiceSid** | **string** | The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. | [optional] +**DefaultClosedTimer** | **string** | Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | [optional] +**DefaultInactiveTimer** | **string** | Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | [optional] +**DefaultMessagingServiceSid** | **string** | The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConfigurationWebhookRequest.md b/rest/conversations/v1/docs/UpdateConfigurationWebhookRequest.md new file mode 100644 index 000000000..dc10bed93 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConfigurationWebhookRequest.md @@ -0,0 +1,15 @@ +# UpdateConfigurationWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Filters** | **[]string** | The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved` | [optional] +**Method** | **string** | The HTTP method to be used when sending a webhook request. | [optional] +**PostWebhookUrl** | **string** | The absolute url the post-event webhook request should be sent to. | [optional] +**PreWebhookUrl** | **string** | The absolute url the pre-event webhook request should be sent to. | [optional] +**Target** | **string** | The routing target of the webhook. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConversationMessageRequest.md b/rest/conversations/v1/docs/UpdateConversationMessageRequest.md new file mode 100644 index 000000000..869aade85 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConversationMessageRequest.md @@ -0,0 +1,15 @@ +# UpdateConversationMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. | [optional] +**Body** | **string** | The content of the message, can be up to 1,600 characters long. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. `null` if the message has not been edited. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConversationParticipantRequest.md b/rest/conversations/v1/docs/UpdateConversationParticipantRequest.md new file mode 100644 index 000000000..aad589755 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConversationParticipantRequest.md @@ -0,0 +1,19 @@ +# UpdateConversationParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**Identity** | **string** | A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. | [optional] +**LastReadMessageIndex** | Pointer to **int32** | Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | [optional] +**LastReadTimestamp** | **string** | Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | [optional] +**MessagingBindingProjectedAddress** | **string** | The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. | [optional] +**MessagingBindingProxyAddress** | **string** | The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. | [optional] +**RoleSid** | **string** | The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConversationRequest.md b/rest/conversations/v1/docs/UpdateConversationRequest.md new file mode 100644 index 000000000..0265da30a --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConversationRequest.md @@ -0,0 +1,19 @@ +# UpdateConversationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional. | [optional] +**MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | [optional] +**State** | **string** | Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | [optional] +**TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | [optional] +**TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateConversationScopedWebhookRequest.md b/rest/conversations/v1/docs/UpdateConversationScopedWebhookRequest.md new file mode 100644 index 000000000..681edef81 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateConversationScopedWebhookRequest.md @@ -0,0 +1,15 @@ +# UpdateConversationScopedWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The list of events, firing webhook event for this Conversation. | [optional] +**ConfigurationFlowSid** | **string** | The studio flow SID, where the webhook should be sent to. | [optional] +**ConfigurationMethod** | **string** | The HTTP method to be used when sending a webhook request. | [optional] +**ConfigurationTriggers** | **[]string** | The list of keywords, firing webhook event for this Conversation. | [optional] +**ConfigurationUrl** | **string** | The absolute url the webhook request should be sent to. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateCredentialRequest.md b/rest/conversations/v1/docs/UpdateCredentialRequest.md new file mode 100644 index 000000000..5002e2598 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateCredentialRequest.md @@ -0,0 +1,17 @@ +# UpdateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. | [optional] +**Certificate** | **string** | [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. | [optional] +**Type** | **string** | The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateRoleRequest.md b/rest/conversations/v1/docs/UpdateRoleRequest.md new file mode 100644 index 000000000..6482ab20c --- /dev/null +++ b/rest/conversations/v1/docs/UpdateRoleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Permission** | **[]string** | A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceConfigurationRequest.md b/rest/conversations/v1/docs/UpdateServiceConfigurationRequest.md new file mode 100644 index 000000000..4d0d2d718 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceConfigurationRequest.md @@ -0,0 +1,14 @@ +# UpdateServiceConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultChatServiceRoleSid** | **string** | The service-level role assigned to users when they are added to the service. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | [optional] +**DefaultConversationCreatorRoleSid** | **string** | The conversation-level role assigned to a conversation creator when they join a new conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | [optional] +**DefaultConversationRoleSid** | **string** | The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. | [optional] +**ReachabilityEnabled** | **bool** | Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceConversationMessageRequest.md b/rest/conversations/v1/docs/UpdateServiceConversationMessageRequest.md new file mode 100644 index 000000000..727b47e70 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceConversationMessageRequest.md @@ -0,0 +1,15 @@ +# UpdateServiceConversationMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**Author** | **string** | The channel specific identifier of the message's author. Defaults to `system`. | [optional] +**Body** | **string** | The content of the message, can be up to 1,600 characters long. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. `null` if the message has not been edited. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceConversationParticipantRequest.md b/rest/conversations/v1/docs/UpdateServiceConversationParticipantRequest.md new file mode 100644 index 000000000..55fe2dd14 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceConversationParticipantRequest.md @@ -0,0 +1,19 @@ +# UpdateServiceConversationParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**Identity** | **string** | A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. | [optional] +**LastReadMessageIndex** | Pointer to **int32** | Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | [optional] +**LastReadTimestamp** | **string** | Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. | [optional] +**MessagingBindingProjectedAddress** | **string** | The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. | [optional] +**MessagingBindingProxyAddress** | **string** | The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. | [optional] +**RoleSid** | **string** | The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceConversationRequest.md b/rest/conversations/v1/docs/UpdateServiceConversationRequest.md new file mode 100644 index 000000000..19d6f3ac3 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceConversationRequest.md @@ -0,0 +1,19 @@ +# UpdateServiceConversationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | The date that this resource was created. | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | The date that this resource was last updated. | [optional] +**FriendlyName** | **string** | The human-readable name of this conversation, limited to 256 characters. Optional. | [optional] +**MessagingServiceSid** | **string** | The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. | [optional] +**State** | **string** | Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` | [optional] +**TimersClosed** | **string** | ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. | [optional] +**TimersInactive** | **string** | ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceConversationScopedWebhookRequest.md b/rest/conversations/v1/docs/UpdateServiceConversationScopedWebhookRequest.md new file mode 100644 index 000000000..08858cbe5 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceConversationScopedWebhookRequest.md @@ -0,0 +1,15 @@ +# UpdateServiceConversationScopedWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | The list of events, firing webhook event for this Conversation. | [optional] +**ConfigurationFlowSid** | **string** | The studio flow SID, where the webhook should be sent to. | [optional] +**ConfigurationMethod** | **string** | The HTTP method to be used when sending a webhook request. | [optional] +**ConfigurationTriggers** | **[]string** | The list of keywords, firing webhook event for this Conversation. | [optional] +**ConfigurationUrl** | **string** | The absolute url the webhook request should be sent to. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceNotificationRequest.md b/rest/conversations/v1/docs/UpdateServiceNotificationRequest.md new file mode 100644 index 000000000..467bf85f8 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceNotificationRequest.md @@ -0,0 +1,21 @@ +# UpdateServiceNotificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddedToConversationEnabled** | **bool** | Whether to send a notification when a participant is added to a conversation. The default is `false`. | [optional] +**AddedToConversationSound** | **string** | The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. | [optional] +**AddedToConversationTemplate** | **string** | The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. | [optional] +**LogEnabled** | **bool** | Weather the notification logging is enabled. | [optional] +**NewMessageBadgeCountEnabled** | **bool** | Whether the new message badge is enabled. The default is `false`. | [optional] +**NewMessageEnabled** | **bool** | Whether to send a notification when a new message is added to a conversation. The default is `false`. | [optional] +**NewMessageSound** | **string** | The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`. | [optional] +**NewMessageTemplate** | **string** | The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`. | [optional] +**RemovedFromConversationEnabled** | **bool** | Whether to send a notification to a user when they are removed from a conversation. The default is `false`. | [optional] +**RemovedFromConversationSound** | **string** | The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. | [optional] +**RemovedFromConversationTemplate** | **string** | The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceRoleRequest.md b/rest/conversations/v1/docs/UpdateServiceRoleRequest.md new file mode 100644 index 000000000..72fab3f5b --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceRoleRequest.md @@ -0,0 +1,11 @@ +# UpdateServiceRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Permission** | **[]string** | A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateServiceUserRequest.md b/rest/conversations/v1/docs/UpdateServiceUserRequest.md new file mode 100644 index 000000000..a960a1da8 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateServiceUserRequest.md @@ -0,0 +1,13 @@ +# UpdateServiceUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] +**RoleSid** | **string** | The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/docs/UpdateUserRequest.md b/rest/conversations/v1/docs/UpdateUserRequest.md new file mode 100644 index 000000000..bb540d873 --- /dev/null +++ b/rest/conversations/v1/docs/UpdateUserRequest.md @@ -0,0 +1,13 @@ +# UpdateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] +**RoleSid** | **string** | The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/conversations/v1/model_conversations_v1_configuration.go b/rest/conversations/v1/model_conversations_v1_configuration.go new file mode 100644 index 000000000..6e6b3d5c1 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_configuration.go @@ -0,0 +1,21 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ConversationsV1Configuration struct for ConversationsV1Configuration +type ConversationsV1Configuration struct { + AccountSid string `json:"AccountSid,omitempty"` + DefaultChatServiceSid string `json:"DefaultChatServiceSid,omitempty"` + DefaultClosedTimer string `json:"DefaultClosedTimer,omitempty"` + DefaultInactiveTimer string `json:"DefaultInactiveTimer,omitempty"` + DefaultMessagingServiceSid string `json:"DefaultMessagingServiceSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go b/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go new file mode 100644 index 000000000..bcc342b9e --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_configuration_configuration_webhook.go @@ -0,0 +1,21 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ConversationsV1ConfigurationConfigurationWebhook struct for ConversationsV1ConfigurationConfigurationWebhook +type ConversationsV1ConfigurationConfigurationWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + Filters []string `json:"Filters,omitempty"` + Method string `json:"Method,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + Target string `json:"Target,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_conversation.go b/rest/conversations/v1/model_conversations_v1_conversation.go new file mode 100644 index 000000000..7b880a5ba --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_conversation.go @@ -0,0 +1,30 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1Conversation struct for ConversationsV1Conversation +type ConversationsV1Conversation struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + State string `json:"State,omitempty"` + Timers map[string]interface{} `json:"Timers,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go b/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go new file mode 100644 index 000000000..122962d18 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_conversation_conversation_message.go @@ -0,0 +1,31 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ConversationConversationMessage struct for ConversationsV1ConversationConversationMessage +type ConversationsV1ConversationConversationMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Author string `json:"Author,omitempty"` + Body string `json:"Body,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Delivery map[string]interface{} `json:"Delivery,omitempty"` + Index int32 `json:"Index,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Media []map[string]interface{} `json:"Media,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go b/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go new file mode 100644 index 000000000..bdcc235d3 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_conversation_conversation_message_conversation_message_receipt.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ConversationConversationMessageConversationMessageReceipt struct for ConversationsV1ConversationConversationMessageConversationMessageReceipt +type ConversationsV1ConversationConversationMessageConversationMessageReceipt struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelMessageSid string `json:"ChannelMessageSid,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode int32 `json:"ErrorCode,omitempty"` + MessageSid string `json:"MessageSid,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go b/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go new file mode 100644 index 000000000..d2d101a4e --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_conversation_conversation_participant.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ConversationConversationParticipant struct for ConversationsV1ConversationConversationParticipant +type ConversationsV1ConversationConversationParticipant struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp string `json:"LastReadTimestamp,omitempty"` + MessagingBinding map[string]interface{} `json:"MessagingBinding,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go b/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go new file mode 100644 index 000000000..a1e5406a7 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_conversation_conversation_scoped_webhook.go @@ -0,0 +1,25 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ConversationConversationScopedWebhook struct for ConversationsV1ConversationConversationScopedWebhook +type ConversationsV1ConversationConversationScopedWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Sid string `json:"Sid,omitempty"` + Target string `json:"Target,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_credential.go b/rest/conversations/v1/model_conversations_v1_credential.go new file mode 100644 index 000000000..2ca051b33 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1Credential struct for ConversationsV1Credential +type ConversationsV1Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_role.go b/rest/conversations/v1/model_conversations_v1_role.go new file mode 100644 index 000000000..b2c863235 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1Role struct for ConversationsV1Role +type ConversationsV1Role struct { + AccountSid string `json:"AccountSid,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service.go b/rest/conversations/v1/model_conversations_v1_service.go new file mode 100644 index 000000000..ace6e896c --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service.go @@ -0,0 +1,24 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1Service struct for ConversationsV1Service +type ConversationsV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_binding.go b/rest/conversations/v1/model_conversations_v1_service_service_binding.go new file mode 100644 index 000000000..5a7615ee6 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_binding.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceBinding struct for ConversationsV1ServiceServiceBinding +type ConversationsV1ServiceServiceBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + BindingType string `json:"BindingType,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + MessageTypes []string `json:"MessageTypes,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_configuration.go b/rest/conversations/v1/model_conversations_v1_service_service_configuration.go new file mode 100644 index 000000000..29e3d8e1b --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_configuration.go @@ -0,0 +1,21 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ConversationsV1ServiceServiceConfiguration struct for ConversationsV1ServiceServiceConfiguration +type ConversationsV1ServiceServiceConfiguration struct { + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DefaultChatServiceRoleSid string `json:"DefaultChatServiceRoleSid,omitempty"` + DefaultConversationCreatorRoleSid string `json:"DefaultConversationCreatorRoleSid,omitempty"` + DefaultConversationRoleSid string `json:"DefaultConversationRoleSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go b/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go new file mode 100644 index 000000000..7a6f6b0ff --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_configuration_service_notification.go @@ -0,0 +1,21 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ConversationsV1ServiceServiceConfigurationServiceNotification struct for ConversationsV1ServiceServiceConfigurationServiceNotification +type ConversationsV1ServiceServiceConfigurationServiceNotification struct { + AccountSid string `json:"AccountSid,omitempty"` + AddedToConversation map[string]interface{} `json:"AddedToConversation,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + LogEnabled bool `json:"LogEnabled,omitempty"` + NewMessage map[string]interface{} `json:"NewMessage,omitempty"` + RemovedFromConversation map[string]interface{} `json:"RemovedFromConversation,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_conversation.go b/rest/conversations/v1/model_conversations_v1_service_service_conversation.go new file mode 100644 index 000000000..8e395dccc --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_conversation.go @@ -0,0 +1,30 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceConversation struct for ConversationsV1ServiceServiceConversation +type ConversationsV1ServiceServiceConversation struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + State string `json:"State,omitempty"` + Timers map[string]interface{} `json:"Timers,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go new file mode 100644 index 000000000..e37854341 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message.go @@ -0,0 +1,32 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceConversationServiceConversationMessage struct for ConversationsV1ServiceServiceConversationServiceConversationMessage +type ConversationsV1ServiceServiceConversationServiceConversationMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Author string `json:"Author,omitempty"` + Body string `json:"Body,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Delivery map[string]interface{} `json:"Delivery,omitempty"` + Index int32 `json:"Index,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Media []map[string]interface{} `json:"Media,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go new file mode 100644 index 000000000..65950fcf6 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_message_service_conversation_message_receipt.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct for ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt +type ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelMessageSid string `json:"ChannelMessageSid,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode int32 `json:"ErrorCode,omitempty"` + MessageSid string `json:"MessageSid,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go new file mode 100644 index 000000000..a0542d019 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_participant.go @@ -0,0 +1,30 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceConversationServiceConversationParticipant struct for ConversationsV1ServiceServiceConversationServiceConversationParticipant +type ConversationsV1ServiceServiceConversationServiceConversationParticipant struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + LastReadTimestamp string `json:"LastReadTimestamp,omitempty"` + MessagingBinding map[string]interface{} `json:"MessagingBinding,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go new file mode 100644 index 000000000..ca792a01e --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_conversation_service_conversation_scoped_webhook.go @@ -0,0 +1,26 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct for ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook +type ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + ConversationSid string `json:"ConversationSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Sid string `json:"Sid,omitempty"` + Target string `json:"Target,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_role.go b/rest/conversations/v1/model_conversations_v1_service_service_role.go new file mode 100644 index 000000000..8fbf6b42f --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceRole struct for ConversationsV1ServiceServiceRole +type ConversationsV1ServiceServiceRole struct { + AccountSid string `json:"AccountSid,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_service_service_user.go b/rest/conversations/v1/model_conversations_v1_service_service_user.go new file mode 100644 index 000000000..bbdaf5106 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_service_service_user.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1ServiceServiceUser struct for ConversationsV1ServiceServiceUser +type ConversationsV1ServiceServiceUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_conversations_v1_user.go b/rest/conversations/v1/model_conversations_v1_user.go new file mode 100644 index 000000000..9a8d7bdf6 --- /dev/null +++ b/rest/conversations/v1/model_conversations_v1_user.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ConversationsV1User struct for ConversationsV1User +type ConversationsV1User struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_create_conversation_message_request.go b/rest/conversations/v1/model_create_conversation_message_request.go new file mode 100644 index 000000000..ff95f5ce6 --- /dev/null +++ b/rest/conversations/v1/model_create_conversation_message_request.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateConversationMessageRequest struct for CreateConversationMessageRequest +type CreateConversationMessageRequest struct { + // A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. Defaults to `system`. + Author string `json:"Author,omitempty"` + // The content of the message, can be up to 1,600 characters long. + Body string `json:"Body,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. `null` if the message has not been edited. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The Media SID to be attached to the new Message. + MediaSid string `json:"MediaSid,omitempty"` +} diff --git a/rest/conversations/v1/model_create_conversation_participant_request.go b/rest/conversations/v1/model_create_conversation_participant_request.go new file mode 100644 index 000000000..5e9404b16 --- /dev/null +++ b/rest/conversations/v1/model_create_conversation_participant_request.go @@ -0,0 +1,33 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateConversationParticipantRequest struct for CreateConversationParticipantRequest +type CreateConversationParticipantRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. + Identity string `json:"Identity,omitempty"` + // The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + MessagingBindingAddress string `json:"MessagingBindingAddress,omitempty"` + // The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. + MessagingBindingProjectedAddress string `json:"MessagingBindingProjectedAddress,omitempty"` + // The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + MessagingBindingProxyAddress string `json:"MessagingBindingProxyAddress,omitempty"` + // The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_create_conversation_request.go b/rest/conversations/v1/model_create_conversation_request.go new file mode 100644 index 000000000..77ccaf9c1 --- /dev/null +++ b/rest/conversations/v1/model_create_conversation_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateConversationRequest struct for CreateConversationRequest +type CreateConversationRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation, limited to 256 characters. Optional. + FriendlyName string `json:"FriendlyName,omitempty"` + // The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + // Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + State string `json:"State,omitempty"` + // ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + TimersClosed string `json:"TimersClosed,omitempty"` + // ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + TimersInactive string `json:"TimersInactive,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/conversations/v1/model_create_conversation_scoped_webhook_request.go b/rest/conversations/v1/model_create_conversation_scoped_webhook_request.go new file mode 100644 index 000000000..6c2c0c1b4 --- /dev/null +++ b/rest/conversations/v1/model_create_conversation_scoped_webhook_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateConversationScopedWebhookRequest struct for CreateConversationScopedWebhookRequest +type CreateConversationScopedWebhookRequest struct { + // The list of events, firing webhook event for this Conversation. + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The studio flow SID, where the webhook should be sent to. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method to be used when sending a webhook request. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The message index for which and it's successors the webhook will be replayed. Not set by default + ConfigurationReplayAfter int32 `json:"ConfigurationReplayAfter,omitempty"` + // The list of keywords, firing webhook event for this Conversation. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The absolute url the webhook request should be sent to. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` + // The target of this webhook: `webhook`, `studio`, `trigger` + Target string `json:"Target"` +} diff --git a/rest/conversations/v1/model_create_credential_request.go b/rest/conversations/v1/model_create_credential_request.go new file mode 100644 index 000000000..76fba2065 --- /dev/null +++ b/rest/conversations/v1/model_create_credential_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialRequest struct for CreateCredentialRequest +type CreateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` + // The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. + Type string `json:"Type"` +} diff --git a/rest/conversations/v1/model_create_role_request.go b/rest/conversations/v1/model_create_role_request.go new file mode 100644 index 000000000..9a042db18 --- /dev/null +++ b/rest/conversations/v1/model_create_role_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRoleRequest struct for CreateRoleRequest +type CreateRoleRequest struct { + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` + // The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. + Type string `json:"Type"` +} diff --git a/rest/conversations/v1/model_create_service_conversation_message_request.go b/rest/conversations/v1/model_create_service_conversation_message_request.go new file mode 100644 index 000000000..787d4ca4b --- /dev/null +++ b/rest/conversations/v1/model_create_service_conversation_message_request.go @@ -0,0 +1,29 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateServiceConversationMessageRequest struct for CreateServiceConversationMessageRequest +type CreateServiceConversationMessageRequest struct { + // A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. Defaults to `system`. + Author string `json:"Author,omitempty"` + // The content of the message, can be up to 1,600 characters long. + Body string `json:"Body,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. `null` if the message has not been edited. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The Media SID to be attached to the new Message. + MediaSid string `json:"MediaSid,omitempty"` +} diff --git a/rest/conversations/v1/model_create_service_conversation_participant_request.go b/rest/conversations/v1/model_create_service_conversation_participant_request.go new file mode 100644 index 000000000..40249063a --- /dev/null +++ b/rest/conversations/v1/model_create_service_conversation_participant_request.go @@ -0,0 +1,33 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateServiceConversationParticipantRequest struct for CreateServiceConversationParticipantRequest +type CreateServiceConversationParticipantRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. + Identity string `json:"Identity,omitempty"` + // The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + MessagingBindingAddress string `json:"MessagingBindingAddress,omitempty"` + // The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity. + MessagingBindingProjectedAddress string `json:"MessagingBindingProjectedAddress,omitempty"` + // The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field). + MessagingBindingProxyAddress string `json:"MessagingBindingProxyAddress,omitempty"` + // The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_create_service_conversation_request.go b/rest/conversations/v1/model_create_service_conversation_request.go new file mode 100644 index 000000000..0c94b7401 --- /dev/null +++ b/rest/conversations/v1/model_create_service_conversation_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateServiceConversationRequest struct for CreateServiceConversationRequest +type CreateServiceConversationRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation, limited to 256 characters. Optional. + FriendlyName string `json:"FriendlyName,omitempty"` + // The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + // Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + State string `json:"State,omitempty"` + // ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + TimersClosed string `json:"TimersClosed,omitempty"` + // ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + TimersInactive string `json:"TimersInactive,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/conversations/v1/model_create_service_conversation_scoped_webhook_request.go b/rest/conversations/v1/model_create_service_conversation_scoped_webhook_request.go new file mode 100644 index 000000000..6cea64fa6 --- /dev/null +++ b/rest/conversations/v1/model_create_service_conversation_scoped_webhook_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceConversationScopedWebhookRequest struct for CreateServiceConversationScopedWebhookRequest +type CreateServiceConversationScopedWebhookRequest struct { + // The list of events, firing webhook event for this Conversation. + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The studio flow SID, where the webhook should be sent to. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method to be used when sending a webhook request. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The message index for which and it's successors the webhook will be replayed. Not set by default + ConfigurationReplayAfter int32 `json:"ConfigurationReplayAfter,omitempty"` + // The list of keywords, firing webhook event for this Conversation. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The absolute url the webhook request should be sent to. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` + // The target of this webhook: `webhook`, `studio`, `trigger` + Target string `json:"Target"` +} diff --git a/rest/conversations/v1/model_create_service_request.go b/rest/conversations/v1/model_create_service_request.go new file mode 100644 index 000000000..e9b84a316 --- /dev/null +++ b/rest/conversations/v1/model_create_service_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // The human-readable name of this service, limited to 256 characters. Optional. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/conversations/v1/model_create_service_role_request.go b/rest/conversations/v1/model_create_service_role_request.go new file mode 100644 index 000000000..d68d649b4 --- /dev/null +++ b/rest/conversations/v1/model_create_service_role_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRoleRequest struct for CreateServiceRoleRequest +type CreateServiceRoleRequest struct { + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` + // The type of role. Can be: `conversation` for [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) roles or `service` for [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) roles. + Type string `json:"Type"` +} diff --git a/rest/conversations/v1/model_create_service_user_request.go b/rest/conversations/v1/model_create_service_user_request.go new file mode 100644 index 000000000..41d111bd0 --- /dev/null +++ b/rest/conversations/v1/model_create_service_user_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceUserRequest struct for CreateServiceUserRequest +type CreateServiceUserRequest struct { + // The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + Attributes string `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. + Identity string `json:"Identity"` + // The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_create_user_request.go b/rest/conversations/v1/model_create_user_request.go new file mode 100644 index 000000000..d35ea154e --- /dev/null +++ b/rest/conversations/v1/model_create_user_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateUserRequest struct for CreateUserRequest +type CreateUserRequest struct { + // The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + Attributes string `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The application-defined string that uniquely identifies the resource's User within the [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource). This value is often a username or an email address, and is case-sensitive. + Identity string `json:"Identity"` + // The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_message_receipt_response.go b/rest/conversations/v1/model_list_conversation_message_receipt_response.go new file mode 100644 index 000000000..6e7b5f87d --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_message_receipt_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationMessageReceiptResponse struct for ListConversationMessageReceiptResponse +type ListConversationMessageReceiptResponse struct { + DeliveryReceipts []ConversationsV1ConversationConversationMessageConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_message_response.go b/rest/conversations/v1/model_list_conversation_message_response.go new file mode 100644 index 000000000..9e58c61ba --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_message_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationMessageResponse struct for ListConversationMessageResponse +type ListConversationMessageResponse struct { + Messages []ConversationsV1ConversationConversationMessage `json:"Messages,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_participant_response.go b/rest/conversations/v1/model_list_conversation_participant_response.go new file mode 100644 index 000000000..b9f4139df --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_participant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationParticipantResponse struct for ListConversationParticipantResponse +type ListConversationParticipantResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Participants []ConversationsV1ConversationConversationParticipant `json:"Participants,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_response.go b/rest/conversations/v1/model_list_conversation_response.go new file mode 100644 index 000000000..d0a60464f --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationResponse struct for ListConversationResponse +type ListConversationResponse struct { + Conversations []ConversationsV1Conversation `json:"Conversations,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_response_meta.go b/rest/conversations/v1/model_list_conversation_response_meta.go new file mode 100644 index 000000000..d2b8193b4 --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationResponseMeta struct for ListConversationResponseMeta +type ListConversationResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go b/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go new file mode 100644 index 000000000..f66e0ed73 --- /dev/null +++ b/rest/conversations/v1/model_list_conversation_scoped_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConversationScopedWebhookResponse struct for ListConversationScopedWebhookResponse +type ListConversationScopedWebhookResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Webhooks []ConversationsV1ConversationConversationScopedWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/conversations/v1/model_list_credential_response.go b/rest/conversations/v1/model_list_credential_response.go new file mode 100644 index 000000000..75ebbe9c1 --- /dev/null +++ b/rest/conversations/v1/model_list_credential_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponse struct for ListCredentialResponse +type ListCredentialResponse struct { + Credentials []ConversationsV1Credential `json:"Credentials,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_role_response.go b/rest/conversations/v1/model_list_role_response.go new file mode 100644 index 000000000..d66634af6 --- /dev/null +++ b/rest/conversations/v1/model_list_role_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoleResponse struct for ListRoleResponse +type ListRoleResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Roles []ConversationsV1Role `json:"Roles,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_binding_response.go b/rest/conversations/v1/model_list_service_binding_response.go new file mode 100644 index 000000000..42259aa34 --- /dev/null +++ b/rest/conversations/v1/model_list_service_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceBindingResponse struct for ListServiceBindingResponse +type ListServiceBindingResponse struct { + Bindings []ConversationsV1ServiceServiceBinding `json:"Bindings,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go b/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go new file mode 100644 index 000000000..00d15e3ee --- /dev/null +++ b/rest/conversations/v1/model_list_service_conversation_message_receipt_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceConversationMessageReceiptResponse struct for ListServiceConversationMessageReceiptResponse +type ListServiceConversationMessageReceiptResponse struct { + DeliveryReceipts []ConversationsV1ServiceServiceConversationServiceConversationMessageServiceConversationMessageReceipt `json:"DeliveryReceipts,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_conversation_message_response.go b/rest/conversations/v1/model_list_service_conversation_message_response.go new file mode 100644 index 000000000..c164c0def --- /dev/null +++ b/rest/conversations/v1/model_list_service_conversation_message_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceConversationMessageResponse struct for ListServiceConversationMessageResponse +type ListServiceConversationMessageResponse struct { + Messages []ConversationsV1ServiceServiceConversationServiceConversationMessage `json:"Messages,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_conversation_participant_response.go b/rest/conversations/v1/model_list_service_conversation_participant_response.go new file mode 100644 index 000000000..7ab0e1a64 --- /dev/null +++ b/rest/conversations/v1/model_list_service_conversation_participant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceConversationParticipantResponse struct for ListServiceConversationParticipantResponse +type ListServiceConversationParticipantResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Participants []ConversationsV1ServiceServiceConversationServiceConversationParticipant `json:"Participants,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_conversation_response.go b/rest/conversations/v1/model_list_service_conversation_response.go new file mode 100644 index 000000000..d499982ee --- /dev/null +++ b/rest/conversations/v1/model_list_service_conversation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceConversationResponse struct for ListServiceConversationResponse +type ListServiceConversationResponse struct { + Conversations []ConversationsV1ServiceServiceConversation `json:"Conversations,omitempty"` + Meta ListConversationResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go b/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go new file mode 100644 index 000000000..17b524d74 --- /dev/null +++ b/rest/conversations/v1/model_list_service_conversation_scoped_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceConversationScopedWebhookResponse struct for ListServiceConversationScopedWebhookResponse +type ListServiceConversationScopedWebhookResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Webhooks []ConversationsV1ServiceServiceConversationServiceConversationScopedWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_response.go b/rest/conversations/v1/model_list_service_response.go new file mode 100644 index 000000000..ab1fc53cf --- /dev/null +++ b/rest/conversations/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Services []ConversationsV1Service `json:"Services,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_role_response.go b/rest/conversations/v1/model_list_service_role_response.go new file mode 100644 index 000000000..2f68c3895 --- /dev/null +++ b/rest/conversations/v1/model_list_service_role_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceRoleResponse struct for ListServiceRoleResponse +type ListServiceRoleResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Roles []ConversationsV1ServiceServiceRole `json:"Roles,omitempty"` +} diff --git a/rest/conversations/v1/model_list_service_user_response.go b/rest/conversations/v1/model_list_service_user_response.go new file mode 100644 index 000000000..95ff71777 --- /dev/null +++ b/rest/conversations/v1/model_list_service_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceUserResponse struct for ListServiceUserResponse +type ListServiceUserResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Users []ConversationsV1ServiceServiceUser `json:"Users,omitempty"` +} diff --git a/rest/conversations/v1/model_list_user_response.go b/rest/conversations/v1/model_list_user_response.go new file mode 100644 index 000000000..9fa4dfa18 --- /dev/null +++ b/rest/conversations/v1/model_list_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserResponse struct for ListUserResponse +type ListUserResponse struct { + Meta ListConversationResponseMeta `json:"Meta,omitempty"` + Users []ConversationsV1User `json:"Users,omitempty"` +} diff --git a/rest/conversations/v1/model_update_configuration_request.go b/rest/conversations/v1/model_update_configuration_request.go new file mode 100644 index 000000000..b60045f19 --- /dev/null +++ b/rest/conversations/v1/model_update_configuration_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConfigurationRequest struct for UpdateConfigurationRequest +type UpdateConfigurationRequest struct { + // The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. + DefaultChatServiceSid string `json:"DefaultChatServiceSid,omitempty"` + // Default ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + DefaultClosedTimer string `json:"DefaultClosedTimer,omitempty"` + // Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + DefaultInactiveTimer string `json:"DefaultInactiveTimer,omitempty"` + // The SID of the default [Messaging Service](https://www.twilio.com/docs/sms/services/api) to use when creating a conversation. + DefaultMessagingServiceSid string `json:"DefaultMessagingServiceSid,omitempty"` +} diff --git a/rest/conversations/v1/model_update_configuration_webhook_request.go b/rest/conversations/v1/model_update_configuration_webhook_request.go new file mode 100644 index 000000000..655e38858 --- /dev/null +++ b/rest/conversations/v1/model_update_configuration_webhook_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConfigurationWebhookRequest struct for UpdateConfigurationWebhookRequest +type UpdateConfigurationWebhookRequest struct { + // The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved` + Filters []string `json:"Filters,omitempty"` + // The HTTP method to be used when sending a webhook request. + Method string `json:"Method,omitempty"` + // The absolute url the post-event webhook request should be sent to. + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + // The absolute url the pre-event webhook request should be sent to. + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + // The routing target of the webhook. + Target string `json:"Target,omitempty"` +} diff --git a/rest/conversations/v1/model_update_conversation_message_request.go b/rest/conversations/v1/model_update_conversation_message_request.go new file mode 100644 index 000000000..feeb575b3 --- /dev/null +++ b/rest/conversations/v1/model_update_conversation_message_request.go @@ -0,0 +1,27 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateConversationMessageRequest struct for UpdateConversationMessageRequest +type UpdateConversationMessageRequest struct { + // A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. Defaults to `system`. + Author string `json:"Author,omitempty"` + // The content of the message, can be up to 1,600 characters long. + Body string `json:"Body,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. `null` if the message has not been edited. + DateUpdated time.Time `json:"DateUpdated,omitempty"` +} diff --git a/rest/conversations/v1/model_update_conversation_participant_request.go b/rest/conversations/v1/model_update_conversation_participant_request.go new file mode 100644 index 000000000..311838db5 --- /dev/null +++ b/rest/conversations/v1/model_update_conversation_participant_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateConversationParticipantRequest struct for UpdateConversationParticipantRequest +type UpdateConversationParticipantRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters. + Identity string `json:"Identity,omitempty"` + // Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + // Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + LastReadTimestamp string `json:"LastReadTimestamp,omitempty"` + // The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. + MessagingBindingProjectedAddress string `json:"MessagingBindingProjectedAddress,omitempty"` + // The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. + MessagingBindingProxyAddress string `json:"MessagingBindingProxyAddress,omitempty"` + // The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_update_conversation_request.go b/rest/conversations/v1/model_update_conversation_request.go new file mode 100644 index 000000000..5f6261b4a --- /dev/null +++ b/rest/conversations/v1/model_update_conversation_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateConversationRequest struct for UpdateConversationRequest +type UpdateConversationRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation, limited to 256 characters. Optional. + FriendlyName string `json:"FriendlyName,omitempty"` + // The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + // Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + State string `json:"State,omitempty"` + // ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + TimersClosed string `json:"TimersClosed,omitempty"` + // ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + TimersInactive string `json:"TimersInactive,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/conversations/v1/model_update_conversation_scoped_webhook_request.go b/rest/conversations/v1/model_update_conversation_scoped_webhook_request.go new file mode 100644 index 000000000..f469431c8 --- /dev/null +++ b/rest/conversations/v1/model_update_conversation_scoped_webhook_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConversationScopedWebhookRequest struct for UpdateConversationScopedWebhookRequest +type UpdateConversationScopedWebhookRequest struct { + // The list of events, firing webhook event for this Conversation. + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The studio flow SID, where the webhook should be sent to. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method to be used when sending a webhook request. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The list of keywords, firing webhook event for this Conversation. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The absolute url the webhook request should be sent to. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` +} diff --git a/rest/conversations/v1/model_update_credential_request.go b/rest/conversations/v1/model_update_credential_request.go new file mode 100644 index 000000000..28d55aa16 --- /dev/null +++ b/rest/conversations/v1/model_update_credential_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialRequest struct for UpdateCredentialRequest +type UpdateCredentialRequest struct { + // [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`. + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the new resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`. + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` + // The type of push-notification service the credential is for. Can be: `fcm`, `gcm`, or `apn`. + Type string `json:"Type,omitempty"` +} diff --git a/rest/conversations/v1/model_update_role_request.go b/rest/conversations/v1/model_update_role_request.go new file mode 100644 index 000000000..4bde8936d --- /dev/null +++ b/rest/conversations/v1/model_update_role_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoleRequest struct for UpdateRoleRequest +type UpdateRoleRequest struct { + // A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` +} diff --git a/rest/conversations/v1/model_update_service_configuration_request.go b/rest/conversations/v1/model_update_service_configuration_request.go new file mode 100644 index 000000000..b5cf0c562 --- /dev/null +++ b/rest/conversations/v1/model_update_service_configuration_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceConfigurationRequest struct for UpdateServiceConfigurationRequest +type UpdateServiceConfigurationRequest struct { + // The service-level role assigned to users when they are added to the service. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + DefaultChatServiceRoleSid string `json:"DefaultChatServiceRoleSid,omitempty"` + // The conversation-level role assigned to a conversation creator when they join a new conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + DefaultConversationCreatorRoleSid string `json:"DefaultConversationCreatorRoleSid,omitempty"` + // The conversation-level role assigned to users when they are added to a conversation. See the [Conversation Role](https://www.twilio.com/docs/conversations/api/role-resource) for more info about roles. + DefaultConversationRoleSid string `json:"DefaultConversationRoleSid,omitempty"` + // Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Conversations Service. The default is `false`. + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_conversation_message_request.go b/rest/conversations/v1/model_update_service_conversation_message_request.go new file mode 100644 index 000000000..44b51e8d5 --- /dev/null +++ b/rest/conversations/v1/model_update_service_conversation_message_request.go @@ -0,0 +1,27 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateServiceConversationMessageRequest struct for UpdateServiceConversationMessageRequest +type UpdateServiceConversationMessageRequest struct { + // A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The channel specific identifier of the message's author. Defaults to `system`. + Author string `json:"Author,omitempty"` + // The content of the message, can be up to 1,600 characters long. + Body string `json:"Body,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. `null` if the message has not been edited. + DateUpdated time.Time `json:"DateUpdated,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_conversation_participant_request.go b/rest/conversations/v1/model_update_service_conversation_participant_request.go new file mode 100644 index 000000000..7af281501 --- /dev/null +++ b/rest/conversations/v1/model_update_service_conversation_participant_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateServiceConversationParticipantRequest struct for UpdateServiceConversationParticipantRequest +type UpdateServiceConversationParticipantRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters. + Identity string `json:"Identity,omitempty"` + // Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + LastReadMessageIndex *int32 `json:"LastReadMessageIndex,omitempty"` + // Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant. + LastReadTimestamp string `json:"LastReadTimestamp,omitempty"` + // The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it. + MessagingBindingProjectedAddress string `json:"MessagingBindingProjectedAddress,omitempty"` + // The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it. + MessagingBindingProxyAddress string `json:"MessagingBindingProxyAddress,omitempty"` + // The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_conversation_request.go b/rest/conversations/v1/model_update_service_conversation_request.go new file mode 100644 index 000000000..30ed0bb53 --- /dev/null +++ b/rest/conversations/v1/model_update_service_conversation_request.go @@ -0,0 +1,35 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateServiceConversationRequest struct for UpdateServiceConversationRequest +type UpdateServiceConversationRequest struct { + // An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \"{}\" will be returned. + Attributes string `json:"Attributes,omitempty"` + // The date that this resource was created. + DateCreated time.Time `json:"DateCreated,omitempty"` + // The date that this resource was last updated. + DateUpdated time.Time `json:"DateUpdated,omitempty"` + // The human-readable name of this conversation, limited to 256 characters. Optional. + FriendlyName string `json:"FriendlyName,omitempty"` + // The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + // Current state of this conversation. Can be either `active`, `inactive` or `closed` and defaults to `active` + State string `json:"State,omitempty"` + // ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. + TimersClosed string `json:"TimersClosed,omitempty"` + // ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. + TimersInactive string `json:"TimersInactive,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_conversation_scoped_webhook_request.go b/rest/conversations/v1/model_update_service_conversation_scoped_webhook_request.go new file mode 100644 index 000000000..32495bc7a --- /dev/null +++ b/rest/conversations/v1/model_update_service_conversation_scoped_webhook_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceConversationScopedWebhookRequest struct for UpdateServiceConversationScopedWebhookRequest +type UpdateServiceConversationScopedWebhookRequest struct { + // The list of events, firing webhook event for this Conversation. + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + // The studio flow SID, where the webhook should be sent to. + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + // The HTTP method to be used when sending a webhook request. + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + // The list of keywords, firing webhook event for this Conversation. + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + // The absolute url the webhook request should be sent to. + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_notification_request.go b/rest/conversations/v1/model_update_service_notification_request.go new file mode 100644 index 000000000..86004ed4a --- /dev/null +++ b/rest/conversations/v1/model_update_service_notification_request.go @@ -0,0 +1,36 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceNotificationRequest struct for UpdateServiceNotificationRequest +type UpdateServiceNotificationRequest struct { + // Whether to send a notification when a participant is added to a conversation. The default is `false`. + AddedToConversationEnabled bool `json:"AddedToConversationEnabled,omitempty"` + // The name of the sound to play when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. + AddedToConversationSound string `json:"AddedToConversationSound,omitempty"` + // The template to use to create the notification text displayed when a participant is added to a conversation and `added_to_conversation.enabled` is `true`. + AddedToConversationTemplate string `json:"AddedToConversationTemplate,omitempty"` + // Weather the notification logging is enabled. + LogEnabled bool `json:"LogEnabled,omitempty"` + // Whether the new message badge is enabled. The default is `false`. + NewMessageBadgeCountEnabled bool `json:"NewMessageBadgeCountEnabled,omitempty"` + // Whether to send a notification when a new message is added to a conversation. The default is `false`. + NewMessageEnabled bool `json:"NewMessageEnabled,omitempty"` + // The name of the sound to play when a new message is added to a conversation and `new_message.enabled` is `true`. + NewMessageSound string `json:"NewMessageSound,omitempty"` + // The template to use to create the notification text displayed when a new message is added to a conversation and `new_message.enabled` is `true`. + NewMessageTemplate string `json:"NewMessageTemplate,omitempty"` + // Whether to send a notification to a user when they are removed from a conversation. The default is `false`. + RemovedFromConversationEnabled bool `json:"RemovedFromConversationEnabled,omitempty"` + // The name of the sound to play to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. + RemovedFromConversationSound string `json:"RemovedFromConversationSound,omitempty"` + // The template to use to create the notification text displayed to a user when they are removed from a conversation and `removed_from_conversation.enabled` is `true`. + RemovedFromConversationTemplate string `json:"RemovedFromConversationTemplate,omitempty"` +} diff --git a/rest/conversations/v1/model_update_service_role_request.go b/rest/conversations/v1/model_update_service_role_request.go new file mode 100644 index 000000000..76a502c66 --- /dev/null +++ b/rest/conversations/v1/model_update_service_role_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRoleRequest struct for UpdateServiceRoleRequest +type UpdateServiceRoleRequest struct { + // A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`. + Permission []string `json:"Permission"` +} diff --git a/rest/conversations/v1/model_update_service_user_request.go b/rest/conversations/v1/model_update_service_user_request.go new file mode 100644 index 000000000..34a50f6e9 --- /dev/null +++ b/rest/conversations/v1/model_update_service_user_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceUserRequest struct for UpdateServiceUserRequest +type UpdateServiceUserRequest struct { + // The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + Attributes string `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/model_update_user_request.go b/rest/conversations/v1/model_update_user_request.go new file mode 100644 index 000000000..ce4e30574 --- /dev/null +++ b/rest/conversations/v1/model_update_user_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateUserRequest struct for UpdateUserRequest +type UpdateUserRequest struct { + // The JSON Object string that stores application-specific data. If attributes have not been set, `{}` is returned. + Attributes string `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of a service-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the user. + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/conversations/v1/response.go b/rest/conversations/v1/response.go new file mode 100644 index 000000000..20057e3c3 --- /dev/null +++ b/rest/conversations/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Conversations + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/events/v1/.openapi-generator-ignore b/rest/events/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/events/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/events/v1/README.md b/rest/events/v1/README.md new file mode 100644 index 000000000..ffd3fa162 --- /dev/null +++ b/rest/events/v1/README.md @@ -0,0 +1,97 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateSink**](docs/DefaultApi.md#createsink) | **Post** /v1/Sinks | +*DefaultApi* | [**CreateSinkTest**](docs/DefaultApi.md#createsinktest) | **Post** /v1/Sinks/{Sid}/Test | +*DefaultApi* | [**CreateSinkValidate**](docs/DefaultApi.md#createsinkvalidate) | **Post** /v1/Sinks/{Sid}/Validate | +*DefaultApi* | [**CreateSubscription**](docs/DefaultApi.md#createsubscription) | **Post** /v1/Subscriptions | +*DefaultApi* | [**DeleteSink**](docs/DefaultApi.md#deletesink) | **Delete** /v1/Sinks/{Sid} | +*DefaultApi* | [**DeleteSubscription**](docs/DefaultApi.md#deletesubscription) | **Delete** /v1/Subscriptions/{Sid} | +*DefaultApi* | [**FetchEventType**](docs/DefaultApi.md#fetcheventtype) | **Get** /v1/Types/{Type} | +*DefaultApi* | [**FetchSchema**](docs/DefaultApi.md#fetchschema) | **Get** /v1/Schemas/{Id} | +*DefaultApi* | [**FetchSink**](docs/DefaultApi.md#fetchsink) | **Get** /v1/Sinks/{Sid} | +*DefaultApi* | [**FetchSubscription**](docs/DefaultApi.md#fetchsubscription) | **Get** /v1/Subscriptions/{Sid} | +*DefaultApi* | [**FetchVersion**](docs/DefaultApi.md#fetchversion) | **Get** /v1/Schemas/{Id}/Versions/{SchemaVersion} | +*DefaultApi* | [**ListEventType**](docs/DefaultApi.md#listeventtype) | **Get** /v1/Types | +*DefaultApi* | [**ListSink**](docs/DefaultApi.md#listsink) | **Get** /v1/Sinks | +*DefaultApi* | [**ListSubscribedEvent**](docs/DefaultApi.md#listsubscribedevent) | **Get** /v1/Subscriptions/{SubscriptionSid}/SubscribedEvents | +*DefaultApi* | [**ListSubscription**](docs/DefaultApi.md#listsubscription) | **Get** /v1/Subscriptions | +*DefaultApi* | [**ListVersion**](docs/DefaultApi.md#listversion) | **Get** /v1/Schemas/{Id}/Versions | +*DefaultApi* | [**UpdateSubscription**](docs/DefaultApi.md#updatesubscription) | **Post** /v1/Subscriptions/{Sid} | + + +## Documentation For Models + + - [CreateSinkRequest](docs/CreateSinkRequest.md) + - [CreateSinkValidateRequest](docs/CreateSinkValidateRequest.md) + - [CreateSubscriptionRequest](docs/CreateSubscriptionRequest.md) + - [EventsV1EventType](docs/EventsV1EventType.md) + - [EventsV1Schema](docs/EventsV1Schema.md) + - [EventsV1SchemaVersion](docs/EventsV1SchemaVersion.md) + - [EventsV1Sink](docs/EventsV1Sink.md) + - [EventsV1SinkSinkTest](docs/EventsV1SinkSinkTest.md) + - [EventsV1SinkSinkValidate](docs/EventsV1SinkSinkValidate.md) + - [EventsV1Subscription](docs/EventsV1Subscription.md) + - [EventsV1SubscriptionSubscribedEvent](docs/EventsV1SubscriptionSubscribedEvent.md) + - [ListEventTypeResponse](docs/ListEventTypeResponse.md) + - [ListSinkResponse](docs/ListSinkResponse.md) + - [ListSubscribedEventResponse](docs/ListSubscribedEventResponse.md) + - [ListSubscriptionResponse](docs/ListSubscriptionResponse.md) + - [ListVersionResponse](docs/ListVersionResponse.md) + - [ListVersionResponseMeta](docs/ListVersionResponseMeta.md) + - [UpdateSubscriptionRequest](docs/UpdateSubscriptionRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/events/v1/api_default.go b/rest/events/v1/api_default.go new file mode 100644 index 000000000..947e5233c --- /dev/null +++ b/rest/events/v1/api_default.go @@ -0,0 +1,661 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://events.twilio.com"), + } +} +// CreateSinkParams Optional parameters for the method 'CreateSink' +type CreateSinkParams struct { + Description *string `json:"Description,omitempty"` + SinkConfiguration *map[string]interface{} `json:"SinkConfiguration,omitempty"` + SinkType *string `json:"SinkType,omitempty"` +} + +/* +CreateSink Method for CreateSink +Create a new Sink + * @param optional nil or *CreateSinkOpts - Optional Parameters: + * @param "Description" (string) - A human readable description for the Sink + * @param "SinkConfiguration" (map[string]interface{}) - The information required for Twilio to connect to the provided Sink encoded as JSON. + * @param "SinkType" (string) - The Sink type. Can only be \\\"kinesis\\\" or \\\"webhook\\\" currently. +@return EventsV1Sink +*/ +func (c *DefaultApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, error) { + path := "/v1/Sinks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.SinkConfiguration != nil { + v, err := json.Marshal(params.SinkConfiguration) + + if err != nil { + return nil, err + } + + data.Set("SinkConfiguration", fmt.Sprint(v)) + } + if params != nil && params.SinkType != nil { + data.Set("SinkType", *params.SinkType) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +CreateSinkTest Method for CreateSinkTest +Create a new Sink Test Event for the given Sink. + * @param Sid A 34 character string that uniquely identifies the Sink to be Tested. +@return EventsV1SinkSinkTest +*/ +func (c *DefaultApiService) CreateSinkTest(Sid string) (*EventsV1SinkSinkTest, error) { + path := "/v1/Sinks/{Sid}/Test" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1SinkSinkTest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSinkValidateParams Optional parameters for the method 'CreateSinkValidate' +type CreateSinkValidateParams struct { + TestId *string `json:"TestId,omitempty"` +} + +/* +CreateSinkValidate Method for CreateSinkValidate +Validate that a test event for a Sink was received. + * @param Sid + * @param optional nil or *CreateSinkValidateOpts - Optional Parameters: + * @param "TestId" (string) - A 34 character string that uniquely identifies the test event for a Sink being validated. +@return EventsV1SinkSinkValidate +*/ +func (c *DefaultApiService) CreateSinkValidate(Sid string, params *CreateSinkValidateParams) (*EventsV1SinkSinkValidate, error) { + path := "/v1/Sinks/{Sid}/Validate" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TestId != nil { + data.Set("TestId", *params.TestId) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1SinkSinkValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSubscriptionParams Optional parameters for the method 'CreateSubscription' +type CreateSubscriptionParams struct { + Description *string `json:"Description,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` + Types *[]map[string]interface{} `json:"Types,omitempty"` +} + +/* +CreateSubscription Method for CreateSubscription +Create a new Subscription. + * @param optional nil or *CreateSubscriptionOpts - Optional Parameters: + * @param "Description" (string) - A human readable description for the Subscription + * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. + * @param "Types" ([]map[string]interface{}) - Contains a dictionary of URL links to nested resources of this Subscription. +@return EventsV1Subscription +*/ +func (c *DefaultApiService) CreateSubscription(params *CreateSubscriptionParams) (*EventsV1Subscription, error) { + path := "/v1/Subscriptions" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } + if params != nil && params.Types != nil { + v, err := json.Marshal(params.Types) + + if err != nil { + return nil, err + } + + data.Set("Types", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteSink Method for DeleteSink +Delete a specific Sink. + * @param Sid A 34 character string that uniquely identifies this Sink. +*/ +func (c *DefaultApiService) DeleteSink(Sid string) (error) { + path := "/v1/Sinks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSubscription Method for DeleteSubscription +Delete a specific Subscription. + * @param Sid A 34 character string that uniquely identifies this Subscription. +*/ +func (c *DefaultApiService) DeleteSubscription(Sid string) (error) { + path := "/v1/Subscriptions/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchEventType Method for FetchEventType +Fetch a specific Event Type. + * @param Type A string that uniquely identifies this Event Type. +@return EventsV1EventType +*/ +func (c *DefaultApiService) FetchEventType(Type string) (*EventsV1EventType, error) { + path := "/v1/Types/{Type}" + path = strings.Replace(path, "{"+"Type"+"}", Type, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1EventType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSchema Method for FetchSchema +Fetch a specific schema with its nested versions. + * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. +@return EventsV1Schema +*/ +func (c *DefaultApiService) FetchSchema(Id string) (*EventsV1Schema, error) { + path := "/v1/Schemas/{Id}" + path = strings.Replace(path, "{"+"Id"+"}", Id, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Schema{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSink Method for FetchSink +Fetch a specific Sink. + * @param Sid A 34 character string that uniquely identifies this Sink. +@return EventsV1Sink +*/ +func (c *DefaultApiService) FetchSink(Sid string) (*EventsV1Sink, error) { + path := "/v1/Sinks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Sink{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSubscription Method for FetchSubscription +Fetch a specific Subscription. + * @param Sid A 34 character string that uniquely identifies this Subscription. +@return EventsV1Subscription +*/ +func (c *DefaultApiService) FetchSubscription(Sid string) (*EventsV1Subscription, error) { + path := "/v1/Subscriptions/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVersion Method for FetchVersion +Fetch a specific schema and version. + * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. + * @param SchemaVersion The version of the schema +@return EventsV1SchemaVersion +*/ +func (c *DefaultApiService) FetchVersion(Id string, SchemaVersion int32) (*EventsV1SchemaVersion, error) { + path := "/v1/Schemas/{Id}/Versions/{SchemaVersion}" + path = strings.Replace(path, "{"+"Id"+"}", Id, -1) + path = strings.Replace(path, "{"+"SchemaVersion"+"}", fmt.Sprint(SchemaVersion), -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1SchemaVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEventTypeParams Optional parameters for the method 'ListEventType' +type ListEventTypeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEventType Method for ListEventType +Retrieve a paginated list of all the available Event Types. + * @param optional nil or *ListEventTypeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEventTypeResponse +*/ +func (c *DefaultApiService) ListEventType(params *ListEventTypeParams) (*ListEventTypeResponse, error) { + path := "/v1/Types" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEventTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSinkParams Optional parameters for the method 'ListSink' +type ListSinkParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSink Method for ListSink +Retrieve a paginated list of Sinks belonging to the account used to make the request. + * @param optional nil or *ListSinkOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSinkResponse +*/ +func (c *DefaultApiService) ListSink(params *ListSinkParams) (*ListSinkResponse, error) { + path := "/v1/Sinks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSinkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSubscribedEventParams Optional parameters for the method 'ListSubscribedEvent' +type ListSubscribedEventParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSubscribedEvent Method for ListSubscribedEvent +Retrieve a list of all Subscribed Event types for a Subscription. + * @param SubscriptionSid The unique SID identifier of the Subscription. + * @param optional nil or *ListSubscribedEventOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSubscribedEventResponse +*/ +func (c *DefaultApiService) ListSubscribedEvent(SubscriptionSid string, params *ListSubscribedEventParams) (*ListSubscribedEventResponse, error) { + path := "/v1/Subscriptions/{SubscriptionSid}/SubscribedEvents" + path = strings.Replace(path, "{"+"SubscriptionSid"+"}", SubscriptionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSubscribedEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSubscriptionParams Optional parameters for the method 'ListSubscription' +type ListSubscriptionParams struct { + SinkSid *string `json:"SinkSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSubscription Method for ListSubscription +Retrieve a paginated list of Subscriptions belonging to the account used to make the request. + * @param optional nil or *ListSubscriptionOpts - Optional Parameters: + * @param "SinkSid" (string) - The SID of the sink that the list of Subscriptions should be filtered by. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSubscriptionResponse +*/ +func (c *DefaultApiService) ListSubscription(params *ListSubscriptionParams) (*ListSubscriptionResponse, error) { + path := "/v1/Subscriptions" + + + data := url.Values{} + headers := 0 + + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSubscriptionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVersionParams Optional parameters for the method 'ListVersion' +type ListVersionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVersion Method for ListVersion +Retrieve a paginated list of versions of the schema. + * @param Id The unique identifier of the schema. Each schema can have multiple versions, that share the same id. + * @param optional nil or *ListVersionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVersionResponse +*/ +func (c *DefaultApiService) ListVersion(Id string, params *ListVersionParams) (*ListVersionResponse, error) { + path := "/v1/Schemas/{Id}/Versions" + path = strings.Replace(path, "{"+"Id"+"}", Id, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSubscriptionParams Optional parameters for the method 'UpdateSubscription' +type UpdateSubscriptionParams struct { + Description *string `json:"Description,omitempty"` + SinkSid *string `json:"SinkSid,omitempty"` +} + +/* +UpdateSubscription Method for UpdateSubscription +Update a Subscription. + * @param Sid A 34 character string that uniquely identifies this Subscription. + * @param optional nil or *UpdateSubscriptionOpts - Optional Parameters: + * @param "Description" (string) - A human readable description for the Subscription. + * @param "SinkSid" (string) - The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. +@return EventsV1Subscription +*/ +func (c *DefaultApiService) UpdateSubscription(Sid string, params *UpdateSubscriptionParams) (*EventsV1Subscription, error) { + path := "/v1/Subscriptions/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.SinkSid != nil { + data.Set("SinkSid", *params.SinkSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &EventsV1Subscription{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/events/v1/docs/CreateSinkRequest.md b/rest/events/v1/docs/CreateSinkRequest.md new file mode 100644 index 000000000..97a904d38 --- /dev/null +++ b/rest/events/v1/docs/CreateSinkRequest.md @@ -0,0 +1,13 @@ +# CreateSinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | A human readable description for the Sink | +**SinkConfiguration** | [**map[string]interface{}**](.md) | The information required for Twilio to connect to the provided Sink encoded as JSON. | +**SinkType** | **string** | The Sink type. Can only be \"kinesis\" or \"webhook\" currently. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/CreateSinkValidateRequest.md b/rest/events/v1/docs/CreateSinkValidateRequest.md new file mode 100644 index 000000000..455f1fb14 --- /dev/null +++ b/rest/events/v1/docs/CreateSinkValidateRequest.md @@ -0,0 +1,11 @@ +# CreateSinkValidateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TestId** | **string** | A 34 character string that uniquely identifies the test event for a Sink being validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/CreateSubscriptionRequest.md b/rest/events/v1/docs/CreateSubscriptionRequest.md new file mode 100644 index 000000000..885330e69 --- /dev/null +++ b/rest/events/v1/docs/CreateSubscriptionRequest.md @@ -0,0 +1,13 @@ +# CreateSubscriptionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | A human readable description for the Subscription | +**SinkSid** | **string** | The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. | +**Types** | **[]map[string]interface{}** | Contains a dictionary of URL links to nested resources of this Subscription. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/DefaultApi.md b/rest/events/v1/docs/DefaultApi.md new file mode 100644 index 000000000..2dea9f778 --- /dev/null +++ b/rest/events/v1/docs/DefaultApi.md @@ -0,0 +1,699 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSink**](DefaultApi.md#CreateSink) | **Post** /v1/Sinks | +[**CreateSinkTest**](DefaultApi.md#CreateSinkTest) | **Post** /v1/Sinks/{Sid}/Test | +[**CreateSinkValidate**](DefaultApi.md#CreateSinkValidate) | **Post** /v1/Sinks/{Sid}/Validate | +[**CreateSubscription**](DefaultApi.md#CreateSubscription) | **Post** /v1/Subscriptions | +[**DeleteSink**](DefaultApi.md#DeleteSink) | **Delete** /v1/Sinks/{Sid} | +[**DeleteSubscription**](DefaultApi.md#DeleteSubscription) | **Delete** /v1/Subscriptions/{Sid} | +[**FetchEventType**](DefaultApi.md#FetchEventType) | **Get** /v1/Types/{Type} | +[**FetchSchema**](DefaultApi.md#FetchSchema) | **Get** /v1/Schemas/{Id} | +[**FetchSink**](DefaultApi.md#FetchSink) | **Get** /v1/Sinks/{Sid} | +[**FetchSubscription**](DefaultApi.md#FetchSubscription) | **Get** /v1/Subscriptions/{Sid} | +[**FetchVersion**](DefaultApi.md#FetchVersion) | **Get** /v1/Schemas/{Id}/Versions/{SchemaVersion} | +[**ListEventType**](DefaultApi.md#ListEventType) | **Get** /v1/Types | +[**ListSink**](DefaultApi.md#ListSink) | **Get** /v1/Sinks | +[**ListSubscribedEvent**](DefaultApi.md#ListSubscribedEvent) | **Get** /v1/Subscriptions/{SubscriptionSid}/SubscribedEvents | +[**ListSubscription**](DefaultApi.md#ListSubscription) | **Get** /v1/Subscriptions | +[**ListVersion**](DefaultApi.md#ListVersion) | **Get** /v1/Schemas/{Id}/Versions | +[**UpdateSubscription**](DefaultApi.md#UpdateSubscription) | **Post** /v1/Subscriptions/{Sid} | + + + +## CreateSink + +> EventsV1Sink CreateSink(ctx, optional) + + + +Create a new Sink + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateSinkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSinkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Description** | **optional.String**| A human readable description for the Sink | + **SinkConfiguration** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The information required for Twilio to connect to the provided Sink encoded as JSON. | + **SinkType** | **optional.String**| The Sink type. Can only be \\\"kinesis\\\" or \\\"webhook\\\" currently. | + +### Return type + +[**EventsV1Sink**](events.v1.sink.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSinkTest + +> EventsV1SinkSinkTest CreateSinkTest(ctx, Sid) + + + +Create a new Sink Test Event for the given Sink. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies the Sink to be Tested. | + +### Return type + +[**EventsV1SinkSinkTest**](events.v1.sink.sink_test.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSinkValidate + +> EventsV1SinkSinkValidate CreateSinkValidate(ctx, Sid, optional) + + + +Validate that a test event for a Sink was received. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***CreateSinkValidateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSinkValidateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **TestId** | **optional.String**| A 34 character string that uniquely identifies the test event for a Sink being validated. | + +### Return type + +[**EventsV1SinkSinkValidate**](events.v1.sink.sink_validate.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSubscription + +> EventsV1Subscription CreateSubscription(ctx, optional) + + + +Create a new Subscription. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateSubscriptionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSubscriptionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Description** | **optional.String**| A human readable description for the Subscription | + **SinkSid** | **optional.String**| The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. | + **Types** | [**optional.Interface of []map[string]interface{}**](map[string]interface{}.md)| Contains a dictionary of URL links to nested resources of this Subscription. | + +### Return type + +[**EventsV1Subscription**](events.v1.subscription.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSink + +> DeleteSink(ctx, Sid) + + + +Delete a specific Sink. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this Sink. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSubscription + +> DeleteSubscription(ctx, Sid) + + + +Delete a specific Subscription. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this Subscription. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEventType + +> EventsV1EventType FetchEventType(ctx, Type) + + + +Fetch a specific Event Type. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Type** | **string**| A string that uniquely identifies this Event Type. | + +### Return type + +[**EventsV1EventType**](events.v1.event_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSchema + +> EventsV1Schema FetchSchema(ctx, Id) + + + +Fetch a specific schema with its nested versions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string**| The unique identifier of the schema. Each schema can have multiple versions, that share the same id. | + +### Return type + +[**EventsV1Schema**](events.v1.schema.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSink + +> EventsV1Sink FetchSink(ctx, Sid) + + + +Fetch a specific Sink. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this Sink. | + +### Return type + +[**EventsV1Sink**](events.v1.sink.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSubscription + +> EventsV1Subscription FetchSubscription(ctx, Sid) + + + +Fetch a specific Subscription. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this Subscription. | + +### Return type + +[**EventsV1Subscription**](events.v1.subscription.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVersion + +> EventsV1SchemaVersion FetchVersion(ctx, Id, SchemaVersion) + + + +Fetch a specific schema and version. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string**| The unique identifier of the schema. Each schema can have multiple versions, that share the same id. | +**SchemaVersion** | **int32**| The version of the schema | + +### Return type + +[**EventsV1SchemaVersion**](events.v1.schema.version.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEventType + +> ListEventTypeResponse ListEventType(ctx, optional) + + + +Retrieve a paginated list of all the available Event Types. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListEventTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEventTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEventTypeResponse**](ListEventTypeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSink + +> ListSinkResponse ListSink(ctx, optional) + + + +Retrieve a paginated list of Sinks belonging to the account used to make the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSinkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSinkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSinkResponse**](ListSinkResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSubscribedEvent + +> ListSubscribedEventResponse ListSubscribedEvent(ctx, SubscriptionSid, optional) + + + +Retrieve a list of all Subscribed Event types for a Subscription. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubscriptionSid** | **string**| The unique SID identifier of the Subscription. | + **optional** | ***ListSubscribedEventOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSubscribedEventOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSubscribedEventResponse**](ListSubscribedEventResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSubscription + +> ListSubscriptionResponse ListSubscription(ctx, optional) + + + +Retrieve a paginated list of Subscriptions belonging to the account used to make the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSubscriptionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSubscriptionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **SinkSid** | **optional.String**| The SID of the sink that the list of Subscriptions should be filtered by. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSubscriptionResponse**](ListSubscriptionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVersion + +> ListVersionResponse ListVersion(ctx, Id, optional) + + + +Retrieve a paginated list of versions of the schema. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string**| The unique identifier of the schema. Each schema can have multiple versions, that share the same id. | + **optional** | ***ListVersionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVersionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVersionResponse**](ListVersionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSubscription + +> EventsV1Subscription UpdateSubscription(ctx, Sid, optional) + + + +Update a Subscription. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this Subscription. | + **optional** | ***UpdateSubscriptionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSubscriptionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Description** | **optional.String**| A human readable description for the Subscription. | + **SinkSid** | **optional.String**| The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. | + +### Return type + +[**EventsV1Subscription**](events.v1.subscription.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/events/v1/docs/EventsV1EventType.md b/rest/events/v1/docs/EventsV1EventType.md new file mode 100644 index 000000000..d885345c0 --- /dev/null +++ b/rest/events/v1/docs/EventsV1EventType.md @@ -0,0 +1,17 @@ +# EventsV1EventType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Description** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**SchemaId** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1Schema.md b/rest/events/v1/docs/EventsV1Schema.md new file mode 100644 index 000000000..8523908c5 --- /dev/null +++ b/rest/events/v1/docs/EventsV1Schema.md @@ -0,0 +1,15 @@ +# EventsV1Schema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] +**LastCreated** | [**time.Time**](time.Time.md) | | [optional] +**LastVersion** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1SchemaVersion.md b/rest/events/v1/docs/EventsV1SchemaVersion.md new file mode 100644 index 000000000..7826ab1d8 --- /dev/null +++ b/rest/events/v1/docs/EventsV1SchemaVersion.md @@ -0,0 +1,15 @@ +# EventsV1SchemaVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**Id** | **string** | | [optional] +**Raw** | **string** | | [optional] +**SchemaVersion** | **int32** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1Sink.md b/rest/events/v1/docs/EventsV1Sink.md new file mode 100644 index 000000000..440ff6116 --- /dev/null +++ b/rest/events/v1/docs/EventsV1Sink.md @@ -0,0 +1,19 @@ +# EventsV1Sink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Description** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**SinkConfiguration** | [**map[string]interface{}**](.md) | | [optional] +**SinkType** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1SinkSinkTest.md b/rest/events/v1/docs/EventsV1SinkSinkTest.md new file mode 100644 index 000000000..3bb0f5ca9 --- /dev/null +++ b/rest/events/v1/docs/EventsV1SinkSinkTest.md @@ -0,0 +1,11 @@ +# EventsV1SinkSinkTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1SinkSinkValidate.md b/rest/events/v1/docs/EventsV1SinkSinkValidate.md new file mode 100644 index 000000000..aab9f5876 --- /dev/null +++ b/rest/events/v1/docs/EventsV1SinkSinkValidate.md @@ -0,0 +1,11 @@ +# EventsV1SinkSinkValidate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1Subscription.md b/rest/events/v1/docs/EventsV1Subscription.md new file mode 100644 index 000000000..c3af47fc2 --- /dev/null +++ b/rest/events/v1/docs/EventsV1Subscription.md @@ -0,0 +1,18 @@ +# EventsV1Subscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Description** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**SinkSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md b/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md new file mode 100644 index 000000000..7f60bf747 --- /dev/null +++ b/rest/events/v1/docs/EventsV1SubscriptionSubscribedEvent.md @@ -0,0 +1,15 @@ +# EventsV1SubscriptionSubscribedEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**SubscriptionSid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] +**Version** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListEventTypeResponse.md b/rest/events/v1/docs/ListEventTypeResponse.md new file mode 100644 index 000000000..fa3d3ffc1 --- /dev/null +++ b/rest/events/v1/docs/ListEventTypeResponse.md @@ -0,0 +1,12 @@ +# ListEventTypeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | | [optional] +**Types** | [**[]EventsV1EventType**](events.v1.event_type.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListSinkResponse.md b/rest/events/v1/docs/ListSinkResponse.md new file mode 100644 index 000000000..09e3950c5 --- /dev/null +++ b/rest/events/v1/docs/ListSinkResponse.md @@ -0,0 +1,12 @@ +# ListSinkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | | [optional] +**Sinks** | [**[]EventsV1Sink**](events.v1.sink.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListSubscribedEventResponse.md b/rest/events/v1/docs/ListSubscribedEventResponse.md new file mode 100644 index 000000000..18d94090e --- /dev/null +++ b/rest/events/v1/docs/ListSubscribedEventResponse.md @@ -0,0 +1,12 @@ +# ListSubscribedEventResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | | [optional] +**Types** | [**[]EventsV1SubscriptionSubscribedEvent**](events.v1.subscription.subscribed_event.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListSubscriptionResponse.md b/rest/events/v1/docs/ListSubscriptionResponse.md new file mode 100644 index 000000000..feaacbd44 --- /dev/null +++ b/rest/events/v1/docs/ListSubscriptionResponse.md @@ -0,0 +1,12 @@ +# ListSubscriptionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | | [optional] +**Subscriptions** | [**[]EventsV1Subscription**](events.v1.subscription.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListVersionResponse.md b/rest/events/v1/docs/ListVersionResponse.md new file mode 100644 index 000000000..39f134783 --- /dev/null +++ b/rest/events/v1/docs/ListVersionResponse.md @@ -0,0 +1,12 @@ +# ListVersionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVersionResponseMeta**](ListVersionResponse_meta.md) | | [optional] +**SchemaVersions** | [**[]EventsV1SchemaVersion**](events.v1.schema.version.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/ListVersionResponseMeta.md b/rest/events/v1/docs/ListVersionResponseMeta.md new file mode 100644 index 000000000..52e7bdd1e --- /dev/null +++ b/rest/events/v1/docs/ListVersionResponseMeta.md @@ -0,0 +1,17 @@ +# ListVersionResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/docs/UpdateSubscriptionRequest.md b/rest/events/v1/docs/UpdateSubscriptionRequest.md new file mode 100644 index 000000000..9f369c5e6 --- /dev/null +++ b/rest/events/v1/docs/UpdateSubscriptionRequest.md @@ -0,0 +1,12 @@ +# UpdateSubscriptionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | A human readable description for the Subscription. | [optional] +**SinkSid** | **string** | The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/events/v1/model_create_sink_request.go b/rest/events/v1/model_create_sink_request.go new file mode 100644 index 000000000..124b051c2 --- /dev/null +++ b/rest/events/v1/model_create_sink_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSinkRequest struct for CreateSinkRequest +type CreateSinkRequest struct { + // A human readable description for the Sink + Description string `json:"Description"` + // The information required for Twilio to connect to the provided Sink encoded as JSON. + SinkConfiguration map[string]interface{} `json:"SinkConfiguration"` + // The Sink type. Can only be \"kinesis\" or \"webhook\" currently. + SinkType string `json:"SinkType"` +} diff --git a/rest/events/v1/model_create_sink_validate_request.go b/rest/events/v1/model_create_sink_validate_request.go new file mode 100644 index 000000000..5ece92ba5 --- /dev/null +++ b/rest/events/v1/model_create_sink_validate_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSinkValidateRequest struct for CreateSinkValidateRequest +type CreateSinkValidateRequest struct { + // A 34 character string that uniquely identifies the test event for a Sink being validated. + TestId string `json:"TestId"` +} diff --git a/rest/events/v1/model_create_subscription_request.go b/rest/events/v1/model_create_subscription_request.go new file mode 100644 index 000000000..dfce3bba7 --- /dev/null +++ b/rest/events/v1/model_create_subscription_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSubscriptionRequest struct for CreateSubscriptionRequest +type CreateSubscriptionRequest struct { + // A human readable description for the Subscription + Description string `json:"Description"` + // The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. + SinkSid string `json:"SinkSid"` + // Contains a dictionary of URL links to nested resources of this Subscription. + Types []map[string]interface{} `json:"Types"` +} diff --git a/rest/events/v1/model_events_v1_event_type.go b/rest/events/v1/model_events_v1_event_type.go new file mode 100644 index 000000000..e9fd8a1d3 --- /dev/null +++ b/rest/events/v1/model_events_v1_event_type.go @@ -0,0 +1,24 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// EventsV1EventType struct for EventsV1EventType +type EventsV1EventType struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + SchemaId string `json:"SchemaId,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_schema.go b/rest/events/v1/model_events_v1_schema.go new file mode 100644 index 000000000..29355fc8b --- /dev/null +++ b/rest/events/v1/model_events_v1_schema.go @@ -0,0 +1,22 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// EventsV1Schema struct for EventsV1Schema +type EventsV1Schema struct { + Id string `json:"Id,omitempty"` + LastCreated time.Time `json:"LastCreated,omitempty"` + LastVersion int32 `json:"LastVersion,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_schema_version.go b/rest/events/v1/model_events_v1_schema_version.go new file mode 100644 index 000000000..0f57f9fe3 --- /dev/null +++ b/rest/events/v1/model_events_v1_schema_version.go @@ -0,0 +1,22 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// EventsV1SchemaVersion struct for EventsV1SchemaVersion +type EventsV1SchemaVersion struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + Id string `json:"Id,omitempty"` + Raw string `json:"Raw,omitempty"` + SchemaVersion int32 `json:"SchemaVersion,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_sink.go b/rest/events/v1/model_events_v1_sink.go new file mode 100644 index 000000000..e4544085d --- /dev/null +++ b/rest/events/v1/model_events_v1_sink.go @@ -0,0 +1,26 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// EventsV1Sink struct for EventsV1Sink +type EventsV1Sink struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + SinkConfiguration map[string]interface{} `json:"SinkConfiguration,omitempty"` + SinkType string `json:"SinkType,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_sink_sink_test_.go b/rest/events/v1/model_events_v1_sink_sink_test_.go new file mode 100644 index 000000000..4b840c7b9 --- /dev/null +++ b/rest/events/v1/model_events_v1_sink_sink_test_.go @@ -0,0 +1,15 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// EventsV1SinkSinkTest struct for EventsV1SinkSinkTest +type EventsV1SinkSinkTest struct { + Result string `json:"Result,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_sink_sink_validate.go b/rest/events/v1/model_events_v1_sink_sink_validate.go new file mode 100644 index 000000000..f2b5a7f0b --- /dev/null +++ b/rest/events/v1/model_events_v1_sink_sink_validate.go @@ -0,0 +1,15 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// EventsV1SinkSinkValidate struct for EventsV1SinkSinkValidate +type EventsV1SinkSinkValidate struct { + Result string `json:"Result,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_subscription.go b/rest/events/v1/model_events_v1_subscription.go new file mode 100644 index 000000000..2ced00add --- /dev/null +++ b/rest/events/v1/model_events_v1_subscription.go @@ -0,0 +1,25 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// EventsV1Subscription struct for EventsV1Subscription +type EventsV1Subscription struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + SinkSid string `json:"SinkSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_events_v1_subscription_subscribed_event.go b/rest/events/v1/model_events_v1_subscription_subscribed_event.go new file mode 100644 index 000000000..7b966341e --- /dev/null +++ b/rest/events/v1/model_events_v1_subscription_subscribed_event.go @@ -0,0 +1,19 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// EventsV1SubscriptionSubscribedEvent struct for EventsV1SubscriptionSubscribedEvent +type EventsV1SubscriptionSubscribedEvent struct { + AccountSid string `json:"AccountSid,omitempty"` + SubscriptionSid string `json:"SubscriptionSid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` + Version int32 `json:"Version,omitempty"` +} diff --git a/rest/events/v1/model_list_event_type_response.go b/rest/events/v1/model_list_event_type_response.go new file mode 100644 index 000000000..32c703635 --- /dev/null +++ b/rest/events/v1/model_list_event_type_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEventTypeResponse struct for ListEventTypeResponse +type ListEventTypeResponse struct { + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Types []EventsV1EventType `json:"Types,omitempty"` +} diff --git a/rest/events/v1/model_list_sink_response.go b/rest/events/v1/model_list_sink_response.go new file mode 100644 index 000000000..408615f16 --- /dev/null +++ b/rest/events/v1/model_list_sink_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSinkResponse struct for ListSinkResponse +type ListSinkResponse struct { + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Sinks []EventsV1Sink `json:"Sinks,omitempty"` +} diff --git a/rest/events/v1/model_list_subscribed_event_response.go b/rest/events/v1/model_list_subscribed_event_response.go new file mode 100644 index 000000000..5bcdefc05 --- /dev/null +++ b/rest/events/v1/model_list_subscribed_event_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSubscribedEventResponse struct for ListSubscribedEventResponse +type ListSubscribedEventResponse struct { + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Types []EventsV1SubscriptionSubscribedEvent `json:"Types,omitempty"` +} diff --git a/rest/events/v1/model_list_subscription_response.go b/rest/events/v1/model_list_subscription_response.go new file mode 100644 index 000000000..106708db0 --- /dev/null +++ b/rest/events/v1/model_list_subscription_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSubscriptionResponse struct for ListSubscriptionResponse +type ListSubscriptionResponse struct { + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + Subscriptions []EventsV1Subscription `json:"Subscriptions,omitempty"` +} diff --git a/rest/events/v1/model_list_version_response.go b/rest/events/v1/model_list_version_response.go new file mode 100644 index 000000000..be4dc7892 --- /dev/null +++ b/rest/events/v1/model_list_version_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVersionResponse struct for ListVersionResponse +type ListVersionResponse struct { + Meta ListVersionResponseMeta `json:"Meta,omitempty"` + SchemaVersions []EventsV1SchemaVersion `json:"SchemaVersions,omitempty"` +} diff --git a/rest/events/v1/model_list_version_response_meta.go b/rest/events/v1/model_list_version_response_meta.go new file mode 100644 index 000000000..f90c3b50f --- /dev/null +++ b/rest/events/v1/model_list_version_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVersionResponseMeta struct for ListVersionResponseMeta +type ListVersionResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/events/v1/model_update_subscription_request.go b/rest/events/v1/model_update_subscription_request.go new file mode 100644 index 000000000..97ab33e04 --- /dev/null +++ b/rest/events/v1/model_update_subscription_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSubscriptionRequest struct for UpdateSubscriptionRequest +type UpdateSubscriptionRequest struct { + // A human readable description for the Subscription. + Description string `json:"Description,omitempty"` + // The SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created. + SinkSid string `json:"SinkSid,omitempty"` +} diff --git a/rest/events/v1/response.go b/rest/events/v1/response.go new file mode 100644 index 000000000..dce71a459 --- /dev/null +++ b/rest/events/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Events + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/fax/v1/.openapi-generator-ignore b/rest/fax/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/fax/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/fax/v1/README.md b/rest/fax/v1/README.md new file mode 100644 index 000000000..701a7248e --- /dev/null +++ b/rest/fax/v1/README.md @@ -0,0 +1,77 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateFax**](docs/DefaultApi.md#createfax) | **Post** /v1/Faxes | +*DefaultApi* | [**DeleteFax**](docs/DefaultApi.md#deletefax) | **Delete** /v1/Faxes/{Sid} | +*DefaultApi* | [**DeleteFaxMedia**](docs/DefaultApi.md#deletefaxmedia) | **Delete** /v1/Faxes/{FaxSid}/Media/{Sid} | +*DefaultApi* | [**FetchFax**](docs/DefaultApi.md#fetchfax) | **Get** /v1/Faxes/{Sid} | +*DefaultApi* | [**FetchFaxMedia**](docs/DefaultApi.md#fetchfaxmedia) | **Get** /v1/Faxes/{FaxSid}/Media/{Sid} | +*DefaultApi* | [**ListFax**](docs/DefaultApi.md#listfax) | **Get** /v1/Faxes | +*DefaultApi* | [**ListFaxMedia**](docs/DefaultApi.md#listfaxmedia) | **Get** /v1/Faxes/{FaxSid}/Media | +*DefaultApi* | [**UpdateFax**](docs/DefaultApi.md#updatefax) | **Post** /v1/Faxes/{Sid} | + + +## Documentation For Models + + - [CreateFaxRequest](docs/CreateFaxRequest.md) + - [FaxV1Fax](docs/FaxV1Fax.md) + - [FaxV1FaxFaxMedia](docs/FaxV1FaxFaxMedia.md) + - [ListFaxMediaResponse](docs/ListFaxMediaResponse.md) + - [ListFaxResponse](docs/ListFaxResponse.md) + - [ListFaxResponseMeta](docs/ListFaxResponseMeta.md) + - [UpdateFaxRequest](docs/UpdateFaxRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/fax/v1/api_default.go b/rest/fax/v1/api_default.go new file mode 100644 index 000000000..53b685e18 --- /dev/null +++ b/rest/fax/v1/api_default.go @@ -0,0 +1,364 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://fax.twilio.com"), + } +} +// CreateFaxParams Optional parameters for the method 'CreateFax' +type CreateFaxParams struct { + From *string `json:"From,omitempty"` + MediaUrl *string `json:"MediaUrl,omitempty"` + Quality *string `json:"Quality,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StoreMedia *bool `json:"StoreMedia,omitempty"` + To *string `json:"To,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +CreateFax Method for CreateFax +Create a new fax to send to a phone number or SIP endpoint. + * @param optional nil or *CreateFaxOpts - Optional Parameters: + * @param "From" (string) - The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request. + * @param "MediaUrl" (string) - The URL of the PDF that contains the fax. See our [security](https://www.twilio.com/docs/usage/security) page for information on how to ensure the request for your media comes from Twilio. + * @param "Quality" (string) - The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`. + * @param "SipAuthPassword" (string) - The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address. + * @param "SipAuthUsername" (string) - The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address. + * @param "StatusCallback" (string) - The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes. + * @param "StoreMedia" (bool) - Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`. + * @param "To" (string) - The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. + * @param "Ttl" (int32) - How long in minutes from when the fax is initiated that we should try to send the fax. +@return FaxV1Fax +*/ +func (c *DefaultApiService) CreateFax(params *CreateFaxParams) (*FaxV1Fax, error) { + path := "/v1/Faxes" + + + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", *params.MediaUrl) + } + if params != nil && params.Quality != nil { + data.Set("Quality", *params.Quality) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StoreMedia != nil { + data.Set("StoreMedia", fmt.Sprint(*params.StoreMedia)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteFax Method for DeleteFax +Delete a specific fax and its associated media. + * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to delete. +*/ +func (c *DefaultApiService) DeleteFax(Sid string) (error) { + path := "/v1/Faxes/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFaxMedia Method for DeleteFaxMedia +Delete a specific fax media instance. + * @param FaxSid The SID of the fax with the FaxMedia resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to delete. +*/ +func (c *DefaultApiService) DeleteFaxMedia(FaxSid string, Sid string) (error) { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" + path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchFax Method for FetchFax +Fetch a specific fax. + * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to fetch. +@return FaxV1Fax +*/ +func (c *DefaultApiService) FetchFax(Sid string) (*FaxV1Fax, error) { + path := "/v1/Faxes/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFaxMedia Method for FetchFaxMedia +Fetch a specific fax media instance. + * @param FaxSid The SID of the fax with the FaxMedia resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the FaxMedia resource to fetch. +@return FaxV1FaxFaxMedia +*/ +func (c *DefaultApiService) FetchFaxMedia(FaxSid string, Sid string) (*FaxV1FaxFaxMedia, error) { + path := "/v1/Faxes/{FaxSid}/Media/{Sid}" + path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FaxV1FaxFaxMedia{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFaxParams Optional parameters for the method 'ListFax' +type ListFaxParams struct { + From *string `json:"From,omitempty"` + To *string `json:"To,omitempty"` + DateCreatedOnOrBefore *time.Time `json:"DateCreatedOnOrBefore,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFax Method for ListFax +Retrieve a list of all faxes. + * @param optional nil or *ListFaxOpts - Optional Parameters: + * @param "From" (string) - Retrieve only those faxes sent from this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. + * @param "To" (string) - Retrieve only those faxes sent to this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. + * @param "DateCreatedOnOrBefore" (time.Time) - Retrieve only those faxes with a `date_created` that is before or equal to this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "DateCreatedAfter" (time.Time) - Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFaxResponse +*/ +func (c *DefaultApiService) ListFax(params *ListFaxParams) (*ListFaxResponse, error) { + path := "/v1/Faxes" + + + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.DateCreatedOnOrBefore != nil { + data.Set("DateCreatedOnOrBefore", fmt.Sprint(*params.DateCreatedOnOrBefore)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFaxResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFaxMediaParams Optional parameters for the method 'ListFaxMedia' +type ListFaxMediaParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFaxMedia Method for ListFaxMedia +Retrieve a list of all fax media instances for the specified fax. + * @param FaxSid The SID of the fax with the FaxMedia resources to read. + * @param optional nil or *ListFaxMediaOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFaxMediaResponse +*/ +func (c *DefaultApiService) ListFaxMedia(FaxSid string, params *ListFaxMediaParams) (*ListFaxMediaResponse, error) { + path := "/v1/Faxes/{FaxSid}/Media" + path = strings.Replace(path, "{"+"FaxSid"+"}", FaxSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFaxMediaResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFaxParams Optional parameters for the method 'UpdateFax' +type UpdateFaxParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateFax Method for UpdateFax +Update a specific fax. + * @param Sid The Twilio-provided string that uniquely identifies the Fax resource to update. + * @param optional nil or *UpdateFaxOpts - Optional Parameters: + * @param "Status" (string) - The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. +@return FaxV1Fax +*/ +func (c *DefaultApiService) UpdateFax(Sid string, params *UpdateFaxParams) (*FaxV1Fax, error) { + path := "/v1/Faxes/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FaxV1Fax{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/fax/v1/docs/CreateFaxRequest.md b/rest/fax/v1/docs/CreateFaxRequest.md new file mode 100644 index 000000000..e29ad1e5d --- /dev/null +++ b/rest/fax/v1/docs/CreateFaxRequest.md @@ -0,0 +1,19 @@ +# CreateFaxRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request. | [optional] +**MediaUrl** | **string** | The URL of the PDF that contains the fax. See our [security](https://www.twilio.com/docs/usage/security) page for information on how to ensure the request for your media comes from Twilio. | +**Quality** | **string** | The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`. | [optional] +**SipAuthPassword** | **string** | The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address. | [optional] +**SipAuthUsername** | **string** | The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address. | [optional] +**StatusCallback** | **string** | The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes. | [optional] +**StoreMedia** | **bool** | Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`. | [optional] +**To** | **string** | The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. | +**Ttl** | **int32** | How long in minutes from when the fax is initiated that we should try to send the fax. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/DefaultApi.md b/rest/fax/v1/docs/DefaultApi.md new file mode 100644 index 000000000..d744a1317 --- /dev/null +++ b/rest/fax/v1/docs/DefaultApi.md @@ -0,0 +1,342 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFax**](DefaultApi.md#CreateFax) | **Post** /v1/Faxes | +[**DeleteFax**](DefaultApi.md#DeleteFax) | **Delete** /v1/Faxes/{Sid} | +[**DeleteFaxMedia**](DefaultApi.md#DeleteFaxMedia) | **Delete** /v1/Faxes/{FaxSid}/Media/{Sid} | +[**FetchFax**](DefaultApi.md#FetchFax) | **Get** /v1/Faxes/{Sid} | +[**FetchFaxMedia**](DefaultApi.md#FetchFaxMedia) | **Get** /v1/Faxes/{FaxSid}/Media/{Sid} | +[**ListFax**](DefaultApi.md#ListFax) | **Get** /v1/Faxes | +[**ListFaxMedia**](DefaultApi.md#ListFaxMedia) | **Get** /v1/Faxes/{FaxSid}/Media | +[**UpdateFax**](DefaultApi.md#UpdateFax) | **Post** /v1/Faxes/{Sid} | + + + +## CreateFax + +> FaxV1Fax CreateFax(ctx, optional) + + + +Create a new fax to send to a phone number or SIP endpoint. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateFaxOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFaxOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **From** | **optional.String**| The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request. | + **MediaUrl** | **optional.String**| The URL of the PDF that contains the fax. See our [security](https://www.twilio.com/docs/usage/security) page for information on how to ensure the request for your media comes from Twilio. | + **Quality** | **optional.String**| The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`. | + **SipAuthPassword** | **optional.String**| The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address. | + **SipAuthUsername** | **optional.String**| The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address. | + **StatusCallback** | **optional.String**| The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes. | + **StoreMedia** | **optional.Bool**| Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`. | + **To** | **optional.String**| The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. | + **Ttl** | **optional.Int32**| How long in minutes from when the fax is initiated that we should try to send the fax. | + +### Return type + +[**FaxV1Fax**](fax.v1.fax.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFax + +> DeleteFax(ctx, Sid) + + + +Delete a specific fax and its associated media. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Fax resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFaxMedia + +> DeleteFaxMedia(ctx, FaxSid, Sid) + + + +Delete a specific fax media instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FaxSid** | **string**| The SID of the fax with the FaxMedia resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FaxMedia resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFax + +> FaxV1Fax FetchFax(ctx, Sid) + + + +Fetch a specific fax. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Fax resource to fetch. | + +### Return type + +[**FaxV1Fax**](fax.v1.fax.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFaxMedia + +> FaxV1FaxFaxMedia FetchFaxMedia(ctx, FaxSid, Sid) + + + +Fetch a specific fax media instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FaxSid** | **string**| The SID of the fax with the FaxMedia resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the FaxMedia resource to fetch. | + +### Return type + +[**FaxV1FaxFaxMedia**](fax.v1.fax.fax_media.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFax + +> ListFaxResponse ListFax(ctx, optional) + + + +Retrieve a list of all faxes. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFaxOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFaxOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **From** | **optional.String**| Retrieve only those faxes sent from this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. | + **To** | **optional.String**| Retrieve only those faxes sent to this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. | + **DateCreatedOnOrBefore** | **optional.Time**| Retrieve only those faxes with a `date_created` that is before or equal to this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **DateCreatedAfter** | **optional.Time**| Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFaxResponse**](ListFaxResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFaxMedia + +> ListFaxMediaResponse ListFaxMedia(ctx, FaxSid, optional) + + + +Retrieve a list of all fax media instances for the specified fax. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FaxSid** | **string**| The SID of the fax with the FaxMedia resources to read. | + **optional** | ***ListFaxMediaOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFaxMediaOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFaxMediaResponse**](ListFaxMediaResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFax + +> FaxV1Fax UpdateFax(ctx, Sid, optional) + + + +Update a specific fax. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Fax resource to update. | + **optional** | ***UpdateFaxOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFaxOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Status** | **optional.String**| The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. | + +### Return type + +[**FaxV1Fax**](fax.v1.fax.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/fax/v1/docs/FaxV1Fax.md b/rest/fax/v1/docs/FaxV1Fax.md new file mode 100644 index 000000000..4e318f4fe --- /dev/null +++ b/rest/fax/v1/docs/FaxV1Fax.md @@ -0,0 +1,28 @@ +# FaxV1Fax + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Direction** | **string** | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**From** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MediaSid** | **string** | | [optional] +**MediaUrl** | **string** | | [optional] +**NumPages** | Pointer to **int32** | | [optional] +**Price** | **float32** | | [optional] +**PriceUnit** | **string** | | [optional] +**Quality** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**To** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/FaxV1FaxFaxMedia.md b/rest/fax/v1/docs/FaxV1FaxFaxMedia.md new file mode 100644 index 000000000..563a00248 --- /dev/null +++ b/rest/fax/v1/docs/FaxV1FaxFaxMedia.md @@ -0,0 +1,17 @@ +# FaxV1FaxFaxMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ContentType** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FaxSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/ListFaxMediaResponse.md b/rest/fax/v1/docs/ListFaxMediaResponse.md new file mode 100644 index 000000000..5c8f8b318 --- /dev/null +++ b/rest/fax/v1/docs/ListFaxMediaResponse.md @@ -0,0 +1,12 @@ +# ListFaxMediaResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Media** | [**[]FaxV1FaxFaxMedia**](fax.v1.fax.fax_media.md) | | [optional] +**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/ListFaxResponse.md b/rest/fax/v1/docs/ListFaxResponse.md new file mode 100644 index 000000000..0fb855587 --- /dev/null +++ b/rest/fax/v1/docs/ListFaxResponse.md @@ -0,0 +1,12 @@ +# ListFaxResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Faxes** | [**[]FaxV1Fax**](fax.v1.fax.md) | | [optional] +**Meta** | [**ListFaxResponseMeta**](ListFaxResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/ListFaxResponseMeta.md b/rest/fax/v1/docs/ListFaxResponseMeta.md new file mode 100644 index 000000000..dc89426b1 --- /dev/null +++ b/rest/fax/v1/docs/ListFaxResponseMeta.md @@ -0,0 +1,17 @@ +# ListFaxResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/docs/UpdateFaxRequest.md b/rest/fax/v1/docs/UpdateFaxRequest.md new file mode 100644 index 000000000..f345f7a73 --- /dev/null +++ b/rest/fax/v1/docs/UpdateFaxRequest.md @@ -0,0 +1,11 @@ +# UpdateFaxRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/fax/v1/model_create_fax_request.go b/rest/fax/v1/model_create_fax_request.go new file mode 100644 index 000000000..a7e36ae71 --- /dev/null +++ b/rest/fax/v1/model_create_fax_request.go @@ -0,0 +1,32 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFaxRequest struct for CreateFaxRequest +type CreateFaxRequest struct { + // The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request. + From string `json:"From,omitempty"` + // The URL of the PDF that contains the fax. See our [security](https://www.twilio.com/docs/usage/security) page for information on how to ensure the request for your media comes from Twilio. + MediaUrl string `json:"MediaUrl"` + // The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`. + Quality string `json:"Quality,omitempty"` + // The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address. + SipAuthPassword string `json:"SipAuthPassword,omitempty"` + // The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address. + SipAuthUsername string `json:"SipAuthUsername,omitempty"` + // The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes. + StatusCallback string `json:"StatusCallback,omitempty"` + // Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`. + StoreMedia bool `json:"StoreMedia,omitempty"` + // The phone number to receive the fax in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the recipient's SIP URI. + To string `json:"To"` + // How long in minutes from when the fax is initiated that we should try to send the fax. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/fax/v1/model_fax_v1_fax.go b/rest/fax/v1/model_fax_v1_fax.go new file mode 100644 index 000000000..3072fba0f --- /dev/null +++ b/rest/fax/v1/model_fax_v1_fax.go @@ -0,0 +1,35 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FaxV1Fax struct for FaxV1Fax +type FaxV1Fax struct { + AccountSid string `json:"AccountSid,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Direction string `json:"Direction,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + From string `json:"From,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MediaSid string `json:"MediaSid,omitempty"` + MediaUrl string `json:"MediaUrl,omitempty"` + NumPages *int32 `json:"NumPages,omitempty"` + Price float32 `json:"Price,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Quality string `json:"Quality,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + To string `json:"To,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/fax/v1/model_fax_v1_fax_fax_media.go b/rest/fax/v1/model_fax_v1_fax_fax_media.go new file mode 100644 index 000000000..1515f85b7 --- /dev/null +++ b/rest/fax/v1/model_fax_v1_fax_fax_media.go @@ -0,0 +1,24 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FaxV1FaxFaxMedia struct for FaxV1FaxFaxMedia +type FaxV1FaxFaxMedia struct { + AccountSid string `json:"AccountSid,omitempty"` + ContentType string `json:"ContentType,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FaxSid string `json:"FaxSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/fax/v1/model_list_fax_media_response.go b/rest/fax/v1/model_list_fax_media_response.go new file mode 100644 index 000000000..111790aa5 --- /dev/null +++ b/rest/fax/v1/model_list_fax_media_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFaxMediaResponse struct for ListFaxMediaResponse +type ListFaxMediaResponse struct { + Media []FaxV1FaxFaxMedia `json:"Media,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/fax/v1/model_list_fax_response.go b/rest/fax/v1/model_list_fax_response.go new file mode 100644 index 000000000..2781bc2a9 --- /dev/null +++ b/rest/fax/v1/model_list_fax_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFaxResponse struct for ListFaxResponse +type ListFaxResponse struct { + Faxes []FaxV1Fax `json:"Faxes,omitempty"` + Meta ListFaxResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/fax/v1/model_list_fax_response_meta.go b/rest/fax/v1/model_list_fax_response_meta.go new file mode 100644 index 000000000..e412aaea9 --- /dev/null +++ b/rest/fax/v1/model_list_fax_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFaxResponseMeta struct for ListFaxResponseMeta +type ListFaxResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/fax/v1/model_update_fax_request.go b/rest/fax/v1/model_update_fax_request.go new file mode 100644 index 000000000..9d4f5c9ad --- /dev/null +++ b/rest/fax/v1/model_update_fax_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFaxRequest struct for UpdateFaxRequest +type UpdateFaxRequest struct { + // The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started. + Status string `json:"Status,omitempty"` +} diff --git a/rest/fax/v1/response.go b/rest/fax/v1/response.go new file mode 100644 index 000000000..e354bbab6 --- /dev/null +++ b/rest/fax/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Fax + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/flex/v1/.openapi-generator-ignore b/rest/flex/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/flex/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/flex/v1/README.md b/rest/flex/v1/README.md new file mode 100644 index 000000000..b4693ddd3 --- /dev/null +++ b/rest/flex/v1/README.md @@ -0,0 +1,91 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateChannel**](docs/DefaultApi.md#createchannel) | **Post** /v1/Channels | +*DefaultApi* | [**CreateFlexFlow**](docs/DefaultApi.md#createflexflow) | **Post** /v1/FlexFlows | +*DefaultApi* | [**CreateWebChannel**](docs/DefaultApi.md#createwebchannel) | **Post** /v1/WebChannels | +*DefaultApi* | [**DeleteChannel**](docs/DefaultApi.md#deletechannel) | **Delete** /v1/Channels/{Sid} | +*DefaultApi* | [**DeleteFlexFlow**](docs/DefaultApi.md#deleteflexflow) | **Delete** /v1/FlexFlows/{Sid} | +*DefaultApi* | [**DeleteWebChannel**](docs/DefaultApi.md#deletewebchannel) | **Delete** /v1/WebChannels/{Sid} | +*DefaultApi* | [**FetchChannel**](docs/DefaultApi.md#fetchchannel) | **Get** /v1/Channels/{Sid} | +*DefaultApi* | [**FetchConfiguration**](docs/DefaultApi.md#fetchconfiguration) | **Get** /v1/Configuration | +*DefaultApi* | [**FetchFlexFlow**](docs/DefaultApi.md#fetchflexflow) | **Get** /v1/FlexFlows/{Sid} | +*DefaultApi* | [**FetchWebChannel**](docs/DefaultApi.md#fetchwebchannel) | **Get** /v1/WebChannels/{Sid} | +*DefaultApi* | [**ListChannel**](docs/DefaultApi.md#listchannel) | **Get** /v1/Channels | +*DefaultApi* | [**ListFlexFlow**](docs/DefaultApi.md#listflexflow) | **Get** /v1/FlexFlows | +*DefaultApi* | [**ListWebChannel**](docs/DefaultApi.md#listwebchannel) | **Get** /v1/WebChannels | +*DefaultApi* | [**UpdateConfiguration**](docs/DefaultApi.md#updateconfiguration) | **Post** /v1/Configuration | +*DefaultApi* | [**UpdateFlexFlow**](docs/DefaultApi.md#updateflexflow) | **Post** /v1/FlexFlows/{Sid} | +*DefaultApi* | [**UpdateWebChannel**](docs/DefaultApi.md#updatewebchannel) | **Post** /v1/WebChannels/{Sid} | + + +## Documentation For Models + + - [CreateChannelRequest](docs/CreateChannelRequest.md) + - [CreateFlexFlowRequest](docs/CreateFlexFlowRequest.md) + - [CreateWebChannelRequest](docs/CreateWebChannelRequest.md) + - [FlexV1Channel](docs/FlexV1Channel.md) + - [FlexV1Configuration](docs/FlexV1Configuration.md) + - [FlexV1FlexFlow](docs/FlexV1FlexFlow.md) + - [FlexV1WebChannel](docs/FlexV1WebChannel.md) + - [ListChannelResponse](docs/ListChannelResponse.md) + - [ListChannelResponseMeta](docs/ListChannelResponseMeta.md) + - [ListFlexFlowResponse](docs/ListFlexFlowResponse.md) + - [ListWebChannelResponse](docs/ListWebChannelResponse.md) + - [UpdateFlexFlowRequest](docs/UpdateFlexFlowRequest.md) + - [UpdateWebChannelRequest](docs/UpdateWebChannelRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/flex/v1/api_default.go b/rest/flex/v1/api_default.go new file mode 100644 index 000000000..9ff5c5e16 --- /dev/null +++ b/rest/flex/v1/api_default.go @@ -0,0 +1,798 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://flex-api.twilio.com"), + } +} +// CreateChannelParams Optional parameters for the method 'CreateChannel' +type CreateChannelParams struct { + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + ChatUserFriendlyName *string `json:"ChatUserFriendlyName,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` + Target *string `json:"Target,omitempty"` + TaskAttributes *string `json:"TaskAttributes,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` +} + +/* +CreateChannel Method for CreateChannel + * @param optional nil or *CreateChannelOpts - Optional Parameters: + * @param "ChatFriendlyName" (string) - The chat channel's friendly name. + * @param "ChatUniqueName" (string) - The chat channel's unique name. + * @param "ChatUserFriendlyName" (string) - The chat participant's friendly name. + * @param "FlexFlowSid" (string) - The SID of the Flex Flow. + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's chat User. + * @param "LongLived" (bool) - Whether to create the channel as long-lived. + * @param "PreEngagementData" (string) - The pre-engagement data. + * @param "Target" (string) - The Target Contact Identity, for example the phone number of an SMS. + * @param "TaskAttributes" (string) - The Task attributes to be added for the TaskRouter Task. + * @param "TaskSid" (string) - The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` +@return FlexV1Channel +*/ +func (c *DefaultApiService) CreateChannel(params *CreateChannelParams) (*FlexV1Channel, error) { + path := "/v1/Channels" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) + } + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) + } + if params != nil && params.ChatUserFriendlyName != nil { + data.Set("ChatUserFriendlyName", *params.ChatUserFriendlyName) + } + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.TaskAttributes != nil { + data.Set("TaskAttributes", *params.TaskAttributes) + } + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFlexFlowParams Optional parameters for the method 'CreateFlexFlow' +type CreateFlexFlowParams struct { + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` +} + +/* +CreateFlexFlow Method for CreateFlexFlow + * @param optional nil or *CreateFlexFlowOpts - Optional Parameters: + * @param "ChannelType" (string) - The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. + * @param "ChatServiceSid" (string) - The SID of the chat service. + * @param "ContactIdentity" (string) - The channel contact's Identity. + * @param "Enabled" (bool) - Whether the new Flex Flow is enabled. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Flex Flow resource. + * @param "IntegrationChannel" (string) - The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` + * @param "IntegrationCreationOnMessage" (bool) - In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. + * @param "IntegrationFlowSid" (string) - The SID of the Studio Flow. Required when `integrationType` is `studio`. + * @param "IntegrationPriority" (int32) - The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. + * @param "IntegrationRetryCount" (int32) - The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. + * @param "IntegrationTimeout" (int32) - The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. + * @param "IntegrationUrl" (string) - The URL of the external webhook. Required when `integrationType` is `external`. + * @param "IntegrationWorkflowSid" (string) - The Workflow SID for a new Task. Required when `integrationType` is `task`. + * @param "IntegrationWorkspaceSid" (string) - The Workspace SID for a new Task. Required when `integrationType` is `task`. + * @param "IntegrationType" (string) - The integration type. Can be: `studio`, `external`, or `task`. + * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. + * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. +@return FlexV1FlexFlow +*/ +func (c *DefaultApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV1FlexFlow, error) { + path := "/v1/FlexFlows" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) + } + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) + } + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) + } + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) + } + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) + } + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) + } + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) + } + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) + } + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) + } + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) + } + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) + } + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) + } + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWebChannelParams Optional parameters for the method 'CreateWebChannel' +type CreateWebChannelParams struct { + ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` + ChatUniqueName *string `json:"ChatUniqueName,omitempty"` + CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"` + FlexFlowSid *string `json:"FlexFlowSid,omitempty"` + Identity *string `json:"Identity,omitempty"` + PreEngagementData *string `json:"PreEngagementData,omitempty"` +} + +/* +CreateWebChannel Method for CreateWebChannel + * @param optional nil or *CreateWebChannelOpts - Optional Parameters: + * @param "ChatFriendlyName" (string) - The chat channel's friendly name. + * @param "ChatUniqueName" (string) - The chat channel's unique name. + * @param "CustomerFriendlyName" (string) - The chat participant's friendly name. + * @param "FlexFlowSid" (string) - The SID of the Flex Flow. + * @param "Identity" (string) - The chat identity. + * @param "PreEngagementData" (string) - The pre-engagement data. +@return FlexV1WebChannel +*/ +func (c *DefaultApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV1WebChannel, error) { + path := "/v1/WebChannels" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChatFriendlyName != nil { + data.Set("ChatFriendlyName", *params.ChatFriendlyName) + } + if params != nil && params.ChatUniqueName != nil { + data.Set("ChatUniqueName", *params.ChatUniqueName) + } + if params != nil && params.CustomerFriendlyName != nil { + data.Set("CustomerFriendlyName", *params.CustomerFriendlyName) + } + if params != nil && params.FlexFlowSid != nil { + data.Set("FlexFlowSid", *params.FlexFlowSid) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.PreEngagementData != nil { + data.Set("PreEngagementData", *params.PreEngagementData) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteChannel Method for DeleteChannel + * @param Sid The SID of the Flex chat channel resource to delete. +*/ +func (c *DefaultApiService) DeleteChannel(Sid string) (error) { + path := "/v1/Channels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFlexFlow Method for DeleteFlexFlow + * @param Sid The SID of the Flex Flow resource to delete. +*/ +func (c *DefaultApiService) DeleteFlexFlow(Sid string) (error) { + path := "/v1/FlexFlows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWebChannel Method for DeleteWebChannel + * @param Sid The SID of the WebChannel resource to delete. +*/ +func (c *DefaultApiService) DeleteWebChannel(Sid string) (error) { + path := "/v1/WebChannels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchChannel Method for FetchChannel + * @param Sid The SID of the Flex chat channel resource to fetch. +@return FlexV1Channel +*/ +func (c *DefaultApiService) FetchChannel(Sid string) (*FlexV1Channel, error) { + path := "/v1/Channels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1Channel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchConfigurationParams Optional parameters for the method 'FetchConfiguration' +type FetchConfigurationParams struct { + UiVersion *string `json:"UiVersion,omitempty"` +} + +/* +FetchConfiguration Method for FetchConfiguration + * @param optional nil or *FetchConfigurationOpts - Optional Parameters: + * @param "UiVersion" (string) - The Pinned UI version of the Configuration resource to fetch. +@return FlexV1Configuration +*/ +func (c *DefaultApiService) FetchConfiguration(params *FetchConfigurationParams) (*FlexV1Configuration, error) { + path := "/v1/Configuration" + + + data := url.Values{} + headers := 0 + + if params != nil && params.UiVersion != nil { + data.Set("UiVersion", *params.UiVersion) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFlexFlow Method for FetchFlexFlow + * @param Sid The SID of the Flex Flow resource to fetch. +@return FlexV1FlexFlow +*/ +func (c *DefaultApiService) FetchFlexFlow(Sid string) (*FlexV1FlexFlow, error) { + path := "/v1/FlexFlows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWebChannel Method for FetchWebChannel + * @param Sid The SID of the WebChannel resource to fetch. +@return FlexV1WebChannel +*/ +func (c *DefaultApiService) FetchWebChannel(Sid string) (*FlexV1WebChannel, error) { + path := "/v1/WebChannels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelParams Optional parameters for the method 'ListChannel' +type ListChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannel Method for ListChannel + * @param optional nil or *ListChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelResponse +*/ +func (c *DefaultApiService) ListChannel(params *ListChannelParams) (*ListChannelResponse, error) { + path := "/v1/Channels" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFlexFlowParams Optional parameters for the method 'ListFlexFlow' +type ListFlexFlowParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFlexFlow Method for ListFlexFlow + * @param optional nil or *ListFlexFlowOpts - Optional Parameters: + * @param "FriendlyName" (string) - The `friendly_name` of the Flex Flow resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFlexFlowResponse +*/ +func (c *DefaultApiService) ListFlexFlow(params *ListFlexFlowParams) (*ListFlexFlowResponse, error) { + path := "/v1/FlexFlows" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFlexFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWebChannelParams Optional parameters for the method 'ListWebChannel' +type ListWebChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWebChannel Method for ListWebChannel + * @param optional nil or *ListWebChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWebChannelResponse +*/ +func (c *DefaultApiService) ListWebChannel(params *ListWebChannelParams) (*ListWebChannelResponse, error) { + path := "/v1/WebChannels" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWebChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +UpdateConfiguration Method for UpdateConfiguration +@return FlexV1Configuration +*/ +func (c *DefaultApiService) UpdateConfiguration() (*FlexV1Configuration, error) { + path := "/v1/Configuration" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1Configuration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFlexFlowParams Optional parameters for the method 'UpdateFlexFlow' +type UpdateFlexFlowParams struct { + ChannelType *string `json:"ChannelType,omitempty"` + ChatServiceSid *string `json:"ChatServiceSid,omitempty"` + ContactIdentity *string `json:"ContactIdentity,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IntegrationChannel *string `json:"Integration.Channel,omitempty"` + IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"` + IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"` + IntegrationPriority *int32 `json:"Integration.Priority,omitempty"` + IntegrationRetryCount *int32 `json:"Integration.RetryCount,omitempty"` + IntegrationTimeout *int32 `json:"Integration.Timeout,omitempty"` + IntegrationUrl *string `json:"Integration.Url,omitempty"` + IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"` + IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"` + IntegrationType *string `json:"IntegrationType,omitempty"` + JanitorEnabled *bool `json:"JanitorEnabled,omitempty"` + LongLived *bool `json:"LongLived,omitempty"` +} + +/* +UpdateFlexFlow Method for UpdateFlexFlow + * @param Sid The SID of the Flex Flow resource to update. + * @param optional nil or *UpdateFlexFlowOpts - Optional Parameters: + * @param "ChannelType" (string) - The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. + * @param "ChatServiceSid" (string) - The SID of the chat service. + * @param "ContactIdentity" (string) - The channel contact's Identity. + * @param "Enabled" (bool) - Whether the new Flex Flow is enabled. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Flex Flow resource. + * @param "IntegrationChannel" (string) - The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` + * @param "IntegrationCreationOnMessage" (bool) - In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. + * @param "IntegrationFlowSid" (string) - The SID of the Studio Flow. Required when `integrationType` is `studio`. + * @param "IntegrationPriority" (int32) - The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. + * @param "IntegrationRetryCount" (int32) - The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. + * @param "IntegrationTimeout" (int32) - The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. + * @param "IntegrationUrl" (string) - The URL of the external webhook. Required when `integrationType` is `external`. + * @param "IntegrationWorkflowSid" (string) - The Workflow SID for a new Task. Required when `integrationType` is `task`. + * @param "IntegrationWorkspaceSid" (string) - The Workspace SID for a new Task. Required when `integrationType` is `task`. + * @param "IntegrationType" (string) - The integration type. Can be: `studio`, `external`, or `task`. + * @param "JanitorEnabled" (bool) - When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. + * @param "LongLived" (bool) - When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. +@return FlexV1FlexFlow +*/ +func (c *DefaultApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowParams) (*FlexV1FlexFlow, error) { + path := "/v1/FlexFlows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChannelType != nil { + data.Set("ChannelType", *params.ChannelType) + } + if params != nil && params.ChatServiceSid != nil { + data.Set("ChatServiceSid", *params.ChatServiceSid) + } + if params != nil && params.ContactIdentity != nil { + data.Set("ContactIdentity", *params.ContactIdentity) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IntegrationChannel != nil { + data.Set("IntegrationChannel", *params.IntegrationChannel) + } + if params != nil && params.IntegrationCreationOnMessage != nil { + data.Set("IntegrationCreationOnMessage", fmt.Sprint(*params.IntegrationCreationOnMessage)) + } + if params != nil && params.IntegrationFlowSid != nil { + data.Set("IntegrationFlowSid", *params.IntegrationFlowSid) + } + if params != nil && params.IntegrationPriority != nil { + data.Set("IntegrationPriority", fmt.Sprint(*params.IntegrationPriority)) + } + if params != nil && params.IntegrationRetryCount != nil { + data.Set("IntegrationRetryCount", fmt.Sprint(*params.IntegrationRetryCount)) + } + if params != nil && params.IntegrationTimeout != nil { + data.Set("IntegrationTimeout", fmt.Sprint(*params.IntegrationTimeout)) + } + if params != nil && params.IntegrationUrl != nil { + data.Set("IntegrationUrl", *params.IntegrationUrl) + } + if params != nil && params.IntegrationWorkflowSid != nil { + data.Set("IntegrationWorkflowSid", *params.IntegrationWorkflowSid) + } + if params != nil && params.IntegrationWorkspaceSid != nil { + data.Set("IntegrationWorkspaceSid", *params.IntegrationWorkspaceSid) + } + if params != nil && params.IntegrationType != nil { + data.Set("IntegrationType", *params.IntegrationType) + } + if params != nil && params.JanitorEnabled != nil { + data.Set("JanitorEnabled", fmt.Sprint(*params.JanitorEnabled)) + } + if params != nil && params.LongLived != nil { + data.Set("LongLived", fmt.Sprint(*params.LongLived)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1FlexFlow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWebChannelParams Optional parameters for the method 'UpdateWebChannel' +type UpdateWebChannelParams struct { + ChatStatus *string `json:"ChatStatus,omitempty"` + PostEngagementData *string `json:"PostEngagementData,omitempty"` +} + +/* +UpdateWebChannel Method for UpdateWebChannel + * @param Sid The SID of the WebChannel resource to update. + * @param optional nil or *UpdateWebChannelOpts - Optional Parameters: + * @param "ChatStatus" (string) - The chat status. Can only be `inactive`. + * @param "PostEngagementData" (string) - The post-engagement data. +@return FlexV1WebChannel +*/ +func (c *DefaultApiService) UpdateWebChannel(Sid string, params *UpdateWebChannelParams) (*FlexV1WebChannel, error) { + path := "/v1/WebChannels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChatStatus != nil { + data.Set("ChatStatus", *params.ChatStatus) + } + if params != nil && params.PostEngagementData != nil { + data.Set("PostEngagementData", *params.PostEngagementData) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &FlexV1WebChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/flex/v1/docs/CreateChannelRequest.md b/rest/flex/v1/docs/CreateChannelRequest.md new file mode 100644 index 000000000..d1d8b8e54 --- /dev/null +++ b/rest/flex/v1/docs/CreateChannelRequest.md @@ -0,0 +1,20 @@ +# CreateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChatFriendlyName** | **string** | The chat channel's friendly name. | +**ChatUniqueName** | **string** | The chat channel's unique name. | [optional] +**ChatUserFriendlyName** | **string** | The chat participant's friendly name. | +**FlexFlowSid** | **string** | The SID of the Flex Flow. | +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's chat User. | +**LongLived** | **bool** | Whether to create the channel as long-lived. | [optional] +**PreEngagementData** | **string** | The pre-engagement data. | [optional] +**Target** | **string** | The Target Contact Identity, for example the phone number of an SMS. | [optional] +**TaskAttributes** | **string** | The Task attributes to be added for the TaskRouter Task. | [optional] +**TaskSid** | **string** | The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/CreateFlexFlowRequest.md b/rest/flex/v1/docs/CreateFlexFlowRequest.md new file mode 100644 index 000000000..6817f6454 --- /dev/null +++ b/rest/flex/v1/docs/CreateFlexFlowRequest.md @@ -0,0 +1,27 @@ +# CreateFlexFlowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChannelType** | **string** | The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. | +**ChatServiceSid** | **string** | The SID of the chat service. | +**ContactIdentity** | **string** | The channel contact's Identity. | [optional] +**Enabled** | **bool** | Whether the new Flex Flow is enabled. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Flex Flow resource. | +**IntegrationChannel** | **string** | The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` | [optional] +**IntegrationCreationOnMessage** | **bool** | In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. | [optional] +**IntegrationFlowSid** | **string** | The SID of the Studio Flow. Required when `integrationType` is `studio`. | [optional] +**IntegrationPriority** | **int32** | The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. | [optional] +**IntegrationRetryCount** | **int32** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. | [optional] +**IntegrationTimeout** | **int32** | The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. | [optional] +**IntegrationUrl** | **string** | The URL of the external webhook. Required when `integrationType` is `external`. | [optional] +**IntegrationWorkflowSid** | **string** | The Workflow SID for a new Task. Required when `integrationType` is `task`. | [optional] +**IntegrationWorkspaceSid** | **string** | The Workspace SID for a new Task. Required when `integrationType` is `task`. | [optional] +**IntegrationType** | **string** | The integration type. Can be: `studio`, `external`, or `task`. | [optional] +**JanitorEnabled** | **bool** | When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. | [optional] +**LongLived** | **bool** | When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/CreateWebChannelRequest.md b/rest/flex/v1/docs/CreateWebChannelRequest.md new file mode 100644 index 000000000..b57383e25 --- /dev/null +++ b/rest/flex/v1/docs/CreateWebChannelRequest.md @@ -0,0 +1,16 @@ +# CreateWebChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChatFriendlyName** | **string** | The chat channel's friendly name. | +**ChatUniqueName** | **string** | The chat channel's unique name. | [optional] +**CustomerFriendlyName** | **string** | The chat participant's friendly name. | +**FlexFlowSid** | **string** | The SID of the Flex Flow. | +**Identity** | **string** | The chat identity. | +**PreEngagementData** | **string** | The pre-engagement data. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/DefaultApi.md b/rest/flex/v1/docs/DefaultApi.md new file mode 100644 index 000000000..ba2aa6259 --- /dev/null +++ b/rest/flex/v1/docs/DefaultApi.md @@ -0,0 +1,665 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateChannel**](DefaultApi.md#CreateChannel) | **Post** /v1/Channels | +[**CreateFlexFlow**](DefaultApi.md#CreateFlexFlow) | **Post** /v1/FlexFlows | +[**CreateWebChannel**](DefaultApi.md#CreateWebChannel) | **Post** /v1/WebChannels | +[**DeleteChannel**](DefaultApi.md#DeleteChannel) | **Delete** /v1/Channels/{Sid} | +[**DeleteFlexFlow**](DefaultApi.md#DeleteFlexFlow) | **Delete** /v1/FlexFlows/{Sid} | +[**DeleteWebChannel**](DefaultApi.md#DeleteWebChannel) | **Delete** /v1/WebChannels/{Sid} | +[**FetchChannel**](DefaultApi.md#FetchChannel) | **Get** /v1/Channels/{Sid} | +[**FetchConfiguration**](DefaultApi.md#FetchConfiguration) | **Get** /v1/Configuration | +[**FetchFlexFlow**](DefaultApi.md#FetchFlexFlow) | **Get** /v1/FlexFlows/{Sid} | +[**FetchWebChannel**](DefaultApi.md#FetchWebChannel) | **Get** /v1/WebChannels/{Sid} | +[**ListChannel**](DefaultApi.md#ListChannel) | **Get** /v1/Channels | +[**ListFlexFlow**](DefaultApi.md#ListFlexFlow) | **Get** /v1/FlexFlows | +[**ListWebChannel**](DefaultApi.md#ListWebChannel) | **Get** /v1/WebChannels | +[**UpdateConfiguration**](DefaultApi.md#UpdateConfiguration) | **Post** /v1/Configuration | +[**UpdateFlexFlow**](DefaultApi.md#UpdateFlexFlow) | **Post** /v1/FlexFlows/{Sid} | +[**UpdateWebChannel**](DefaultApi.md#UpdateWebChannel) | **Post** /v1/WebChannels/{Sid} | + + + +## CreateChannel + +> FlexV1Channel CreateChannel(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ChatFriendlyName** | **optional.String**| The chat channel's friendly name. | + **ChatUniqueName** | **optional.String**| The chat channel's unique name. | + **ChatUserFriendlyName** | **optional.String**| The chat participant's friendly name. | + **FlexFlowSid** | **optional.String**| The SID of the Flex Flow. | + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's chat User. | + **LongLived** | **optional.Bool**| Whether to create the channel as long-lived. | + **PreEngagementData** | **optional.String**| The pre-engagement data. | + **Target** | **optional.String**| The Target Contact Identity, for example the phone number of an SMS. | + **TaskAttributes** | **optional.String**| The Task attributes to be added for the TaskRouter Task. | + **TaskSid** | **optional.String**| The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` | + +### Return type + +[**FlexV1Channel**](flex.v1.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFlexFlow + +> FlexV1FlexFlow CreateFlexFlow(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateFlexFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFlexFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ChannelType** | **optional.String**| The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. | + **ChatServiceSid** | **optional.String**| The SID of the chat service. | + **ContactIdentity** | **optional.String**| The channel contact's Identity. | + **Enabled** | **optional.Bool**| Whether the new Flex Flow is enabled. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Flex Flow resource. | + **IntegrationChannel** | **optional.String**| The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` | + **IntegrationCreationOnMessage** | **optional.Bool**| In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. | + **IntegrationFlowSid** | **optional.String**| The SID of the Studio Flow. Required when `integrationType` is `studio`. | + **IntegrationPriority** | **optional.Int32**| The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. | + **IntegrationRetryCount** | **optional.Int32**| The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. | + **IntegrationTimeout** | **optional.Int32**| The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. | + **IntegrationUrl** | **optional.String**| The URL of the external webhook. Required when `integrationType` is `external`. | + **IntegrationWorkflowSid** | **optional.String**| The Workflow SID for a new Task. Required when `integrationType` is `task`. | + **IntegrationWorkspaceSid** | **optional.String**| The Workspace SID for a new Task. Required when `integrationType` is `task`. | + **IntegrationType** | **optional.String**| The integration type. Can be: `studio`, `external`, or `task`. | + **JanitorEnabled** | **optional.Bool**| When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. | + **LongLived** | **optional.Bool**| When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. | + +### Return type + +[**FlexV1FlexFlow**](flex.v1.flex_flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWebChannel + +> FlexV1WebChannel CreateWebChannel(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateWebChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWebChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ChatFriendlyName** | **optional.String**| The chat channel's friendly name. | + **ChatUniqueName** | **optional.String**| The chat channel's unique name. | + **CustomerFriendlyName** | **optional.String**| The chat participant's friendly name. | + **FlexFlowSid** | **optional.String**| The SID of the Flex Flow. | + **Identity** | **optional.String**| The chat identity. | + **PreEngagementData** | **optional.String**| The pre-engagement data. | + +### Return type + +[**FlexV1WebChannel**](flex.v1.web_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannel + +> DeleteChannel(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flex chat channel resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFlexFlow + +> DeleteFlexFlow(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flex Flow resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWebChannel + +> DeleteWebChannel(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the WebChannel resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannel + +> FlexV1Channel FetchChannel(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flex chat channel resource to fetch. | + +### Return type + +[**FlexV1Channel**](flex.v1.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConfiguration + +> FlexV1Configuration FetchConfiguration(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FetchConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **UiVersion** | **optional.String**| The Pinned UI version of the Configuration resource to fetch. | + +### Return type + +[**FlexV1Configuration**](flex.v1.configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFlexFlow + +> FlexV1FlexFlow FetchFlexFlow(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flex Flow resource to fetch. | + +### Return type + +[**FlexV1FlexFlow**](flex.v1.flex_flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWebChannel + +> FlexV1WebChannel FetchWebChannel(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the WebChannel resource to fetch. | + +### Return type + +[**FlexV1WebChannel**](flex.v1.web_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannel + +> ListChannelResponse ListChannel(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelResponse**](ListChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFlexFlow + +> ListFlexFlowResponse ListFlexFlow(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFlexFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFlexFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| The `friendly_name` of the Flex Flow resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFlexFlowResponse**](ListFlexFlowResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWebChannel + +> ListWebChannelResponse ListWebChannel(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListWebChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWebChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWebChannelResponse**](ListWebChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConfiguration + +> FlexV1Configuration UpdateConfiguration(ctx, ) + + + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FlexV1Configuration**](flex.v1.configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFlexFlow + +> FlexV1FlexFlow UpdateFlexFlow(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flex Flow resource to update. | + **optional** | ***UpdateFlexFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFlexFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ChannelType** | **optional.String**| The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. | + **ChatServiceSid** | **optional.String**| The SID of the chat service. | + **ContactIdentity** | **optional.String**| The channel contact's Identity. | + **Enabled** | **optional.Bool**| Whether the new Flex Flow is enabled. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Flex Flow resource. | + **IntegrationChannel** | **optional.String**| The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` | + **IntegrationCreationOnMessage** | **optional.Bool**| In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. | + **IntegrationFlowSid** | **optional.String**| The SID of the Studio Flow. Required when `integrationType` is `studio`. | + **IntegrationPriority** | **optional.Int32**| The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. | + **IntegrationRetryCount** | **optional.Int32**| The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. | + **IntegrationTimeout** | **optional.Int32**| The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. | + **IntegrationUrl** | **optional.String**| The URL of the external webhook. Required when `integrationType` is `external`. | + **IntegrationWorkflowSid** | **optional.String**| The Workflow SID for a new Task. Required when `integrationType` is `task`. | + **IntegrationWorkspaceSid** | **optional.String**| The Workspace SID for a new Task. Required when `integrationType` is `task`. | + **IntegrationType** | **optional.String**| The integration type. Can be: `studio`, `external`, or `task`. | + **JanitorEnabled** | **optional.Bool**| When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. | + **LongLived** | **optional.Bool**| When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. | + +### Return type + +[**FlexV1FlexFlow**](flex.v1.flex_flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWebChannel + +> FlexV1WebChannel UpdateWebChannel(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the WebChannel resource to update. | + **optional** | ***UpdateWebChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWebChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ChatStatus** | **optional.String**| The chat status. Can only be `inactive`. | + **PostEngagementData** | **optional.String**| The post-engagement data. | + +### Return type + +[**FlexV1WebChannel**](flex.v1.web_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/flex/v1/docs/FlexV1Channel.md b/rest/flex/v1/docs/FlexV1Channel.md new file mode 100644 index 000000000..0bce5f3bd --- /dev/null +++ b/rest/flex/v1/docs/FlexV1Channel.md @@ -0,0 +1,18 @@ +# FlexV1Channel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlexFlowSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**UserSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/FlexV1Configuration.md b/rest/flex/v1/docs/FlexV1Configuration.md new file mode 100644 index 000000000..2a40c6092 --- /dev/null +++ b/rest/flex/v1/docs/FlexV1Configuration.md @@ -0,0 +1,47 @@ +# FlexV1Configuration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | [**map[string]interface{}**](.md) | | [optional] +**CallRecordingEnabled** | **bool** | | [optional] +**CallRecordingWebhookUrl** | **string** | | [optional] +**ChatServiceInstanceSid** | **string** | | [optional] +**CrmAttributes** | [**map[string]interface{}**](.md) | | [optional] +**CrmCallbackUrl** | **string** | | [optional] +**CrmEnabled** | **bool** | | [optional] +**CrmFallbackUrl** | **string** | | [optional] +**CrmType** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlexServiceInstanceSid** | **string** | | [optional] +**Integrations** | **[]map[string]interface{}** | | [optional] +**MessagingServiceInstanceSid** | **string** | | [optional] +**OutboundCallFlows** | [**map[string]interface{}**](.md) | | [optional] +**PluginServiceAttributes** | [**map[string]interface{}**](.md) | | [optional] +**PluginServiceEnabled** | **bool** | | [optional] +**PublicAttributes** | [**map[string]interface{}**](.md) | | [optional] +**QueueStatsConfiguration** | [**map[string]interface{}**](.md) | | [optional] +**RuntimeDomain** | **string** | | [optional] +**ServerlessServiceSids** | **[]string** | | [optional] +**ServiceVersion** | **string** | | [optional] +**Status** | **string** | | [optional] +**TaskrouterOfflineActivitySid** | **string** | | [optional] +**TaskrouterSkills** | **[]map[string]interface{}** | | [optional] +**TaskrouterTargetTaskqueueSid** | **string** | | [optional] +**TaskrouterTargetWorkflowSid** | **string** | | [optional] +**TaskrouterTaskqueues** | **[]map[string]interface{}** | | [optional] +**TaskrouterWorkerAttributes** | [**map[string]interface{}**](.md) | | [optional] +**TaskrouterWorkerChannels** | [**map[string]interface{}**](.md) | | [optional] +**TaskrouterWorkspaceSid** | **string** | | [optional] +**UiAttributes** | [**map[string]interface{}**](.md) | | [optional] +**UiDependencies** | [**map[string]interface{}**](.md) | | [optional] +**UiLanguage** | **string** | | [optional] +**UiVersion** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/FlexV1FlexFlow.md b/rest/flex/v1/docs/FlexV1FlexFlow.md new file mode 100644 index 000000000..28cde3ba7 --- /dev/null +++ b/rest/flex/v1/docs/FlexV1FlexFlow.md @@ -0,0 +1,24 @@ +# FlexV1FlexFlow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelType** | **string** | | [optional] +**ChatServiceSid** | **string** | | [optional] +**ContactIdentity** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**Integration** | [**map[string]interface{}**](.md) | | [optional] +**IntegrationType** | **string** | | [optional] +**JanitorEnabled** | **bool** | | [optional] +**LongLived** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/FlexV1WebChannel.md b/rest/flex/v1/docs/FlexV1WebChannel.md new file mode 100644 index 000000000..9c837d41b --- /dev/null +++ b/rest/flex/v1/docs/FlexV1WebChannel.md @@ -0,0 +1,16 @@ +# FlexV1WebChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlexFlowSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/ListChannelResponse.md b/rest/flex/v1/docs/ListChannelResponse.md new file mode 100644 index 000000000..24988f288 --- /dev/null +++ b/rest/flex/v1/docs/ListChannelResponse.md @@ -0,0 +1,12 @@ +# ListChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexChatChannels** | [**[]FlexV1Channel**](flex.v1.channel.md) | | [optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/ListChannelResponseMeta.md b/rest/flex/v1/docs/ListChannelResponseMeta.md new file mode 100644 index 000000000..f7b79732c --- /dev/null +++ b/rest/flex/v1/docs/ListChannelResponseMeta.md @@ -0,0 +1,17 @@ +# ListChannelResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/ListFlexFlowResponse.md b/rest/flex/v1/docs/ListFlexFlowResponse.md new file mode 100644 index 000000000..d6fe64cfb --- /dev/null +++ b/rest/flex/v1/docs/ListFlexFlowResponse.md @@ -0,0 +1,12 @@ +# ListFlexFlowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexFlows** | [**[]FlexV1FlexFlow**](flex.v1.flex_flow.md) | | [optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/ListWebChannelResponse.md b/rest/flex/v1/docs/ListWebChannelResponse.md new file mode 100644 index 000000000..7137d154c --- /dev/null +++ b/rest/flex/v1/docs/ListWebChannelResponse.md @@ -0,0 +1,12 @@ +# ListWebChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlexChatChannels** | [**[]FlexV1WebChannel**](flex.v1.web_channel.md) | | [optional] +**Meta** | [**ListChannelResponseMeta**](ListChannelResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/UpdateFlexFlowRequest.md b/rest/flex/v1/docs/UpdateFlexFlowRequest.md new file mode 100644 index 000000000..ee617646a --- /dev/null +++ b/rest/flex/v1/docs/UpdateFlexFlowRequest.md @@ -0,0 +1,27 @@ +# UpdateFlexFlowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChannelType** | **string** | The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. | [optional] +**ChatServiceSid** | **string** | The SID of the chat service. | [optional] +**ContactIdentity** | **string** | The channel contact's Identity. | [optional] +**Enabled** | **bool** | Whether the new Flex Flow is enabled. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Flex Flow resource. | [optional] +**IntegrationChannel** | **string** | The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` | [optional] +**IntegrationCreationOnMessage** | **bool** | In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. | [optional] +**IntegrationFlowSid** | **string** | The SID of the Studio Flow. Required when `integrationType` is `studio`. | [optional] +**IntegrationPriority** | **int32** | The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. | [optional] +**IntegrationRetryCount** | **int32** | The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. | [optional] +**IntegrationTimeout** | **int32** | The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. | [optional] +**IntegrationUrl** | **string** | The URL of the external webhook. Required when `integrationType` is `external`. | [optional] +**IntegrationWorkflowSid** | **string** | The Workflow SID for a new Task. Required when `integrationType` is `task`. | [optional] +**IntegrationWorkspaceSid** | **string** | The Workspace SID for a new Task. Required when `integrationType` is `task`. | [optional] +**IntegrationType** | **string** | The integration type. Can be: `studio`, `external`, or `task`. | [optional] +**JanitorEnabled** | **bool** | When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. | [optional] +**LongLived** | **bool** | When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/docs/UpdateWebChannelRequest.md b/rest/flex/v1/docs/UpdateWebChannelRequest.md new file mode 100644 index 000000000..0cb122515 --- /dev/null +++ b/rest/flex/v1/docs/UpdateWebChannelRequest.md @@ -0,0 +1,12 @@ +# UpdateWebChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChatStatus** | **string** | The chat status. Can only be `inactive`. | [optional] +**PostEngagementData** | **string** | The post-engagement data. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/flex/v1/model_create_channel_request.go b/rest/flex/v1/model_create_channel_request.go new file mode 100644 index 000000000..8c36630ba --- /dev/null +++ b/rest/flex/v1/model_create_channel_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateChannelRequest struct for CreateChannelRequest +type CreateChannelRequest struct { + // The chat channel's friendly name. + ChatFriendlyName string `json:"ChatFriendlyName"` + // The chat channel's unique name. + ChatUniqueName string `json:"ChatUniqueName,omitempty"` + // The chat participant's friendly name. + ChatUserFriendlyName string `json:"ChatUserFriendlyName"` + // The SID of the Flex Flow. + FlexFlowSid string `json:"FlexFlowSid"` + // The `identity` value that uniquely identifies the new resource's chat User. + Identity string `json:"Identity"` + // Whether to create the channel as long-lived. + LongLived bool `json:"LongLived,omitempty"` + // The pre-engagement data. + PreEngagementData string `json:"PreEngagementData,omitempty"` + // The Target Contact Identity, for example the phone number of an SMS. + Target string `json:"Target,omitempty"` + // The Task attributes to be added for the TaskRouter Task. + TaskAttributes string `json:"TaskAttributes,omitempty"` + // The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external` + TaskSid string `json:"TaskSid,omitempty"` +} diff --git a/rest/flex/v1/model_create_flex_flow_request.go b/rest/flex/v1/model_create_flex_flow_request.go new file mode 100644 index 000000000..691953b63 --- /dev/null +++ b/rest/flex/v1/model_create_flex_flow_request.go @@ -0,0 +1,48 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFlexFlowRequest struct for CreateFlexFlowRequest +type CreateFlexFlowRequest struct { + // The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. + ChannelType string `json:"ChannelType"` + // The SID of the chat service. + ChatServiceSid string `json:"ChatServiceSid"` + // The channel contact's Identity. + ContactIdentity string `json:"ContactIdentity,omitempty"` + // Whether the new Flex Flow is enabled. + Enabled bool `json:"Enabled,omitempty"` + // A descriptive string that you create to describe the Flex Flow resource. + FriendlyName string `json:"FriendlyName"` + // The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` + IntegrationChannel string `json:"IntegrationChannel,omitempty"` + // In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. + IntegrationCreationOnMessage bool `json:"IntegrationCreationOnMessage,omitempty"` + // The SID of the Studio Flow. Required when `integrationType` is `studio`. + IntegrationFlowSid string `json:"IntegrationFlowSid,omitempty"` + // The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. + IntegrationPriority int32 `json:"IntegrationPriority,omitempty"` + // The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. + IntegrationRetryCount int32 `json:"IntegrationRetryCount,omitempty"` + // The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. + IntegrationTimeout int32 `json:"IntegrationTimeout,omitempty"` + // The URL of the external webhook. Required when `integrationType` is `external`. + IntegrationUrl string `json:"IntegrationUrl,omitempty"` + // The Workflow SID for a new Task. Required when `integrationType` is `task`. + IntegrationWorkflowSid string `json:"IntegrationWorkflowSid,omitempty"` + // The Workspace SID for a new Task. Required when `integrationType` is `task`. + IntegrationWorkspaceSid string `json:"IntegrationWorkspaceSid,omitempty"` + // The integration type. Can be: `studio`, `external`, or `task`. + IntegrationType string `json:"IntegrationType,omitempty"` + // When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. + JanitorEnabled bool `json:"JanitorEnabled,omitempty"` + // When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. + LongLived bool `json:"LongLived,omitempty"` +} diff --git a/rest/flex/v1/model_create_web_channel_request.go b/rest/flex/v1/model_create_web_channel_request.go new file mode 100644 index 000000000..27ca2c6c5 --- /dev/null +++ b/rest/flex/v1/model_create_web_channel_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWebChannelRequest struct for CreateWebChannelRequest +type CreateWebChannelRequest struct { + // The chat channel's friendly name. + ChatFriendlyName string `json:"ChatFriendlyName"` + // The chat channel's unique name. + ChatUniqueName string `json:"ChatUniqueName,omitempty"` + // The chat participant's friendly name. + CustomerFriendlyName string `json:"CustomerFriendlyName"` + // The SID of the Flex Flow. + FlexFlowSid string `json:"FlexFlowSid"` + // The chat identity. + Identity string `json:"Identity"` + // The pre-engagement data. + PreEngagementData string `json:"PreEngagementData,omitempty"` +} diff --git a/rest/flex/v1/model_flex_v1_channel.go b/rest/flex/v1/model_flex_v1_channel.go new file mode 100644 index 000000000..87ff2e3ec --- /dev/null +++ b/rest/flex/v1/model_flex_v1_channel.go @@ -0,0 +1,25 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FlexV1Channel struct for FlexV1Channel +type FlexV1Channel struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlexFlowSid string `json:"FlexFlowSid,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` + UserSid string `json:"UserSid,omitempty"` +} diff --git a/rest/flex/v1/model_flex_v1_configuration.go b/rest/flex/v1/model_flex_v1_configuration.go new file mode 100644 index 000000000..5783dc3d9 --- /dev/null +++ b/rest/flex/v1/model_flex_v1_configuration.go @@ -0,0 +1,54 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FlexV1Configuration struct for FlexV1Configuration +type FlexV1Configuration struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes map[string]interface{} `json:"Attributes,omitempty"` + CallRecordingEnabled bool `json:"CallRecordingEnabled,omitempty"` + CallRecordingWebhookUrl string `json:"CallRecordingWebhookUrl,omitempty"` + ChatServiceInstanceSid string `json:"ChatServiceInstanceSid,omitempty"` + CrmAttributes map[string]interface{} `json:"CrmAttributes,omitempty"` + CrmCallbackUrl string `json:"CrmCallbackUrl,omitempty"` + CrmEnabled bool `json:"CrmEnabled,omitempty"` + CrmFallbackUrl string `json:"CrmFallbackUrl,omitempty"` + CrmType string `json:"CrmType,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlexServiceInstanceSid string `json:"FlexServiceInstanceSid,omitempty"` + Integrations []map[string]interface{} `json:"Integrations,omitempty"` + MessagingServiceInstanceSid string `json:"MessagingServiceInstanceSid,omitempty"` + OutboundCallFlows map[string]interface{} `json:"OutboundCallFlows,omitempty"` + PluginServiceAttributes map[string]interface{} `json:"PluginServiceAttributes,omitempty"` + PluginServiceEnabled bool `json:"PluginServiceEnabled,omitempty"` + PublicAttributes map[string]interface{} `json:"PublicAttributes,omitempty"` + QueueStatsConfiguration map[string]interface{} `json:"QueueStatsConfiguration,omitempty"` + RuntimeDomain string `json:"RuntimeDomain,omitempty"` + ServerlessServiceSids []string `json:"ServerlessServiceSids,omitempty"` + ServiceVersion string `json:"ServiceVersion,omitempty"` + Status string `json:"Status,omitempty"` + TaskrouterOfflineActivitySid string `json:"TaskrouterOfflineActivitySid,omitempty"` + TaskrouterSkills []map[string]interface{} `json:"TaskrouterSkills,omitempty"` + TaskrouterTargetTaskqueueSid string `json:"TaskrouterTargetTaskqueueSid,omitempty"` + TaskrouterTargetWorkflowSid string `json:"TaskrouterTargetWorkflowSid,omitempty"` + TaskrouterTaskqueues []map[string]interface{} `json:"TaskrouterTaskqueues,omitempty"` + TaskrouterWorkerAttributes map[string]interface{} `json:"TaskrouterWorkerAttributes,omitempty"` + TaskrouterWorkerChannels map[string]interface{} `json:"TaskrouterWorkerChannels,omitempty"` + TaskrouterWorkspaceSid string `json:"TaskrouterWorkspaceSid,omitempty"` + UiAttributes map[string]interface{} `json:"UiAttributes,omitempty"` + UiDependencies map[string]interface{} `json:"UiDependencies,omitempty"` + UiLanguage string `json:"UiLanguage,omitempty"` + UiVersion string `json:"UiVersion,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/flex/v1/model_flex_v1_flex_flow.go b/rest/flex/v1/model_flex_v1_flex_flow.go new file mode 100644 index 000000000..a392a0e43 --- /dev/null +++ b/rest/flex/v1/model_flex_v1_flex_flow.go @@ -0,0 +1,31 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FlexV1FlexFlow struct for FlexV1FlexFlow +type FlexV1FlexFlow struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelType string `json:"ChannelType,omitempty"` + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + ContactIdentity string `json:"ContactIdentity,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Integration map[string]interface{} `json:"Integration,omitempty"` + IntegrationType string `json:"IntegrationType,omitempty"` + JanitorEnabled bool `json:"JanitorEnabled,omitempty"` + LongLived bool `json:"LongLived,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/flex/v1/model_flex_v1_web_channel.go b/rest/flex/v1/model_flex_v1_web_channel.go new file mode 100644 index 000000000..6cd0f8cae --- /dev/null +++ b/rest/flex/v1/model_flex_v1_web_channel.go @@ -0,0 +1,23 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// FlexV1WebChannel struct for FlexV1WebChannel +type FlexV1WebChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlexFlowSid string `json:"FlexFlowSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/flex/v1/model_list_channel_response.go b/rest/flex/v1/model_list_channel_response.go new file mode 100644 index 000000000..5eb1fdafd --- /dev/null +++ b/rest/flex/v1/model_list_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelResponse struct for ListChannelResponse +type ListChannelResponse struct { + FlexChatChannels []FlexV1Channel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/flex/v1/model_list_channel_response_meta.go b/rest/flex/v1/model_list_channel_response_meta.go new file mode 100644 index 000000000..b195a61ca --- /dev/null +++ b/rest/flex/v1/model_list_channel_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelResponseMeta struct for ListChannelResponseMeta +type ListChannelResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/flex/v1/model_list_flex_flow_response.go b/rest/flex/v1/model_list_flex_flow_response.go new file mode 100644 index 000000000..faa5a95bb --- /dev/null +++ b/rest/flex/v1/model_list_flex_flow_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlexFlowResponse struct for ListFlexFlowResponse +type ListFlexFlowResponse struct { + FlexFlows []FlexV1FlexFlow `json:"FlexFlows,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/flex/v1/model_list_web_channel_response.go b/rest/flex/v1/model_list_web_channel_response.go new file mode 100644 index 000000000..d0ee041dd --- /dev/null +++ b/rest/flex/v1/model_list_web_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWebChannelResponse struct for ListWebChannelResponse +type ListWebChannelResponse struct { + FlexChatChannels []FlexV1WebChannel `json:"FlexChatChannels,omitempty"` + Meta ListChannelResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/flex/v1/model_update_flex_flow_request.go b/rest/flex/v1/model_update_flex_flow_request.go new file mode 100644 index 000000000..95ca68031 --- /dev/null +++ b/rest/flex/v1/model_update_flex_flow_request.go @@ -0,0 +1,48 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFlexFlowRequest struct for UpdateFlexFlowRequest +type UpdateFlexFlowRequest struct { + // The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. + ChannelType string `json:"ChannelType,omitempty"` + // The SID of the chat service. + ChatServiceSid string `json:"ChatServiceSid,omitempty"` + // The channel contact's Identity. + ContactIdentity string `json:"ContactIdentity,omitempty"` + // Whether the new Flex Flow is enabled. + Enabled bool `json:"Enabled,omitempty"` + // A descriptive string that you create to describe the Flex Flow resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The Task Channel for the TaskRouter Task that will be created. Applicable and required when integrationType is `task`. Set to `sms` for SMS, and to `chat` otherwise. The default value is `default` + IntegrationChannel string `json:"IntegrationChannel,omitempty"` + // In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging. + IntegrationCreationOnMessage bool `json:"IntegrationCreationOnMessage,omitempty"` + // The SID of the Studio Flow. Required when `integrationType` is `studio`. + IntegrationFlowSid string `json:"IntegrationFlowSid,omitempty"` + // The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise. + IntegrationPriority int32 `json:"IntegrationPriority,omitempty"` + // The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3 (included), default is 0. Optional when integrationType is `external`, not applicable otherwise. + IntegrationRetryCount int32 `json:"IntegrationRetryCount,omitempty"` + // The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise. + IntegrationTimeout int32 `json:"IntegrationTimeout,omitempty"` + // The URL of the external webhook. Required when `integrationType` is `external`. + IntegrationUrl string `json:"IntegrationUrl,omitempty"` + // The Workflow SID for a new Task. Required when `integrationType` is `task`. + IntegrationWorkflowSid string `json:"IntegrationWorkflowSid,omitempty"` + // The Workspace SID for a new Task. Required when `integrationType` is `task`. + IntegrationWorkspaceSid string `json:"IntegrationWorkspaceSid,omitempty"` + // The integration type. Can be: `studio`, `external`, or `task`. + IntegrationType string `json:"IntegrationType,omitempty"` + // When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`. + JanitorEnabled bool `json:"JanitorEnabled,omitempty"` + // When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`. + LongLived bool `json:"LongLived,omitempty"` +} diff --git a/rest/flex/v1/model_update_web_channel_request.go b/rest/flex/v1/model_update_web_channel_request.go new file mode 100644 index 000000000..eb9642042 --- /dev/null +++ b/rest/flex/v1/model_update_web_channel_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWebChannelRequest struct for UpdateWebChannelRequest +type UpdateWebChannelRequest struct { + // The chat status. Can only be `inactive`. + ChatStatus string `json:"ChatStatus,omitempty"` + // The post-engagement data. + PostEngagementData string `json:"PostEngagementData,omitempty"` +} diff --git a/rest/flex/v1/response.go b/rest/flex/v1/response.go new file mode 100644 index 000000000..bee578fbe --- /dev/null +++ b/rest/flex/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Flex + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/insights/v1/.openapi-generator-ignore b/rest/insights/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/insights/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/insights/v1/README.md b/rest/insights/v1/README.md new file mode 100644 index 000000000..7b0ca9750 --- /dev/null +++ b/rest/insights/v1/README.md @@ -0,0 +1,81 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**FetchCall**](docs/DefaultApi.md#fetchcall) | **Get** /v1/Voice/{Sid} | +*DefaultApi* | [**FetchSummary**](docs/DefaultApi.md#fetchsummary) | **Get** /v1/Voice/{CallSid}/Summary | +*DefaultApi* | [**FetchVideoParticipantSummary**](docs/DefaultApi.md#fetchvideoparticipantsummary) | **Get** /v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid} | +*DefaultApi* | [**FetchVideoRoomSummary**](docs/DefaultApi.md#fetchvideoroomsummary) | **Get** /v1/Video/Rooms/{RoomSid} | +*DefaultApi* | [**ListEvent**](docs/DefaultApi.md#listevent) | **Get** /v1/Voice/{CallSid}/Events | +*DefaultApi* | [**ListMetric**](docs/DefaultApi.md#listmetric) | **Get** /v1/Voice/{CallSid}/Metrics | +*DefaultApi* | [**ListVideoParticipantSummary**](docs/DefaultApi.md#listvideoparticipantsummary) | **Get** /v1/Video/Rooms/{RoomSid}/Participants | +*DefaultApi* | [**ListVideoRoomSummary**](docs/DefaultApi.md#listvideoroomsummary) | **Get** /v1/Video/Rooms | + + +## Documentation For Models + + - [InsightsV1Call](docs/InsightsV1Call.md) + - [InsightsV1CallEvent](docs/InsightsV1CallEvent.md) + - [InsightsV1CallMetric](docs/InsightsV1CallMetric.md) + - [InsightsV1CallSummary](docs/InsightsV1CallSummary.md) + - [InsightsV1VideoRoomSummary](docs/InsightsV1VideoRoomSummary.md) + - [InsightsV1VideoRoomSummaryVideoParticipantSummary](docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md) + - [ListEventResponse](docs/ListEventResponse.md) + - [ListMetricResponse](docs/ListMetricResponse.md) + - [ListVideoParticipantSummaryResponse](docs/ListVideoParticipantSummaryResponse.md) + - [ListVideoRoomSummaryResponse](docs/ListVideoRoomSummaryResponse.md) + - [ListVideoRoomSummaryResponseMeta](docs/ListVideoRoomSummaryResponseMeta.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/insights/v1/api_default.go b/rest/insights/v1/api_default.go new file mode 100644 index 000000000..c0a8e96ad --- /dev/null +++ b/rest/insights/v1/api_default.go @@ -0,0 +1,357 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://insights.twilio.com"), + } +} + +/* +FetchCall Method for FetchCall + * @param Sid +@return InsightsV1Call +*/ +func (c *DefaultApiService) FetchCall(Sid string) (*InsightsV1Call, error) { + path := "/v1/Voice/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &InsightsV1Call{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchSummaryParams Optional parameters for the method 'FetchSummary' +type FetchSummaryParams struct { + ProcessingState *string `json:"ProcessingState,omitempty"` +} + +/* +FetchSummary Method for FetchSummary + * @param CallSid + * @param optional nil or *FetchSummaryOpts - Optional Parameters: + * @param "ProcessingState" (string) - +@return InsightsV1CallSummary +*/ +func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryParams) (*InsightsV1CallSummary, error) { + path := "/v1/Voice/{CallSid}/Summary" + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ProcessingState != nil { + data.Set("ProcessingState", *params.ProcessingState) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &InsightsV1CallSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVideoParticipantSummary Method for FetchVideoParticipantSummary + * @param RoomSid + * @param ParticipantSid +@return InsightsV1VideoRoomSummaryVideoParticipantSummary +*/ +func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &InsightsV1VideoRoomSummaryVideoParticipantSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVideoRoomSummary Method for FetchVideoRoomSummary + * @param RoomSid +@return InsightsV1VideoRoomSummary +*/ +func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string) (*InsightsV1VideoRoomSummary, error) { + path := "/v1/Video/Rooms/{RoomSid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &InsightsV1VideoRoomSummary{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEventParams Optional parameters for the method 'ListEvent' +type ListEventParams struct { + Edge *string `json:"Edge,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEvent Method for ListEvent + * @param CallSid + * @param optional nil or *ListEventOpts - Optional Parameters: + * @param "Edge" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEventResponse +*/ +func (c *DefaultApiService) ListEvent(CallSid string, params *ListEventParams) (*ListEventResponse, error) { + path := "/v1/Voice/{CallSid}/Events" + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMetricParams Optional parameters for the method 'ListMetric' +type ListMetricParams struct { + Edge *string `json:"Edge,omitempty"` + Direction *string `json:"Direction,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMetric Method for ListMetric + * @param CallSid + * @param optional nil or *ListMetricOpts - Optional Parameters: + * @param "Edge" (string) - + * @param "Direction" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMetricResponse +*/ +func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) (*ListMetricResponse, error) { + path := "/v1/Voice/{CallSid}/Metrics" + path = strings.Replace(path, "{"+"CallSid"+"}", CallSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Edge != nil { + data.Set("Edge", *params.Edge) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMetricResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVideoParticipantSummaryParams Optional parameters for the method 'ListVideoParticipantSummary' +type ListVideoParticipantSummaryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVideoParticipantSummary Method for ListVideoParticipantSummary + * @param RoomSid + * @param optional nil or *ListVideoParticipantSummaryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVideoParticipantSummaryResponse +*/ +func (c *DefaultApiService) ListVideoParticipantSummary(RoomSid string, params *ListVideoParticipantSummaryParams) (*ListVideoParticipantSummaryResponse, error) { + path := "/v1/Video/Rooms/{RoomSid}/Participants" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVideoParticipantSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVideoRoomSummaryParams Optional parameters for the method 'ListVideoRoomSummary' +type ListVideoRoomSummaryParams struct { + RoomType *[]string `json:"RoomType,omitempty"` + Codec *[]string `json:"Codec,omitempty"` + RoomName *string `json:"RoomName,omitempty"` + CreatedAfter *time.Time `json:"CreatedAfter,omitempty"` + CreatedBefore *time.Time `json:"CreatedBefore,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVideoRoomSummary Method for ListVideoRoomSummary + * @param optional nil or *ListVideoRoomSummaryOpts - Optional Parameters: + * @param "RoomType" ([]string) - + * @param "Codec" ([]string) - + * @param "RoomName" (string) - + * @param "CreatedAfter" (time.Time) - + * @param "CreatedBefore" (time.Time) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVideoRoomSummaryResponse +*/ +func (c *DefaultApiService) ListVideoRoomSummary(params *ListVideoRoomSummaryParams) (*ListVideoRoomSummaryResponse, error) { + path := "/v1/Video/Rooms" + + + data := url.Values{} + headers := 0 + + if params != nil && params.RoomType != nil { + data.Set("RoomType", strings.Join(*params.RoomType, ",")) + } + if params != nil && params.Codec != nil { + data.Set("Codec", strings.Join(*params.Codec, ",")) + } + if params != nil && params.RoomName != nil { + data.Set("RoomName", *params.RoomName) + } + if params != nil && params.CreatedAfter != nil { + data.Set("CreatedAfter", fmt.Sprint(*params.CreatedAfter)) + } + if params != nil && params.CreatedBefore != nil { + data.Set("CreatedBefore", fmt.Sprint(*params.CreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVideoRoomSummaryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/insights/v1/docs/DefaultApi.md b/rest/insights/v1/docs/DefaultApi.md new file mode 100644 index 000000000..5f5b312df --- /dev/null +++ b/rest/insights/v1/docs/DefaultApi.md @@ -0,0 +1,334 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchCall**](DefaultApi.md#FetchCall) | **Get** /v1/Voice/{Sid} | +[**FetchSummary**](DefaultApi.md#FetchSummary) | **Get** /v1/Voice/{CallSid}/Summary | +[**FetchVideoParticipantSummary**](DefaultApi.md#FetchVideoParticipantSummary) | **Get** /v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid} | +[**FetchVideoRoomSummary**](DefaultApi.md#FetchVideoRoomSummary) | **Get** /v1/Video/Rooms/{RoomSid} | +[**ListEvent**](DefaultApi.md#ListEvent) | **Get** /v1/Voice/{CallSid}/Events | +[**ListMetric**](DefaultApi.md#ListMetric) | **Get** /v1/Voice/{CallSid}/Metrics | +[**ListVideoParticipantSummary**](DefaultApi.md#ListVideoParticipantSummary) | **Get** /v1/Video/Rooms/{RoomSid}/Participants | +[**ListVideoRoomSummary**](DefaultApi.md#ListVideoRoomSummary) | **Get** /v1/Video/Rooms | + + + +## FetchCall + +> InsightsV1Call FetchCall(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**InsightsV1Call**](insights.v1.call.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSummary + +> InsightsV1CallSummary FetchSummary(ctx, CallSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CallSid** | **string**| | + **optional** | ***FetchSummaryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchSummaryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ProcessingState** | **optional.String**| | + +### Return type + +[**InsightsV1CallSummary**](insights.v1.call.summary.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVideoParticipantSummary + +> InsightsV1VideoRoomSummaryVideoParticipantSummary FetchVideoParticipantSummary(ctx, RoomSid, ParticipantSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| | +**ParticipantSid** | **string**| | + +### Return type + +[**InsightsV1VideoRoomSummaryVideoParticipantSummary**](insights.v1.video_room_summary.video_participant_summary.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVideoRoomSummary + +> InsightsV1VideoRoomSummary FetchVideoRoomSummary(ctx, RoomSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| | + +### Return type + +[**InsightsV1VideoRoomSummary**](insights.v1.video_room_summary.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEvent + +> ListEventResponse ListEvent(ctx, CallSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CallSid** | **string**| | + **optional** | ***ListEventOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEventOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Edge** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEventResponse**](ListEventResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMetric + +> ListMetricResponse ListMetric(ctx, CallSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CallSid** | **string**| | + **optional** | ***ListMetricOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMetricOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Edge** | **optional.String**| | + **Direction** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMetricResponse**](ListMetricResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVideoParticipantSummary + +> ListVideoParticipantSummaryResponse ListVideoParticipantSummary(ctx, RoomSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| | + **optional** | ***ListVideoParticipantSummaryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVideoParticipantSummaryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVideoParticipantSummaryResponse**](ListVideoParticipantSummaryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVideoRoomSummary + +> ListVideoRoomSummaryResponse ListVideoRoomSummary(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListVideoRoomSummaryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVideoRoomSummaryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **RoomType** | [**optional.Interface of []string**](string.md)| | + **Codec** | [**optional.Interface of []string**](string.md)| | + **RoomName** | **optional.String**| | + **CreatedAfter** | **optional.Time**| | + **CreatedBefore** | **optional.Time**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVideoRoomSummaryResponse**](ListVideoRoomSummaryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/insights/v1/docs/InsightsV1Call.md b/rest/insights/v1/docs/InsightsV1Call.md new file mode 100644 index 000000000..cc5182163 --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1Call.md @@ -0,0 +1,13 @@ +# InsightsV1Call + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/InsightsV1CallEvent.md b/rest/insights/v1/docs/InsightsV1CallEvent.md new file mode 100644 index 000000000..d8483073b --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1CallEvent.md @@ -0,0 +1,21 @@ +# InsightsV1CallEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**CarrierEdge** | [**map[string]interface{}**](.md) | | [optional] +**ClientEdge** | [**map[string]interface{}**](.md) | | [optional] +**Edge** | **string** | | [optional] +**Group** | **string** | | [optional] +**Level** | **string** | | [optional] +**Name** | **string** | | [optional] +**SdkEdge** | [**map[string]interface{}**](.md) | | [optional] +**SipEdge** | [**map[string]interface{}**](.md) | | [optional] +**Timestamp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/InsightsV1CallMetric.md b/rest/insights/v1/docs/InsightsV1CallMetric.md new file mode 100644 index 000000000..1f0f7feea --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1CallMetric.md @@ -0,0 +1,19 @@ +# InsightsV1CallMetric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallSid** | **string** | | [optional] +**CarrierEdge** | [**map[string]interface{}**](.md) | | [optional] +**ClientEdge** | [**map[string]interface{}**](.md) | | [optional] +**Direction** | **string** | | [optional] +**Edge** | **string** | | [optional] +**SdkEdge** | [**map[string]interface{}**](.md) | | [optional] +**SipEdge** | [**map[string]interface{}**](.md) | | [optional] +**Timestamp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/InsightsV1CallSummary.md b/rest/insights/v1/docs/InsightsV1CallSummary.md new file mode 100644 index 000000000..698371433 --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1CallSummary.md @@ -0,0 +1,31 @@ +# InsightsV1CallSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | [**map[string]interface{}**](.md) | | [optional] +**CallSid** | **string** | | [optional] +**CallState** | **string** | | [optional] +**CallType** | **string** | | [optional] +**CarrierEdge** | [**map[string]interface{}**](.md) | | [optional] +**ClientEdge** | [**map[string]interface{}**](.md) | | [optional] +**ConnectDuration** | Pointer to **int32** | | [optional] +**CreatedTime** | [**time.Time**](time.Time.md) | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**From** | [**map[string]interface{}**](.md) | | [optional] +**ProcessingState** | **string** | | [optional] +**Properties** | [**map[string]interface{}**](.md) | | [optional] +**SdkEdge** | [**map[string]interface{}**](.md) | | [optional] +**SipEdge** | [**map[string]interface{}**](.md) | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**Tags** | **[]string** | | [optional] +**To** | [**map[string]interface{}**](.md) | | [optional] +**Trust** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md b/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md new file mode 100644 index 000000000..ccbb4979b --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1VideoRoomSummary.md @@ -0,0 +1,36 @@ +# InsightsV1VideoRoomSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Codecs** | **[]string** | | [optional] +**ConcurrentParticipants** | Pointer to **int32** | | [optional] +**CreateTime** | [**time.Time**](time.Time.md) | | [optional] +**CreatedMethod** | **string** | | [optional] +**DurationSec** | **int32** | | [optional] +**EdgeLocation** | **string** | | [optional] +**EndReason** | **string** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MaxConcurrentParticipants** | Pointer to **int32** | | [optional] +**MaxParticipants** | Pointer to **int32** | | [optional] +**MediaRegion** | **string** | | [optional] +**ProcessingState** | **string** | | [optional] +**RecordingEnabled** | **bool** | | [optional] +**RoomName** | **string** | | [optional] +**RoomSid** | **string** | | [optional] +**RoomStatus** | **string** | | [optional] +**RoomType** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TotalParticipantDurationSec** | **int32** | | [optional] +**TotalRecordingDurationSec** | **int32** | | [optional] +**UniqueParticipantIdentities** | Pointer to **int32** | | [optional] +**UniqueParticipants** | Pointer to **int32** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md b/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md new file mode 100644 index 000000000..586f26b45 --- /dev/null +++ b/rest/insights/v1/docs/InsightsV1VideoRoomSummaryVideoParticipantSummary.md @@ -0,0 +1,27 @@ +# InsightsV1VideoRoomSummaryVideoParticipantSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Codecs** | **[]string** | | [optional] +**DurationSec** | **int32** | | [optional] +**EdgeLocation** | **string** | | [optional] +**EndReason** | **string** | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**ErrorCodeUrl** | **string** | | [optional] +**JoinTime** | [**time.Time**](time.Time.md) | | [optional] +**LeaveTime** | [**time.Time**](time.Time.md) | | [optional] +**MediaRegion** | **string** | | [optional] +**ParticipantIdentity** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**Properties** | [**map[string]interface{}**](.md) | | [optional] +**PublisherInfo** | [**map[string]interface{}**](.md) | | [optional] +**RoomSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/ListEventResponse.md b/rest/insights/v1/docs/ListEventResponse.md new file mode 100644 index 000000000..d33f724c7 --- /dev/null +++ b/rest/insights/v1/docs/ListEventResponse.md @@ -0,0 +1,12 @@ +# ListEventResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]InsightsV1CallEvent**](insights.v1.call.event.md) | | [optional] +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/ListMetricResponse.md b/rest/insights/v1/docs/ListMetricResponse.md new file mode 100644 index 000000000..f2dd0949b --- /dev/null +++ b/rest/insights/v1/docs/ListMetricResponse.md @@ -0,0 +1,12 @@ +# ListMetricResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | | [optional] +**Metrics** | [**[]InsightsV1CallMetric**](insights.v1.call.metric.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md b/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md new file mode 100644 index 000000000..75ad8f72c --- /dev/null +++ b/rest/insights/v1/docs/ListVideoParticipantSummaryResponse.md @@ -0,0 +1,12 @@ +# ListVideoParticipantSummaryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | | [optional] +**Participants** | [**[]InsightsV1VideoRoomSummaryVideoParticipantSummary**](insights.v1.video_room_summary.video_participant_summary.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md b/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md new file mode 100644 index 000000000..e226d331a --- /dev/null +++ b/rest/insights/v1/docs/ListVideoRoomSummaryResponse.md @@ -0,0 +1,12 @@ +# ListVideoRoomSummaryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListVideoRoomSummaryResponseMeta**](ListVideoRoomSummaryResponse_meta.md) | | [optional] +**Rooms** | [**[]InsightsV1VideoRoomSummary**](insights.v1.video_room_summary.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md b/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md new file mode 100644 index 000000000..3ee8b17b1 --- /dev/null +++ b/rest/insights/v1/docs/ListVideoRoomSummaryResponseMeta.md @@ -0,0 +1,17 @@ +# ListVideoRoomSummaryResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/insights/v1/model_insights_v1_call.go b/rest/insights/v1/model_insights_v1_call.go new file mode 100644 index 000000000..3ad058297 --- /dev/null +++ b/rest/insights/v1/model_insights_v1_call.go @@ -0,0 +1,17 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// InsightsV1Call struct for InsightsV1Call +type InsightsV1Call struct { + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/insights/v1/model_insights_v1_call_event.go b/rest/insights/v1/model_insights_v1_call_event.go new file mode 100644 index 000000000..133b195b2 --- /dev/null +++ b/rest/insights/v1/model_insights_v1_call_event.go @@ -0,0 +1,25 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// InsightsV1CallEvent struct for InsightsV1CallEvent +type InsightsV1CallEvent struct { + AccountSid string `json:"AccountSid,omitempty"` + CallSid string `json:"CallSid,omitempty"` + CarrierEdge map[string]interface{} `json:"CarrierEdge,omitempty"` + ClientEdge map[string]interface{} `json:"ClientEdge,omitempty"` + Edge string `json:"Edge,omitempty"` + Group string `json:"Group,omitempty"` + Level string `json:"Level,omitempty"` + Name string `json:"Name,omitempty"` + SdkEdge map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp string `json:"Timestamp,omitempty"` +} diff --git a/rest/insights/v1/model_insights_v1_call_metric.go b/rest/insights/v1/model_insights_v1_call_metric.go new file mode 100644 index 000000000..f50d3f989 --- /dev/null +++ b/rest/insights/v1/model_insights_v1_call_metric.go @@ -0,0 +1,23 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// InsightsV1CallMetric struct for InsightsV1CallMetric +type InsightsV1CallMetric struct { + AccountSid string `json:"AccountSid,omitempty"` + CallSid string `json:"CallSid,omitempty"` + CarrierEdge map[string]interface{} `json:"CarrierEdge,omitempty"` + ClientEdge map[string]interface{} `json:"ClientEdge,omitempty"` + Direction string `json:"Direction,omitempty"` + Edge string `json:"Edge,omitempty"` + SdkEdge map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge map[string]interface{} `json:"SipEdge,omitempty"` + Timestamp string `json:"Timestamp,omitempty"` +} diff --git a/rest/insights/v1/model_insights_v1_call_summary.go b/rest/insights/v1/model_insights_v1_call_summary.go new file mode 100644 index 000000000..48451621d --- /dev/null +++ b/rest/insights/v1/model_insights_v1_call_summary.go @@ -0,0 +1,38 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// InsightsV1CallSummary struct for InsightsV1CallSummary +type InsightsV1CallSummary struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes map[string]interface{} `json:"Attributes,omitempty"` + CallSid string `json:"CallSid,omitempty"` + CallState string `json:"CallState,omitempty"` + CallType string `json:"CallType,omitempty"` + CarrierEdge map[string]interface{} `json:"CarrierEdge,omitempty"` + ClientEdge map[string]interface{} `json:"ClientEdge,omitempty"` + ConnectDuration *int32 `json:"ConnectDuration,omitempty"` + CreatedTime time.Time `json:"CreatedTime,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + From map[string]interface{} `json:"From,omitempty"` + ProcessingState string `json:"ProcessingState,omitempty"` + Properties map[string]interface{} `json:"Properties,omitempty"` + SdkEdge map[string]interface{} `json:"SdkEdge,omitempty"` + SipEdge map[string]interface{} `json:"SipEdge,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + Tags []string `json:"Tags,omitempty"` + To map[string]interface{} `json:"To,omitempty"` + Trust map[string]interface{} `json:"Trust,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/insights/v1/model_insights_v1_video_room_summary.go b/rest/insights/v1/model_insights_v1_video_room_summary.go new file mode 100644 index 000000000..3840f9107 --- /dev/null +++ b/rest/insights/v1/model_insights_v1_video_room_summary.go @@ -0,0 +1,43 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// InsightsV1VideoRoomSummary struct for InsightsV1VideoRoomSummary +type InsightsV1VideoRoomSummary struct { + AccountSid string `json:"AccountSid,omitempty"` + Codecs []string `json:"Codecs,omitempty"` + ConcurrentParticipants *int32 `json:"ConcurrentParticipants,omitempty"` + CreateTime time.Time `json:"CreateTime,omitempty"` + CreatedMethod string `json:"CreatedMethod,omitempty"` + DurationSec int32 `json:"DurationSec,omitempty"` + EdgeLocation string `json:"EdgeLocation,omitempty"` + EndReason string `json:"EndReason,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MaxConcurrentParticipants *int32 `json:"MaxConcurrentParticipants,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion string `json:"MediaRegion,omitempty"` + ProcessingState string `json:"ProcessingState,omitempty"` + RecordingEnabled bool `json:"RecordingEnabled,omitempty"` + RoomName string `json:"RoomName,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + RoomStatus string `json:"RoomStatus,omitempty"` + RoomType string `json:"RoomType,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TotalParticipantDurationSec int32 `json:"TotalParticipantDurationSec,omitempty"` + TotalRecordingDurationSec int32 `json:"TotalRecordingDurationSec,omitempty"` + UniqueParticipantIdentities *int32 `json:"UniqueParticipantIdentities,omitempty"` + UniqueParticipants *int32 `json:"UniqueParticipants,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go b/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go new file mode 100644 index 000000000..98e096894 --- /dev/null +++ b/rest/insights/v1/model_insights_v1_video_room_summary_video_participant_summary.go @@ -0,0 +1,34 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// InsightsV1VideoRoomSummaryVideoParticipantSummary struct for InsightsV1VideoRoomSummaryVideoParticipantSummary +type InsightsV1VideoRoomSummaryVideoParticipantSummary struct { + AccountSid string `json:"AccountSid,omitempty"` + Codecs []string `json:"Codecs,omitempty"` + DurationSec int32 `json:"DurationSec,omitempty"` + EdgeLocation string `json:"EdgeLocation,omitempty"` + EndReason string `json:"EndReason,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + ErrorCodeUrl string `json:"ErrorCodeUrl,omitempty"` + JoinTime time.Time `json:"JoinTime,omitempty"` + LeaveTime time.Time `json:"LeaveTime,omitempty"` + MediaRegion string `json:"MediaRegion,omitempty"` + ParticipantIdentity string `json:"ParticipantIdentity,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + Properties map[string]interface{} `json:"Properties,omitempty"` + PublisherInfo map[string]interface{} `json:"PublisherInfo,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/insights/v1/model_list_event_response.go b/rest/insights/v1/model_list_event_response.go new file mode 100644 index 000000000..33f269d0a --- /dev/null +++ b/rest/insights/v1/model_list_event_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEventResponse struct for ListEventResponse +type ListEventResponse struct { + Events []InsightsV1CallEvent `json:"Events,omitempty"` + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/insights/v1/model_list_metric_response.go b/rest/insights/v1/model_list_metric_response.go new file mode 100644 index 000000000..4a4faf8cc --- /dev/null +++ b/rest/insights/v1/model_list_metric_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMetricResponse struct for ListMetricResponse +type ListMetricResponse struct { + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Metrics []InsightsV1CallMetric `json:"Metrics,omitempty"` +} diff --git a/rest/insights/v1/model_list_video_participant_summary_response.go b/rest/insights/v1/model_list_video_participant_summary_response.go new file mode 100644 index 000000000..5fac1d004 --- /dev/null +++ b/rest/insights/v1/model_list_video_participant_summary_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVideoParticipantSummaryResponse struct for ListVideoParticipantSummaryResponse +type ListVideoParticipantSummaryResponse struct { + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Participants []InsightsV1VideoRoomSummaryVideoParticipantSummary `json:"Participants,omitempty"` +} diff --git a/rest/insights/v1/model_list_video_room_summary_response.go b/rest/insights/v1/model_list_video_room_summary_response.go new file mode 100644 index 000000000..9a131c53c --- /dev/null +++ b/rest/insights/v1/model_list_video_room_summary_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVideoRoomSummaryResponse struct for ListVideoRoomSummaryResponse +type ListVideoRoomSummaryResponse struct { + Meta ListVideoRoomSummaryResponseMeta `json:"Meta,omitempty"` + Rooms []InsightsV1VideoRoomSummary `json:"Rooms,omitempty"` +} diff --git a/rest/insights/v1/model_list_video_room_summary_response_meta.go b/rest/insights/v1/model_list_video_room_summary_response_meta.go new file mode 100644 index 000000000..d56f7ccb5 --- /dev/null +++ b/rest/insights/v1/model_list_video_room_summary_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVideoRoomSummaryResponseMeta struct for ListVideoRoomSummaryResponseMeta +type ListVideoRoomSummaryResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/insights/v1/response.go b/rest/insights/v1/response.go new file mode 100644 index 000000000..f56810335 --- /dev/null +++ b/rest/insights/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Insights + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/ip/messaging/.openapi-generator-ignore b/rest/ip/messaging/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/ip/messaging/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/ip/messaging/README.md b/rest/ip/messaging/README.md new file mode 100644 index 000000000..730362657 --- /dev/null +++ b/rest/ip/messaging/README.md @@ -0,0 +1,159 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateChannel**](docs/DefaultApi.md#createchannel) | **Post** /v2/Services/{ServiceSid}/Channels | +*DefaultApi* | [**CreateChannelWebhook**](docs/DefaultApi.md#createchannelwebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +*DefaultApi* | [**CreateCredential**](docs/DefaultApi.md#createcredential) | **Post** /v2/Credentials | +*DefaultApi* | [**CreateInvite**](docs/DefaultApi.md#createinvite) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**CreateMember**](docs/DefaultApi.md#createmember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**CreateMessage**](docs/DefaultApi.md#createmessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**CreateRole**](docs/DefaultApi.md#createrole) | **Post** /v2/Services/{ServiceSid}/Roles | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v2/Services | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /v2/Services/{ServiceSid}/Users | +*DefaultApi* | [**DeleteBinding**](docs/DefaultApi.md#deletebinding) | **Delete** /v2/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteChannel**](docs/DefaultApi.md#deletechannel) | **Delete** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**DeleteChannelWebhook**](docs/DefaultApi.md#deletechannelwebhook) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**DeleteCredential**](docs/DefaultApi.md#deletecredential) | **Delete** /v2/Credentials/{Sid} | +*DefaultApi* | [**DeleteInvite**](docs/DefaultApi.md#deleteinvite) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**DeleteMember**](docs/DefaultApi.md#deletemember) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**DeleteMessage**](docs/DefaultApi.md#deletemessage) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v2/Services/{Sid} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**DeleteUserBinding**](docs/DefaultApi.md#deleteuserbinding) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteUserChannel**](docs/DefaultApi.md#deleteuserchannel) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +*DefaultApi* | [**FetchBinding**](docs/DefaultApi.md#fetchbinding) | **Get** /v2/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchChannel**](docs/DefaultApi.md#fetchchannel) | **Get** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**FetchChannelWebhook**](docs/DefaultApi.md#fetchchannelwebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchCredential**](docs/DefaultApi.md#fetchcredential) | **Get** /v2/Credentials/{Sid} | +*DefaultApi* | [**FetchInvite**](docs/DefaultApi.md#fetchinvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +*DefaultApi* | [**FetchMember**](docs/DefaultApi.md#fetchmember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**FetchMessage**](docs/DefaultApi.md#fetchmessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**FetchRole**](docs/DefaultApi.md#fetchrole) | **Get** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v2/Services/{Sid} | +*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **Get** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**FetchUserBinding**](docs/DefaultApi.md#fetchuserbinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchUserChannel**](docs/DefaultApi.md#fetchuserchannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +*DefaultApi* | [**ListBinding**](docs/DefaultApi.md#listbinding) | **Get** /v2/Services/{ServiceSid}/Bindings | +*DefaultApi* | [**ListChannel**](docs/DefaultApi.md#listchannel) | **Get** /v2/Services/{ServiceSid}/Channels | +*DefaultApi* | [**ListChannelWebhook**](docs/DefaultApi.md#listchannelwebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +*DefaultApi* | [**ListCredential**](docs/DefaultApi.md#listcredential) | **Get** /v2/Credentials | +*DefaultApi* | [**ListInvite**](docs/DefaultApi.md#listinvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +*DefaultApi* | [**ListMember**](docs/DefaultApi.md#listmember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +*DefaultApi* | [**ListMessage**](docs/DefaultApi.md#listmessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +*DefaultApi* | [**ListRole**](docs/DefaultApi.md#listrole) | **Get** /v2/Services/{ServiceSid}/Roles | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v2/Services | +*DefaultApi* | [**ListUser**](docs/DefaultApi.md#listuser) | **Get** /v2/Services/{ServiceSid}/Users | +*DefaultApi* | [**ListUserBinding**](docs/DefaultApi.md#listuserbinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings | +*DefaultApi* | [**ListUserChannel**](docs/DefaultApi.md#listuserchannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels | +*DefaultApi* | [**UpdateChannel**](docs/DefaultApi.md#updatechannel) | **Post** /v2/Services/{ServiceSid}/Channels/{Sid} | +*DefaultApi* | [**UpdateChannelWebhook**](docs/DefaultApi.md#updatechannelwebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +*DefaultApi* | [**UpdateCredential**](docs/DefaultApi.md#updatecredential) | **Post** /v2/Credentials/{Sid} | +*DefaultApi* | [**UpdateMember**](docs/DefaultApi.md#updatemember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +*DefaultApi* | [**UpdateMessage**](docs/DefaultApi.md#updatemessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Post** /v2/Services/{ServiceSid}/Roles/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v2/Services/{Sid} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Post** /v2/Services/{ServiceSid}/Users/{Sid} | +*DefaultApi* | [**UpdateUserChannel**](docs/DefaultApi.md#updateuserchannel) | **Post** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | + + +## Documentation For Models + + - [CreateChannelRequest](docs/CreateChannelRequest.md) + - [CreateChannelWebhookRequest](docs/CreateChannelWebhookRequest.md) + - [CreateCredentialRequest](docs/CreateCredentialRequest.md) + - [CreateInviteRequest](docs/CreateInviteRequest.md) + - [CreateMemberRequest](docs/CreateMemberRequest.md) + - [CreateMessageRequest](docs/CreateMessageRequest.md) + - [CreateRoleRequest](docs/CreateRoleRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateUserRequest](docs/CreateUserRequest.md) + - [IpMessagingV2Credential](docs/IpMessagingV2Credential.md) + - [IpMessagingV2Service](docs/IpMessagingV2Service.md) + - [IpMessagingV2ServiceBinding](docs/IpMessagingV2ServiceBinding.md) + - [IpMessagingV2ServiceChannel](docs/IpMessagingV2ServiceChannel.md) + - [IpMessagingV2ServiceChannelChannelWebhook](docs/IpMessagingV2ServiceChannelChannelWebhook.md) + - [IpMessagingV2ServiceChannelInvite](docs/IpMessagingV2ServiceChannelInvite.md) + - [IpMessagingV2ServiceChannelMember](docs/IpMessagingV2ServiceChannelMember.md) + - [IpMessagingV2ServiceChannelMessage](docs/IpMessagingV2ServiceChannelMessage.md) + - [IpMessagingV2ServiceRole](docs/IpMessagingV2ServiceRole.md) + - [IpMessagingV2ServiceUser](docs/IpMessagingV2ServiceUser.md) + - [IpMessagingV2ServiceUserUserBinding](docs/IpMessagingV2ServiceUserUserBinding.md) + - [IpMessagingV2ServiceUserUserChannel](docs/IpMessagingV2ServiceUserUserChannel.md) + - [ListBindingResponse](docs/ListBindingResponse.md) + - [ListChannelResponse](docs/ListChannelResponse.md) + - [ListChannelWebhookResponse](docs/ListChannelWebhookResponse.md) + - [ListCredentialResponse](docs/ListCredentialResponse.md) + - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) + - [ListInviteResponse](docs/ListInviteResponse.md) + - [ListMemberResponse](docs/ListMemberResponse.md) + - [ListMessageResponse](docs/ListMessageResponse.md) + - [ListRoleResponse](docs/ListRoleResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListUserBindingResponse](docs/ListUserBindingResponse.md) + - [ListUserChannelResponse](docs/ListUserChannelResponse.md) + - [ListUserResponse](docs/ListUserResponse.md) + - [UpdateChannelRequest](docs/UpdateChannelRequest.md) + - [UpdateChannelWebhookRequest](docs/UpdateChannelWebhookRequest.md) + - [UpdateCredentialRequest](docs/UpdateCredentialRequest.md) + - [UpdateMemberRequest](docs/UpdateMemberRequest.md) + - [UpdateMessageRequest](docs/UpdateMessageRequest.md) + - [UpdateRoleRequest](docs/UpdateRoleRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateUserChannelRequest](docs/UpdateUserChannelRequest.md) + - [UpdateUserRequest](docs/UpdateUserRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/ip/messaging/api_default.go b/rest/ip/messaging/api_default.go new file mode 100644 index 000000000..24e807cf3 --- /dev/null +++ b/rest/ip/messaging/api_default.go @@ -0,0 +1,2525 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://ip-messaging.twilio.com"), + } +} +// CreateChannelParams Optional parameters for the method 'CreateChannel' +type CreateChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateChannel Method for CreateChannel + * @param ServiceSid + * @param optional nil or *CreateChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "CreatedBy" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "FriendlyName" (string) - + * @param "Type" (string) - + * @param "UniqueName" (string) - +@return IpMessagingV2ServiceChannel +*/ +func (c *DefaultApiService) CreateChannel(ServiceSid string, params *CreateChannelParams) (*IpMessagingV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateChannelWebhookParams Optional parameters for the method 'CreateChannelWebhook' +type CreateChannelWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateChannelWebhook Method for CreateChannelWebhook + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *CreateChannelWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - + * @param "ConfigurationFlowSid" (string) - + * @param "ConfigurationMethod" (string) - + * @param "ConfigurationRetryCount" (int32) - + * @param "ConfigurationTriggers" ([]string) - + * @param "ConfigurationUrl" (string) - + * @param "Type" (string) - +@return IpMessagingV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) CreateChannelWebhook(ServiceSid string, ChannelSid string, params *CreateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialParams Optional parameters for the method 'CreateCredential' +type CreateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateCredential Method for CreateCredential + * @param optional nil or *CreateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - + * @param "Certificate" (string) - + * @param "FriendlyName" (string) - + * @param "PrivateKey" (string) - + * @param "Sandbox" (bool) - + * @param "Secret" (string) - + * @param "Type" (string) - +@return IpMessagingV2Credential +*/ +func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*IpMessagingV2Credential, error) { + path := "/v2/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateInviteParams Optional parameters for the method 'CreateInvite' +type CreateInviteParams struct { + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateInvite Method for CreateInvite + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *CreateInviteOpts - Optional Parameters: + * @param "Identity" (string) - + * @param "RoleSid" (string) - +@return IpMessagingV2ServiceChannelInvite +*/ +func (c *DefaultApiService) CreateInvite(ServiceSid string, ChannelSid string, params *CreateInviteParams) (*IpMessagingV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMemberParams Optional parameters for the method 'CreateMember' +type CreateMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Identity *string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateMember Method for CreateMember + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *CreateMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "Identity" (string) - + * @param "LastConsumedMessageIndex" (*int32) - + * @param "LastConsumptionTimestamp" (time.Time) - + * @param "RoleSid" (string) - +@return IpMessagingV2ServiceChannelMember +*/ +func (c *DefaultApiService) CreateMember(ServiceSid string, ChannelSid string, params *CreateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessageParams Optional parameters for the method 'CreateMessage' +type CreateMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` + MediaSid *string `json:"MediaSid,omitempty"` +} + +/* +CreateMessage Method for CreateMessage + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *CreateMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "Body" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "From" (string) - + * @param "LastUpdatedBy" (string) - + * @param "MediaSid" (string) - +@return IpMessagingV2ServiceChannelMessage +*/ +func (c *DefaultApiService) CreateMessage(ServiceSid string, ChannelSid string, params *CreateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + if params != nil && params.MediaSid != nil { + data.Set("MediaSid", *params.MediaSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRoleParams Optional parameters for the method 'CreateRole' +type CreateRoleParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Permission *[]string `json:"Permission,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateRole Method for CreateRole + * @param ServiceSid + * @param optional nil or *CreateRoleOpts - Optional Parameters: + * @param "FriendlyName" (string) - + * @param "Permission" ([]string) - + * @param "Type" (string) - +@return IpMessagingV2ServiceRole +*/ +func (c *DefaultApiService) CreateRole(ServiceSid string, params *CreateRoleParams) (*IpMessagingV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - +@return IpMessagingV2Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*IpMessagingV2Service, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateUserParams Optional parameters for the method 'CreateUser' +type CreateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +CreateUser Method for CreateUser + * @param ServiceSid + * @param optional nil or *CreateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "FriendlyName" (string) - + * @param "Identity" (string) - + * @param "RoleSid" (string) - +@return IpMessagingV2ServiceUser +*/ +func (c *DefaultApiService) CreateUser(ServiceSid string, params *CreateUserParams) (*IpMessagingV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteBinding Method for DeleteBinding + * @param ServiceSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteChannelParams Optional parameters for the method 'DeleteChannel' +type DeleteChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteChannel Method for DeleteChannel + * @param ServiceSid + * @param Sid + * @param optional nil or *DeleteChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteChannel(ServiceSid string, Sid string, params *DeleteChannelParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteChannelWebhook Method for DeleteChannelWebhook + * @param ServiceSid + * @param ChannelSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredential Method for DeleteCredential + * @param Sid +*/ +func (c *DefaultApiService) DeleteCredential(Sid string) (error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteInvite Method for DeleteInvite + * @param ServiceSid + * @param ChannelSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteInvite(ServiceSid string, ChannelSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteMemberParams Optional parameters for the method 'DeleteMember' +type DeleteMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteMember Method for DeleteMember + * @param ServiceSid + * @param ChannelSid + * @param Sid + * @param optional nil or *DeleteMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteMember(ServiceSid string, ChannelSid string, Sid string, params *DeleteMemberParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteMessageParams Optional parameters for the method 'DeleteMessage' +type DeleteMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` +} + +/* +DeleteMessage Method for DeleteMessage + * @param ServiceSid + * @param ChannelSid + * @param Sid + * @param optional nil or *DeleteMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header +*/ +func (c *DefaultApiService) DeleteMessage(ServiceSid string, ChannelSid string, Sid string, params *DeleteMessageParams) (error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRole Method for DeleteRole + * @param ServiceSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteRole(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUser Method for DeleteUser + * @param ServiceSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteUser(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUserBinding Method for DeleteUserBinding + * @param ServiceSid + * @param UserSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteUserBinding(ServiceSid string, UserSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteUserChannel Method for DeleteUserChannel + * @param ServiceSid + * @param UserSid + * @param ChannelSid +*/ +func (c *DefaultApiService) DeleteUserChannel(ServiceSid string, UserSid string, ChannelSid string) (error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchBinding Method for FetchBinding + * @param ServiceSid + * @param Sid +@return IpMessagingV2ServiceBinding +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*IpMessagingV2ServiceBinding, error) { + path := "/v2/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchChannel Method for FetchChannel + * @param ServiceSid + * @param Sid +@return IpMessagingV2ServiceChannel +*/ +func (c *DefaultApiService) FetchChannel(ServiceSid string, Sid string) (*IpMessagingV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchChannelWebhook Method for FetchChannelWebhook + * @param ServiceSid + * @param ChannelSid + * @param Sid +@return IpMessagingV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) FetchChannelWebhook(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredential Method for FetchCredential + * @param Sid +@return IpMessagingV2Credential +*/ +func (c *DefaultApiService) FetchCredential(Sid string) (*IpMessagingV2Credential, error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchInvite Method for FetchInvite + * @param ServiceSid + * @param ChannelSid + * @param Sid +@return IpMessagingV2ServiceChannelInvite +*/ +func (c *DefaultApiService) FetchInvite(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelInvite, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelInvite{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMember Method for FetchMember + * @param ServiceSid + * @param ChannelSid + * @param Sid +@return IpMessagingV2ServiceChannelMember +*/ +func (c *DefaultApiService) FetchMember(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessage Method for FetchMessage + * @param ServiceSid + * @param ChannelSid + * @param Sid +@return IpMessagingV2ServiceChannelMessage +*/ +func (c *DefaultApiService) FetchMessage(ServiceSid string, ChannelSid string, Sid string) (*IpMessagingV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRole Method for FetchRole + * @param ServiceSid + * @param Sid +@return IpMessagingV2ServiceRole +*/ +func (c *DefaultApiService) FetchRole(ServiceSid string, Sid string) (*IpMessagingV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid +@return IpMessagingV2Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*IpMessagingV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUser Method for FetchUser + * @param ServiceSid + * @param Sid +@return IpMessagingV2ServiceUser +*/ +func (c *DefaultApiService) FetchUser(ServiceSid string, Sid string) (*IpMessagingV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUserBinding Method for FetchUserBinding + * @param ServiceSid + * @param UserSid + * @param Sid +@return IpMessagingV2ServiceUserUserBinding +*/ +func (c *DefaultApiService) FetchUserBinding(ServiceSid string, UserSid string, Sid string) (*IpMessagingV2ServiceUserUserBinding, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUserUserBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchUserChannel Method for FetchUserChannel + * @param ServiceSid + * @param UserSid + * @param ChannelSid +@return IpMessagingV2ServiceUserUserChannel +*/ +func (c *DefaultApiService) FetchUserChannel(ServiceSid string, UserSid string, ChannelSid string) (*IpMessagingV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBindingParams Optional parameters for the method 'ListBinding' +type ListBindingParams struct { + BindingType *[]string `json:"BindingType,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBinding Method for ListBinding + * @param ServiceSid + * @param optional nil or *ListBindingOpts - Optional Parameters: + * @param "BindingType" ([]string) - + * @param "Identity" ([]string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBindingResponse +*/ +func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { + path := "/v2/Services/{ServiceSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelParams Optional parameters for the method 'ListChannel' +type ListChannelParams struct { + Type *[]string `json:"Type,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannel Method for ListChannel + * @param ServiceSid + * @param optional nil or *ListChannelOpts - Optional Parameters: + * @param "Type" ([]string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelResponse +*/ +func (c *DefaultApiService) ListChannel(ServiceSid string, params *ListChannelParams) (*ListChannelResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChannelWebhookParams Optional parameters for the method 'ListChannelWebhook' +type ListChannelWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChannelWebhook Method for ListChannelWebhook + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *ListChannelWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChannelWebhookResponse +*/ +func (c *DefaultApiService) ListChannelWebhook(ServiceSid string, ChannelSid string, params *ListChannelWebhookParams) (*ListChannelWebhookResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChannelWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialParams Optional parameters for the method 'ListCredential' +type ListCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredential Method for ListCredential + * @param optional nil or *ListCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialResponse +*/ +func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { + path := "/v2/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInviteParams Optional parameters for the method 'ListInvite' +type ListInviteParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInvite Method for ListInvite + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *ListInviteOpts - Optional Parameters: + * @param "Identity" ([]string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInviteResponse +*/ +func (c *DefaultApiService) ListInvite(ServiceSid string, ChannelSid string, params *ListInviteParams) (*ListInviteResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInviteResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMemberParams Optional parameters for the method 'ListMember' +type ListMemberParams struct { + Identity *[]string `json:"Identity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMember Method for ListMember + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *ListMemberOpts - Optional Parameters: + * @param "Identity" ([]string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMemberResponse +*/ +func (c *DefaultApiService) ListMember(ServiceSid string, ChannelSid string, params *ListMemberParams) (*ListMemberResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMemberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessageParams Optional parameters for the method 'ListMessage' +type ListMessageParams struct { + Order *string `json:"Order,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessage Method for ListMessage + * @param ServiceSid + * @param ChannelSid + * @param optional nil or *ListMessageOpts - Optional Parameters: + * @param "Order" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessageResponse +*/ +func (c *DefaultApiService) ListMessage(ServiceSid string, ChannelSid string, params *ListMessageParams) (*ListMessageResponse, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessageResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoleParams Optional parameters for the method 'ListRole' +type ListRoleParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRole Method for ListRole + * @param ServiceSid + * @param optional nil or *ListRoleOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoleResponse +*/ +func (c *DefaultApiService) ListRole(ServiceSid string, params *ListRoleParams) (*ListRoleResponse, error) { + path := "/v2/Services/{ServiceSid}/Roles" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserParams Optional parameters for the method 'ListUser' +type ListUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUser Method for ListUser + * @param ServiceSid + * @param optional nil or *ListUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserResponse +*/ +func (c *DefaultApiService) ListUser(ServiceSid string, params *ListUserParams) (*ListUserResponse, error) { + path := "/v2/Services/{ServiceSid}/Users" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserBindingParams Optional parameters for the method 'ListUserBinding' +type ListUserBindingParams struct { + BindingType *[]string `json:"BindingType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUserBinding Method for ListUserBinding + * @param ServiceSid + * @param UserSid + * @param optional nil or *ListUserBindingOpts - Optional Parameters: + * @param "BindingType" ([]string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserBindingResponse +*/ +func (c *DefaultApiService) ListUserBinding(ServiceSid string, UserSid string, params *ListUserBindingParams) (*ListUserBindingResponse, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingType != nil { + data.Set("BindingType", strings.Join(*params.BindingType, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUserChannelParams Optional parameters for the method 'ListUserChannel' +type ListUserChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUserChannel Method for ListUserChannel + * @param ServiceSid + * @param UserSid + * @param optional nil or *ListUserChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUserChannelResponse +*/ +func (c *DefaultApiService) ListUserChannel(ServiceSid string, UserSid string, params *ListUserChannelParams) (*ListUserChannelResponse, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUserChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChannelParams Optional parameters for the method 'UpdateChannel' +type UpdateChannelParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + CreatedBy *string `json:"CreatedBy,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateChannel Method for UpdateChannel + * @param ServiceSid + * @param Sid + * @param optional nil or *UpdateChannelOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "CreatedBy" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "FriendlyName" (string) - + * @param "UniqueName" (string) - +@return IpMessagingV2ServiceChannel +*/ +func (c *DefaultApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*IpMessagingV2ServiceChannel, error) { + path := "/v2/Services/{ServiceSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.CreatedBy != nil { + data.Set("CreatedBy", *params.CreatedBy) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChannelWebhookParams Optional parameters for the method 'UpdateChannelWebhook' +type UpdateChannelWebhookParams struct { + ConfigurationFilters *[]string `json:"Configuration.Filters,omitempty"` + ConfigurationFlowSid *string `json:"Configuration.FlowSid,omitempty"` + ConfigurationMethod *string `json:"Configuration.Method,omitempty"` + ConfigurationRetryCount *int32 `json:"Configuration.RetryCount,omitempty"` + ConfigurationTriggers *[]string `json:"Configuration.Triggers,omitempty"` + ConfigurationUrl *string `json:"Configuration.Url,omitempty"` +} + +/* +UpdateChannelWebhook Method for UpdateChannelWebhook + * @param ServiceSid + * @param ChannelSid + * @param Sid + * @param optional nil or *UpdateChannelWebhookOpts - Optional Parameters: + * @param "ConfigurationFilters" ([]string) - + * @param "ConfigurationFlowSid" (string) - + * @param "ConfigurationMethod" (string) - + * @param "ConfigurationRetryCount" (int32) - + * @param "ConfigurationTriggers" ([]string) - + * @param "ConfigurationUrl" (string) - +@return IpMessagingV2ServiceChannelChannelWebhook +*/ +func (c *DefaultApiService) UpdateChannelWebhook(ServiceSid string, ChannelSid string, Sid string, params *UpdateChannelWebhookParams) (*IpMessagingV2ServiceChannelChannelWebhook, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConfigurationFilters != nil { + data.Set("ConfigurationFilters", strings.Join(*params.ConfigurationFilters, ",")) + } + if params != nil && params.ConfigurationFlowSid != nil { + data.Set("ConfigurationFlowSid", *params.ConfigurationFlowSid) + } + if params != nil && params.ConfigurationMethod != nil { + data.Set("ConfigurationMethod", *params.ConfigurationMethod) + } + if params != nil && params.ConfigurationRetryCount != nil { + data.Set("ConfigurationRetryCount", fmt.Sprint(*params.ConfigurationRetryCount)) + } + if params != nil && params.ConfigurationTriggers != nil { + data.Set("ConfigurationTriggers", strings.Join(*params.ConfigurationTriggers, ",")) + } + if params != nil && params.ConfigurationUrl != nil { + data.Set("ConfigurationUrl", *params.ConfigurationUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelChannelWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialParams Optional parameters for the method 'UpdateCredential' +type UpdateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` +} + +/* +UpdateCredential Method for UpdateCredential + * @param Sid + * @param optional nil or *UpdateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - + * @param "Certificate" (string) - + * @param "FriendlyName" (string) - + * @param "PrivateKey" (string) - + * @param "Sandbox" (bool) - + * @param "Secret" (string) - +@return IpMessagingV2Credential +*/ +func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*IpMessagingV2Credential, error) { + path := "/v2/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMemberParams Optional parameters for the method 'UpdateMember' +type UpdateMemberParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateMember Method for UpdateMember + * @param ServiceSid + * @param ChannelSid + * @param Sid + * @param optional nil or *UpdateMemberOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "LastConsumedMessageIndex" (*int32) - + * @param "LastConsumptionTimestamp" (time.Time) - + * @param "RoleSid" (string) - +@return IpMessagingV2ServiceChannelMember +*/ +func (c *DefaultApiService) UpdateMember(ServiceSid string, ChannelSid string, Sid string, params *UpdateMemberParams) (*IpMessagingV2ServiceChannelMember, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMember{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMessageParams Optional parameters for the method 'UpdateMessage' +type UpdateMessageParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Body *string `json:"Body,omitempty"` + DateCreated *time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + From *string `json:"From,omitempty"` + LastUpdatedBy *string `json:"LastUpdatedBy,omitempty"` +} + +/* +UpdateMessage Method for UpdateMessage + * @param ServiceSid + * @param ChannelSid + * @param Sid + * @param optional nil or *UpdateMessageOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "Body" (string) - + * @param "DateCreated" (time.Time) - + * @param "DateUpdated" (time.Time) - + * @param "From" (string) - + * @param "LastUpdatedBy" (string) - +@return IpMessagingV2ServiceChannelMessage +*/ +func (c *DefaultApiService) UpdateMessage(ServiceSid string, ChannelSid string, Sid string, params *UpdateMessageParams) (*IpMessagingV2ServiceChannelMessage, error) { + path := "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.DateCreated != nil { + data.Set("DateCreated", fmt.Sprint(*params.DateCreated)) + } + if params != nil && params.DateUpdated != nil { + data.Set("DateUpdated", fmt.Sprint(*params.DateUpdated)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.LastUpdatedBy != nil { + data.Set("LastUpdatedBy", *params.LastUpdatedBy) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceChannelMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoleParams Optional parameters for the method 'UpdateRole' +type UpdateRoleParams struct { + Permission *[]string `json:"Permission,omitempty"` +} + +/* +UpdateRole Method for UpdateRole + * @param ServiceSid + * @param Sid + * @param optional nil or *UpdateRoleOpts - Optional Parameters: + * @param "Permission" ([]string) - +@return IpMessagingV2ServiceRole +*/ +func (c *DefaultApiService) UpdateRole(ServiceSid string, Sid string, params *UpdateRoleParams) (*IpMessagingV2ServiceRole, error) { + path := "/v2/Services/{ServiceSid}/Roles/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Permission != nil { + data.Set("Permission", strings.Join(*params.Permission, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceRole{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + ConsumptionReportInterval *int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid *string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid *string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid *string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LimitsChannelMembers *int32 `json:"Limits.ChannelMembers,omitempty"` + LimitsUserChannels *int32 `json:"Limits.UserChannels,omitempty"` + MediaCompatibilityMessage *string `json:"Media.CompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled *bool `json:"Notifications.AddedToChannel.Enabled,omitempty"` + NotificationsAddedToChannelSound *string `json:"Notifications.AddedToChannel.Sound,omitempty"` + NotificationsAddedToChannelTemplate *string `json:"Notifications.AddedToChannel.Template,omitempty"` + NotificationsInvitedToChannelEnabled *bool `json:"Notifications.InvitedToChannel.Enabled,omitempty"` + NotificationsInvitedToChannelSound *string `json:"Notifications.InvitedToChannel.Sound,omitempty"` + NotificationsInvitedToChannelTemplate *string `json:"Notifications.InvitedToChannel.Template,omitempty"` + NotificationsLogEnabled *bool `json:"Notifications.LogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled *bool `json:"Notifications.NewMessage.BadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled *bool `json:"Notifications.NewMessage.Enabled,omitempty"` + NotificationsNewMessageSound *string `json:"Notifications.NewMessage.Sound,omitempty"` + NotificationsNewMessageTemplate *string `json:"Notifications.NewMessage.Template,omitempty"` + NotificationsRemovedFromChannelEnabled *bool `json:"Notifications.RemovedFromChannel.Enabled,omitempty"` + NotificationsRemovedFromChannelSound *string `json:"Notifications.RemovedFromChannel.Sound,omitempty"` + NotificationsRemovedFromChannelTemplate *string `json:"Notifications.RemovedFromChannel.Template,omitempty"` + PostWebhookRetryCount *int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl *string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount *int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl *string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled *bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled *bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout *int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters *[]string `json:"WebhookFilters,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "ConsumptionReportInterval" (int32) - + * @param "DefaultChannelCreatorRoleSid" (string) - + * @param "DefaultChannelRoleSid" (string) - + * @param "DefaultServiceRoleSid" (string) - + * @param "FriendlyName" (string) - + * @param "LimitsChannelMembers" (int32) - + * @param "LimitsUserChannels" (int32) - + * @param "MediaCompatibilityMessage" (string) - + * @param "NotificationsAddedToChannelEnabled" (bool) - + * @param "NotificationsAddedToChannelSound" (string) - + * @param "NotificationsAddedToChannelTemplate" (string) - + * @param "NotificationsInvitedToChannelEnabled" (bool) - + * @param "NotificationsInvitedToChannelSound" (string) - + * @param "NotificationsInvitedToChannelTemplate" (string) - + * @param "NotificationsLogEnabled" (bool) - + * @param "NotificationsNewMessageBadgeCountEnabled" (bool) - + * @param "NotificationsNewMessageEnabled" (bool) - + * @param "NotificationsNewMessageSound" (string) - + * @param "NotificationsNewMessageTemplate" (string) - + * @param "NotificationsRemovedFromChannelEnabled" (bool) - + * @param "NotificationsRemovedFromChannelSound" (string) - + * @param "NotificationsRemovedFromChannelTemplate" (string) - + * @param "PostWebhookRetryCount" (int32) - + * @param "PostWebhookUrl" (string) - + * @param "PreWebhookRetryCount" (int32) - + * @param "PreWebhookUrl" (string) - + * @param "ReachabilityEnabled" (bool) - + * @param "ReadStatusEnabled" (bool) - + * @param "TypingIndicatorTimeout" (int32) - + * @param "WebhookFilters" ([]string) - + * @param "WebhookMethod" (string) - +@return IpMessagingV2Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*IpMessagingV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ConsumptionReportInterval != nil { + data.Set("ConsumptionReportInterval", fmt.Sprint(*params.ConsumptionReportInterval)) + } + if params != nil && params.DefaultChannelCreatorRoleSid != nil { + data.Set("DefaultChannelCreatorRoleSid", *params.DefaultChannelCreatorRoleSid) + } + if params != nil && params.DefaultChannelRoleSid != nil { + data.Set("DefaultChannelRoleSid", *params.DefaultChannelRoleSid) + } + if params != nil && params.DefaultServiceRoleSid != nil { + data.Set("DefaultServiceRoleSid", *params.DefaultServiceRoleSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LimitsChannelMembers != nil { + data.Set("LimitsChannelMembers", fmt.Sprint(*params.LimitsChannelMembers)) + } + if params != nil && params.LimitsUserChannels != nil { + data.Set("LimitsUserChannels", fmt.Sprint(*params.LimitsUserChannels)) + } + if params != nil && params.MediaCompatibilityMessage != nil { + data.Set("MediaCompatibilityMessage", *params.MediaCompatibilityMessage) + } + if params != nil && params.NotificationsAddedToChannelEnabled != nil { + data.Set("NotificationsAddedToChannelEnabled", fmt.Sprint(*params.NotificationsAddedToChannelEnabled)) + } + if params != nil && params.NotificationsAddedToChannelSound != nil { + data.Set("NotificationsAddedToChannelSound", *params.NotificationsAddedToChannelSound) + } + if params != nil && params.NotificationsAddedToChannelTemplate != nil { + data.Set("NotificationsAddedToChannelTemplate", *params.NotificationsAddedToChannelTemplate) + } + if params != nil && params.NotificationsInvitedToChannelEnabled != nil { + data.Set("NotificationsInvitedToChannelEnabled", fmt.Sprint(*params.NotificationsInvitedToChannelEnabled)) + } + if params != nil && params.NotificationsInvitedToChannelSound != nil { + data.Set("NotificationsInvitedToChannelSound", *params.NotificationsInvitedToChannelSound) + } + if params != nil && params.NotificationsInvitedToChannelTemplate != nil { + data.Set("NotificationsInvitedToChannelTemplate", *params.NotificationsInvitedToChannelTemplate) + } + if params != nil && params.NotificationsLogEnabled != nil { + data.Set("NotificationsLogEnabled", fmt.Sprint(*params.NotificationsLogEnabled)) + } + if params != nil && params.NotificationsNewMessageBadgeCountEnabled != nil { + data.Set("NotificationsNewMessageBadgeCountEnabled", fmt.Sprint(*params.NotificationsNewMessageBadgeCountEnabled)) + } + if params != nil && params.NotificationsNewMessageEnabled != nil { + data.Set("NotificationsNewMessageEnabled", fmt.Sprint(*params.NotificationsNewMessageEnabled)) + } + if params != nil && params.NotificationsNewMessageSound != nil { + data.Set("NotificationsNewMessageSound", *params.NotificationsNewMessageSound) + } + if params != nil && params.NotificationsNewMessageTemplate != nil { + data.Set("NotificationsNewMessageTemplate", *params.NotificationsNewMessageTemplate) + } + if params != nil && params.NotificationsRemovedFromChannelEnabled != nil { + data.Set("NotificationsRemovedFromChannelEnabled", fmt.Sprint(*params.NotificationsRemovedFromChannelEnabled)) + } + if params != nil && params.NotificationsRemovedFromChannelSound != nil { + data.Set("NotificationsRemovedFromChannelSound", *params.NotificationsRemovedFromChannelSound) + } + if params != nil && params.NotificationsRemovedFromChannelTemplate != nil { + data.Set("NotificationsRemovedFromChannelTemplate", *params.NotificationsRemovedFromChannelTemplate) + } + if params != nil && params.PostWebhookRetryCount != nil { + data.Set("PostWebhookRetryCount", fmt.Sprint(*params.PostWebhookRetryCount)) + } + if params != nil && params.PostWebhookUrl != nil { + data.Set("PostWebhookUrl", *params.PostWebhookUrl) + } + if params != nil && params.PreWebhookRetryCount != nil { + data.Set("PreWebhookRetryCount", fmt.Sprint(*params.PreWebhookRetryCount)) + } + if params != nil && params.PreWebhookUrl != nil { + data.Set("PreWebhookUrl", *params.PreWebhookUrl) + } + if params != nil && params.ReachabilityEnabled != nil { + data.Set("ReachabilityEnabled", fmt.Sprint(*params.ReachabilityEnabled)) + } + if params != nil && params.ReadStatusEnabled != nil { + data.Set("ReadStatusEnabled", fmt.Sprint(*params.ReadStatusEnabled)) + } + if params != nil && params.TypingIndicatorTimeout != nil { + data.Set("TypingIndicatorTimeout", fmt.Sprint(*params.TypingIndicatorTimeout)) + } + if params != nil && params.WebhookFilters != nil { + data.Set("WebhookFilters", strings.Join(*params.WebhookFilters, ",")) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserParams Optional parameters for the method 'UpdateUser' +type UpdateUserParams struct { + XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RoleSid *string `json:"RoleSid,omitempty"` +} + +/* +UpdateUser Method for UpdateUser + * @param ServiceSid + * @param Sid + * @param optional nil or *UpdateUserOpts - Optional Parameters: + * @param "XTwilioWebhookEnabled" (string) - The X-Twilio-Webhook-Enabled HTTP request header + * @param "Attributes" (string) - + * @param "FriendlyName" (string) - + * @param "RoleSid" (string) - +@return IpMessagingV2ServiceUser +*/ +func (c *DefaultApiService) UpdateUser(ServiceSid string, Sid string, params *UpdateUserParams) (*IpMessagingV2ServiceUser, error) { + path := "/v2/Services/{ServiceSid}/Users/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RoleSid != nil { + data.Set("RoleSid", *params.RoleSid) + } + + if params != nil && params.XTwilioWebhookEnabled != nil { + headers["XTwilioWebhookEnabled"] = *params.XTwilioWebhookEnabled + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateUserChannelParams Optional parameters for the method 'UpdateUserChannel' +type UpdateUserChannelParams struct { + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp *time.Time `json:"LastConsumptionTimestamp,omitempty"` + NotificationLevel *string `json:"NotificationLevel,omitempty"` +} + +/* +UpdateUserChannel Method for UpdateUserChannel + * @param ServiceSid + * @param UserSid + * @param ChannelSid + * @param optional nil or *UpdateUserChannelOpts - Optional Parameters: + * @param "LastConsumedMessageIndex" (*int32) - + * @param "LastConsumptionTimestamp" (time.Time) - + * @param "NotificationLevel" (string) - +@return IpMessagingV2ServiceUserUserChannel +*/ +func (c *DefaultApiService) UpdateUserChannel(ServiceSid string, UserSid string, ChannelSid string, params *UpdateUserChannelParams) (*IpMessagingV2ServiceUserUserChannel, error) { + path := "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"UserSid"+"}", UserSid, -1) + path = strings.Replace(path, "{"+"ChannelSid"+"}", ChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.LastConsumedMessageIndex != nil { + data.Set("LastConsumedMessageIndex", fmt.Sprint(*params.LastConsumedMessageIndex)) + } + if params != nil && params.LastConsumptionTimestamp != nil { + data.Set("LastConsumptionTimestamp", fmt.Sprint(*params.LastConsumptionTimestamp)) + } + if params != nil && params.NotificationLevel != nil { + data.Set("NotificationLevel", *params.NotificationLevel) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &IpMessagingV2ServiceUserUserChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/ip/messaging/docs/CreateChannelRequest.md b/rest/ip/messaging/docs/CreateChannelRequest.md new file mode 100644 index 000000000..84b96e30a --- /dev/null +++ b/rest/ip/messaging/docs/CreateChannelRequest.md @@ -0,0 +1,17 @@ +# CreateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateChannelWebhookRequest.md b/rest/ip/messaging/docs/CreateChannelWebhookRequest.md new file mode 100644 index 000000000..cc1724665 --- /dev/null +++ b/rest/ip/messaging/docs/CreateChannelWebhookRequest.md @@ -0,0 +1,17 @@ +# CreateChannelWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | | [optional] +**ConfigurationFlowSid** | **string** | | [optional] +**ConfigurationMethod** | **string** | | [optional] +**ConfigurationRetryCount** | **int32** | | [optional] +**ConfigurationTriggers** | **[]string** | | [optional] +**ConfigurationUrl** | **string** | | [optional] +**Type** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateCredentialRequest.md b/rest/ip/messaging/docs/CreateCredentialRequest.md new file mode 100644 index 000000000..fa5c0164d --- /dev/null +++ b/rest/ip/messaging/docs/CreateCredentialRequest.md @@ -0,0 +1,17 @@ +# CreateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | | [optional] +**Certificate** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**PrivateKey** | **string** | | [optional] +**Sandbox** | **bool** | | [optional] +**Secret** | **string** | | [optional] +**Type** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateInviteRequest.md b/rest/ip/messaging/docs/CreateInviteRequest.md new file mode 100644 index 000000000..43c5c0937 --- /dev/null +++ b/rest/ip/messaging/docs/CreateInviteRequest.md @@ -0,0 +1,12 @@ +# CreateInviteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **string** | | +**RoleSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateMemberRequest.md b/rest/ip/messaging/docs/CreateMemberRequest.md new file mode 100644 index 000000000..c1d3f99d8 --- /dev/null +++ b/rest/ip/messaging/docs/CreateMemberRequest.md @@ -0,0 +1,17 @@ +# CreateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateMessageRequest.md b/rest/ip/messaging/docs/CreateMessageRequest.md new file mode 100644 index 000000000..1698b9e86 --- /dev/null +++ b/rest/ip/messaging/docs/CreateMessageRequest.md @@ -0,0 +1,17 @@ +# CreateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**LastUpdatedBy** | **string** | | [optional] +**MediaSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateRoleRequest.md b/rest/ip/messaging/docs/CreateRoleRequest.md new file mode 100644 index 000000000..9a963e6b5 --- /dev/null +++ b/rest/ip/messaging/docs/CreateRoleRequest.md @@ -0,0 +1,13 @@ +# CreateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | +**Permission** | **[]string** | | +**Type** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateServiceRequest.md b/rest/ip/messaging/docs/CreateServiceRequest.md new file mode 100644 index 000000000..6f06ae25c --- /dev/null +++ b/rest/ip/messaging/docs/CreateServiceRequest.md @@ -0,0 +1,11 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/CreateUserRequest.md b/rest/ip/messaging/docs/CreateUserRequest.md new file mode 100644 index 000000000..dc8c612f2 --- /dev/null +++ b/rest/ip/messaging/docs/CreateUserRequest.md @@ -0,0 +1,14 @@ +# CreateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | +**RoleSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/DefaultApi.md b/rest/ip/messaging/docs/DefaultApi.md new file mode 100644 index 000000000..5c44eaffb --- /dev/null +++ b/rest/ip/messaging/docs/DefaultApi.md @@ -0,0 +1,2334 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateChannel**](DefaultApi.md#CreateChannel) | **Post** /v2/Services/{ServiceSid}/Channels | +[**CreateChannelWebhook**](DefaultApi.md#CreateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +[**CreateCredential**](DefaultApi.md#CreateCredential) | **Post** /v2/Credentials | +[**CreateInvite**](DefaultApi.md#CreateInvite) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**CreateMember**](DefaultApi.md#CreateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**CreateMessage**](DefaultApi.md#CreateMessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**CreateRole**](DefaultApi.md#CreateRole) | **Post** /v2/Services/{ServiceSid}/Roles | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v2/Services | +[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /v2/Services/{ServiceSid}/Users | +[**DeleteBinding**](DefaultApi.md#DeleteBinding) | **Delete** /v2/Services/{ServiceSid}/Bindings/{Sid} | +[**DeleteChannel**](DefaultApi.md#DeleteChannel) | **Delete** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**DeleteChannelWebhook**](DefaultApi.md#DeleteChannelWebhook) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**DeleteCredential**](DefaultApi.md#DeleteCredential) | **Delete** /v2/Credentials/{Sid} | +[**DeleteInvite**](DefaultApi.md#DeleteInvite) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**DeleteMember**](DefaultApi.md#DeleteMember) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**DeleteMessage**](DefaultApi.md#DeleteMessage) | **Delete** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v2/Services/{Sid} | +[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /v2/Services/{ServiceSid}/Users/{Sid} | +[**DeleteUserBinding**](DefaultApi.md#DeleteUserBinding) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +[**DeleteUserChannel**](DefaultApi.md#DeleteUserChannel) | **Delete** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +[**FetchBinding**](DefaultApi.md#FetchBinding) | **Get** /v2/Services/{ServiceSid}/Bindings/{Sid} | +[**FetchChannel**](DefaultApi.md#FetchChannel) | **Get** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**FetchChannelWebhook**](DefaultApi.md#FetchChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**FetchCredential**](DefaultApi.md#FetchCredential) | **Get** /v2/Credentials/{Sid} | +[**FetchInvite**](DefaultApi.md#FetchInvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid} | +[**FetchMember**](DefaultApi.md#FetchMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**FetchMessage**](DefaultApi.md#FetchMessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**FetchRole**](DefaultApi.md#FetchRole) | **Get** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v2/Services/{Sid} | +[**FetchUser**](DefaultApi.md#FetchUser) | **Get** /v2/Services/{ServiceSid}/Users/{Sid} | +[**FetchUserBinding**](DefaultApi.md#FetchUserBinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid} | +[**FetchUserChannel**](DefaultApi.md#FetchUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | +[**ListBinding**](DefaultApi.md#ListBinding) | **Get** /v2/Services/{ServiceSid}/Bindings | +[**ListChannel**](DefaultApi.md#ListChannel) | **Get** /v2/Services/{ServiceSid}/Channels | +[**ListChannelWebhook**](DefaultApi.md#ListChannelWebhook) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks | +[**ListCredential**](DefaultApi.md#ListCredential) | **Get** /v2/Credentials | +[**ListInvite**](DefaultApi.md#ListInvite) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites | +[**ListMember**](DefaultApi.md#ListMember) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members | +[**ListMessage**](DefaultApi.md#ListMessage) | **Get** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages | +[**ListRole**](DefaultApi.md#ListRole) | **Get** /v2/Services/{ServiceSid}/Roles | +[**ListService**](DefaultApi.md#ListService) | **Get** /v2/Services | +[**ListUser**](DefaultApi.md#ListUser) | **Get** /v2/Services/{ServiceSid}/Users | +[**ListUserBinding**](DefaultApi.md#ListUserBinding) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Bindings | +[**ListUserChannel**](DefaultApi.md#ListUserChannel) | **Get** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels | +[**UpdateChannel**](DefaultApi.md#UpdateChannel) | **Post** /v2/Services/{ServiceSid}/Channels/{Sid} | +[**UpdateChannelWebhook**](DefaultApi.md#UpdateChannelWebhook) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid} | +[**UpdateCredential**](DefaultApi.md#UpdateCredential) | **Post** /v2/Credentials/{Sid} | +[**UpdateMember**](DefaultApi.md#UpdateMember) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid} | +[**UpdateMessage**](DefaultApi.md#UpdateMessage) | **Post** /v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid} | +[**UpdateRole**](DefaultApi.md#UpdateRole) | **Post** /v2/Services/{ServiceSid}/Roles/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v2/Services/{Sid} | +[**UpdateUser**](DefaultApi.md#UpdateUser) | **Post** /v2/Services/{ServiceSid}/Users/{Sid} | +[**UpdateUserChannel**](DefaultApi.md#UpdateUserChannel) | **Post** /v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid} | + + + +## CreateChannel + +> IpMessagingV2ServiceChannel CreateChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **CreatedBy** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **FriendlyName** | **optional.String**| | + **Type** | **optional.String**| | + **UniqueName** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateChannelWebhook + +> IpMessagingV2ServiceChannelChannelWebhook CreateChannelWebhook(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***CreateChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| | + **ConfigurationFlowSid** | **optional.String**| | + **ConfigurationMethod** | **optional.String**| | + **ConfigurationRetryCount** | **optional.Int32**| | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| | + **ConfigurationUrl** | **optional.String**| | + **Type** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredential + +> IpMessagingV2Credential CreateCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ApiKey** | **optional.String**| | + **Certificate** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **PrivateKey** | **optional.String**| | + **Sandbox** | **optional.Bool**| | + **Secret** | **optional.String**| | + **Type** | **optional.String**| | + +### Return type + +[**IpMessagingV2Credential**](ip_messaging.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateInvite + +> IpMessagingV2ServiceChannelInvite CreateInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***CreateInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | **optional.String**| | + **RoleSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelInvite**](ip_messaging.v2.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMember + +> IpMessagingV2ServiceChannelMember CreateMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***CreateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **Identity** | **optional.String**| | + **LastConsumedMessageIndex** | **optional.Int32**| | + **LastConsumptionTimestamp** | **optional.Time**| | + **RoleSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessage + +> IpMessagingV2ServiceChannelMessage CreateMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***CreateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **Body** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **From** | **optional.String**| | + **LastUpdatedBy** | **optional.String**| | + **MediaSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRole + +> IpMessagingV2ServiceRole CreateRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| | + **Permission** | [**optional.Interface of []string**](string.md)| | + **Type** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> IpMessagingV2Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| | + +### Return type + +[**IpMessagingV2Service**](ip_messaging.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> IpMessagingV2ServiceUser CreateUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **Identity** | **optional.String**| | + **RoleSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBinding + +> DeleteBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannel + +> DeleteChannel(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***DeleteChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteChannelWebhook + +> DeleteChannelWebhook(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInvite + +> DeleteInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMember + +> DeleteMember(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + **optional** | ***DeleteMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessage + +> DeleteMessage(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + **optional** | ***DeleteMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUserBinding + +> DeleteUserBinding(ctx, ServiceSid, UserSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUserChannel + +> DeleteUserChannel(ctx, ServiceSid, UserSid, ChannelSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | +**ChannelSid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBinding + +> IpMessagingV2ServiceBinding FetchBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceBinding**](ip_messaging.v2.service.binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannel + +> IpMessagingV2ServiceChannel FetchChannel(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChannelWebhook + +> IpMessagingV2ServiceChannelChannelWebhook FetchChannelWebhook(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredential + +> IpMessagingV2Credential FetchCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2Credential**](ip_messaging.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInvite + +> IpMessagingV2ServiceChannelInvite FetchInvite(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceChannelInvite**](ip_messaging.v2.service.channel.invite.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMember + +> IpMessagingV2ServiceChannelMember FetchMember(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessage + +> IpMessagingV2ServiceChannelMessage FetchMessage(ctx, ServiceSid, ChannelSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRole + +> IpMessagingV2ServiceRole FetchRole(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> IpMessagingV2Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2Service**](ip_messaging.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUser + +> IpMessagingV2ServiceUser FetchUser(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUserBinding + +> IpMessagingV2ServiceUserUserBinding FetchUserBinding(ctx, ServiceSid, UserSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceUserUserBinding**](ip_messaging.v2.service.user.user_binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUserChannel + +> IpMessagingV2ServiceUserUserChannel FetchUserChannel(ctx, ServiceSid, UserSid, ChannelSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | +**ChannelSid** | **string**| | + +### Return type + +[**IpMessagingV2ServiceUserUserChannel**](ip_messaging.v2.service.user.user_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBinding + +> ListBindingResponse ListBinding(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **BindingType** | [**optional.Interface of []string**](string.md)| | + **Identity** | [**optional.Interface of []string**](string.md)| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBindingResponse**](ListBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannel + +> ListChannelResponse ListChannel(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Type** | [**optional.Interface of []string**](string.md)| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelResponse**](ListChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChannelWebhook + +> ListChannelWebhookResponse ListChannelWebhook(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***ListChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChannelWebhookResponse**](ListChannelWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredential + +> ListCredentialResponse ListCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInvite + +> ListInviteResponse ListInvite(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***ListInviteOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInviteOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInviteResponse**](ListInviteResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMember + +> ListMemberResponse ListMember(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***ListMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Identity** | [**optional.Interface of []string**](string.md)| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMemberResponse**](ListMemberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessage + +> ListMessageResponse ListMessage(ctx, ServiceSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***ListMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessageResponse**](ListMessageResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRole + +> ListRoleResponse ListRole(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoleResponse**](ListRoleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUser + +> ListUserResponse ListUser(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserResponse**](ListUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUserBinding + +> ListUserBindingResponse ListUserBinding(ctx, ServiceSid, UserSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | + **optional** | ***ListUserBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **BindingType** | [**optional.Interface of []string**](string.md)| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserBindingResponse**](ListUserBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUserChannel + +> ListUserChannelResponse ListUserChannel(ctx, ServiceSid, UserSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | + **optional** | ***ListUserChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUserChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUserChannelResponse**](ListUserChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChannel + +> IpMessagingV2ServiceChannel UpdateChannel(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **CreatedBy** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **FriendlyName** | **optional.String**| | + **UniqueName** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChannelWebhook + +> IpMessagingV2ServiceChannelChannelWebhook UpdateChannelWebhook(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateChannelWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChannelWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ConfigurationFilters** | [**optional.Interface of []string**](string.md)| | + **ConfigurationFlowSid** | **optional.String**| | + **ConfigurationMethod** | **optional.String**| | + **ConfigurationRetryCount** | **optional.Int32**| | + **ConfigurationTriggers** | [**optional.Interface of []string**](string.md)| | + **ConfigurationUrl** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredential + +> IpMessagingV2Credential UpdateCredential(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiKey** | **optional.String**| | + **Certificate** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **PrivateKey** | **optional.String**| | + **Sandbox** | **optional.Bool**| | + **Secret** | **optional.String**| | + +### Return type + +[**IpMessagingV2Credential**](ip_messaging.v2.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMember + +> IpMessagingV2ServiceChannelMember UpdateMember(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateMemberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMemberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **LastConsumedMessageIndex** | **optional.Int32**| | + **LastConsumptionTimestamp** | **optional.Time**| | + **RoleSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessage + +> IpMessagingV2ServiceChannelMessage UpdateMessage(ctx, ServiceSid, ChannelSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ChannelSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **Body** | **optional.String**| | + **DateCreated** | **optional.Time**| | + **DateUpdated** | **optional.Time**| | + **From** | **optional.String**| | + **LastUpdatedBy** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> IpMessagingV2ServiceRole UpdateRole(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateRoleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Permission** | [**optional.Interface of []string**](string.md)| | + +### Return type + +[**IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> IpMessagingV2Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ConsumptionReportInterval** | **optional.Int32**| | + **DefaultChannelCreatorRoleSid** | **optional.String**| | + **DefaultChannelRoleSid** | **optional.String**| | + **DefaultServiceRoleSid** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **LimitsChannelMembers** | **optional.Int32**| | + **LimitsUserChannels** | **optional.Int32**| | + **MediaCompatibilityMessage** | **optional.String**| | + **NotificationsAddedToChannelEnabled** | **optional.Bool**| | + **NotificationsAddedToChannelSound** | **optional.String**| | + **NotificationsAddedToChannelTemplate** | **optional.String**| | + **NotificationsInvitedToChannelEnabled** | **optional.Bool**| | + **NotificationsInvitedToChannelSound** | **optional.String**| | + **NotificationsInvitedToChannelTemplate** | **optional.String**| | + **NotificationsLogEnabled** | **optional.Bool**| | + **NotificationsNewMessageBadgeCountEnabled** | **optional.Bool**| | + **NotificationsNewMessageEnabled** | **optional.Bool**| | + **NotificationsNewMessageSound** | **optional.String**| | + **NotificationsNewMessageTemplate** | **optional.String**| | + **NotificationsRemovedFromChannelEnabled** | **optional.Bool**| | + **NotificationsRemovedFromChannelSound** | **optional.String**| | + **NotificationsRemovedFromChannelTemplate** | **optional.String**| | + **PostWebhookRetryCount** | **optional.Int32**| | + **PostWebhookUrl** | **optional.String**| | + **PreWebhookRetryCount** | **optional.Int32**| | + **PreWebhookUrl** | **optional.String**| | + **ReachabilityEnabled** | **optional.Bool**| | + **ReadStatusEnabled** | **optional.Bool**| | + **TypingIndicatorTimeout** | **optional.Int32**| | + **WebhookFilters** | [**optional.Interface of []string**](string.md)| | + **WebhookMethod** | **optional.String**| | + +### Return type + +[**IpMessagingV2Service**](ip_messaging.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> IpMessagingV2ServiceUser UpdateUser(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **XTwilioWebhookEnabled** | **optional.String**| The X-Twilio-Webhook-Enabled HTTP request header | + **Attributes** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **RoleSid** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUserChannel + +> IpMessagingV2ServiceUserUserChannel UpdateUserChannel(ctx, ServiceSid, UserSid, ChannelSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**UserSid** | **string**| | +**ChannelSid** | **string**| | + **optional** | ***UpdateUserChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateUserChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **LastConsumedMessageIndex** | **optional.Int32**| | + **LastConsumptionTimestamp** | **optional.Time**| | + **NotificationLevel** | **optional.String**| | + +### Return type + +[**IpMessagingV2ServiceUserUserChannel**](ip_messaging.v2.service.user.user_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/ip/messaging/docs/IpMessagingV1Credential.md b/rest/ip/messaging/docs/IpMessagingV1Credential.md new file mode 100644 index 000000000..64fa0968f --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1Credential.md @@ -0,0 +1,18 @@ +# IpMessagingV1Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1Service.md b/rest/ip/messaging/docs/IpMessagingV1Service.md new file mode 100644 index 000000000..422e45bb6 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1Service.md @@ -0,0 +1,31 @@ +# IpMessagingV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConsumptionReportInterval** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultChannelCreatorRoleSid** | **string** | | [optional] +**DefaultChannelRoleSid** | **string** | | [optional] +**DefaultServiceRoleSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Limits** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Notifications** | [**map[string]interface{}**](.md) | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**ReadStatusEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**TypingIndicatorTimeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WebhookFilters** | **[]string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**Webhooks** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceChannel.md b/rest/ip/messaging/docs/IpMessagingV1ServiceChannel.md new file mode 100644 index 000000000..8b9381b48 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceChannel.md @@ -0,0 +1,24 @@ +# IpMessagingV1ServiceChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MembersCount** | **int32** | | [optional] +**MessagesCount** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceChannelInvite.md b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelInvite.md new file mode 100644 index 000000000..c44cc8f02 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelInvite.md @@ -0,0 +1,20 @@ +# IpMessagingV1ServiceChannelInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMember.md b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMember.md new file mode 100644 index 000000000..b81e64eef --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMember.md @@ -0,0 +1,21 @@ +# IpMessagingV1ServiceChannelMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMessage.md b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMessage.md new file mode 100644 index 000000000..540682201 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceChannelMessage.md @@ -0,0 +1,23 @@ +# IpMessagingV1ServiceChannelMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**Index** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**To** | **string** | | [optional] +**Url** | **string** | | [optional] +**WasEdited** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceRole.md b/rest/ip/messaging/docs/IpMessagingV1ServiceRole.md new file mode 100644 index 000000000..7b82c111f --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceRole.md @@ -0,0 +1,19 @@ +# IpMessagingV1ServiceRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceUser.md b/rest/ip/messaging/docs/IpMessagingV1ServiceUser.md new file mode 100644 index 000000000..92de86113 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceUser.md @@ -0,0 +1,24 @@ +# IpMessagingV1ServiceUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**JoinedChannelsCount** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV1ServiceUserUserChannel.md b/rest/ip/messaging/docs/IpMessagingV1ServiceUserUserChannel.md new file mode 100644 index 000000000..e9bfb16c2 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV1ServiceUserUserChannel.md @@ -0,0 +1,18 @@ +# IpMessagingV1ServiceUserUserChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MemberSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UnreadMessagesCount** | Pointer to **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2Credential.md b/rest/ip/messaging/docs/IpMessagingV2Credential.md new file mode 100644 index 000000000..46853c3f7 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2Credential.md @@ -0,0 +1,18 @@ +# IpMessagingV2Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2Service.md b/rest/ip/messaging/docs/IpMessagingV2Service.md new file mode 100644 index 000000000..5100d807e --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2Service.md @@ -0,0 +1,33 @@ +# IpMessagingV2Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConsumptionReportInterval** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultChannelCreatorRoleSid** | **string** | | [optional] +**DefaultChannelRoleSid** | **string** | | [optional] +**DefaultServiceRoleSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Limits** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Media** | [**map[string]interface{}**](.md) | | [optional] +**Notifications** | [**map[string]interface{}**](.md) | | [optional] +**PostWebhookRetryCount** | **int32** | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookRetryCount** | **int32** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**ReadStatusEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**TypingIndicatorTimeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WebhookFilters** | **[]string** | | [optional] +**WebhookMethod** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceBinding.md b/rest/ip/messaging/docs/IpMessagingV2ServiceBinding.md new file mode 100644 index 000000000..1da324cc4 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceBinding.md @@ -0,0 +1,22 @@ +# IpMessagingV2ServiceBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MessageTypes** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceChannel.md b/rest/ip/messaging/docs/IpMessagingV2ServiceChannel.md new file mode 100644 index 000000000..b67eff3d8 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceChannel.md @@ -0,0 +1,24 @@ +# IpMessagingV2ServiceChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MembersCount** | **int32** | | [optional] +**MessagesCount** | **int32** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceChannelChannelWebhook.md b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelChannelWebhook.md new file mode 100644 index 000000000..553d43eb8 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelChannelWebhook.md @@ -0,0 +1,19 @@ +# IpMessagingV2ServiceChannelChannelWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceChannelInvite.md b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelInvite.md new file mode 100644 index 000000000..b10d8564c --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelInvite.md @@ -0,0 +1,20 @@ +# IpMessagingV2ServiceChannelInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMember.md b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMember.md new file mode 100644 index 000000000..6c5668362 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMember.md @@ -0,0 +1,22 @@ +# IpMessagingV2ServiceChannelMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMessage.md b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMessage.md new file mode 100644 index 000000000..24b7588f6 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceChannelMessage.md @@ -0,0 +1,26 @@ +# IpMessagingV2ServiceChannelMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**Index** | **int32** | | [optional] +**LastUpdatedBy** | **string** | | [optional] +**Media** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**To** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] +**WasEdited** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceRole.md b/rest/ip/messaging/docs/IpMessagingV2ServiceRole.md new file mode 100644 index 000000000..849b478de --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceRole.md @@ -0,0 +1,19 @@ +# IpMessagingV2ServiceRole + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Permissions** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceUser.md b/rest/ip/messaging/docs/IpMessagingV2ServiceUser.md new file mode 100644 index 000000000..027162525 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceUser.md @@ -0,0 +1,24 @@ +# IpMessagingV2ServiceUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**IsNotifiable** | **bool** | | [optional] +**IsOnline** | **bool** | | [optional] +**JoinedChannelsCount** | **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RoleSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserBinding.md b/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserBinding.md new file mode 100644 index 000000000..76edac502 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserBinding.md @@ -0,0 +1,22 @@ +# IpMessagingV2ServiceUserUserBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**MessageTypes** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**UserSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserChannel.md b/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserChannel.md new file mode 100644 index 000000000..bbe70de84 --- /dev/null +++ b/rest/ip/messaging/docs/IpMessagingV2ServiceUserUserChannel.md @@ -0,0 +1,21 @@ +# IpMessagingV2ServiceUserUserChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelSid** | **string** | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MemberSid** | **string** | | [optional] +**NotificationLevel** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UnreadMessagesCount** | Pointer to **int32** | | [optional] +**Url** | **string** | | [optional] +**UserSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListBindingResponse.md b/rest/ip/messaging/docs/ListBindingResponse.md new file mode 100644 index 000000000..f93b640dd --- /dev/null +++ b/rest/ip/messaging/docs/ListBindingResponse.md @@ -0,0 +1,12 @@ +# ListBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]IpMessagingV2ServiceBinding**](ip_messaging.v2.service.binding.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListChannelResponse.md b/rest/ip/messaging/docs/ListChannelResponse.md new file mode 100644 index 000000000..7b5253ed0 --- /dev/null +++ b/rest/ip/messaging/docs/ListChannelResponse.md @@ -0,0 +1,12 @@ +# ListChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV2ServiceChannel**](ip_messaging.v2.service.channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListChannelWebhookResponse.md b/rest/ip/messaging/docs/ListChannelWebhookResponse.md new file mode 100644 index 000000000..470125d76 --- /dev/null +++ b/rest/ip/messaging/docs/ListChannelWebhookResponse.md @@ -0,0 +1,12 @@ +# ListChannelWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Webhooks** | [**[]IpMessagingV2ServiceChannelChannelWebhook**](ip_messaging.v2.service.channel.channel_webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListCredentialResponse.md b/rest/ip/messaging/docs/ListCredentialResponse.md new file mode 100644 index 000000000..37a6bd43a --- /dev/null +++ b/rest/ip/messaging/docs/ListCredentialResponse.md @@ -0,0 +1,12 @@ +# ListCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]IpMessagingV2Credential**](ip_messaging.v2.credential.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListCredentialResponseMeta.md b/rest/ip/messaging/docs/ListCredentialResponseMeta.md new file mode 100644 index 000000000..20d8e9381 --- /dev/null +++ b/rest/ip/messaging/docs/ListCredentialResponseMeta.md @@ -0,0 +1,17 @@ +# ListCredentialResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListInviteResponse.md b/rest/ip/messaging/docs/ListInviteResponse.md new file mode 100644 index 000000000..c56d93a1f --- /dev/null +++ b/rest/ip/messaging/docs/ListInviteResponse.md @@ -0,0 +1,12 @@ +# ListInviteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**[]IpMessagingV2ServiceChannelInvite**](ip_messaging.v2.service.channel.invite.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListMemberResponse.md b/rest/ip/messaging/docs/ListMemberResponse.md new file mode 100644 index 000000000..c7a90f4fa --- /dev/null +++ b/rest/ip/messaging/docs/ListMemberResponse.md @@ -0,0 +1,12 @@ +# ListMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]IpMessagingV2ServiceChannelMember**](ip_messaging.v2.service.channel.member.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListMessageResponse.md b/rest/ip/messaging/docs/ListMessageResponse.md new file mode 100644 index 000000000..f82ba0053 --- /dev/null +++ b/rest/ip/messaging/docs/ListMessageResponse.md @@ -0,0 +1,12 @@ +# ListMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]IpMessagingV2ServiceChannelMessage**](ip_messaging.v2.service.channel.message.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListRoleResponse.md b/rest/ip/messaging/docs/ListRoleResponse.md new file mode 100644 index 000000000..a7f0abdbc --- /dev/null +++ b/rest/ip/messaging/docs/ListRoleResponse.md @@ -0,0 +1,12 @@ +# ListRoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Roles** | [**[]IpMessagingV2ServiceRole**](ip_messaging.v2.service.role.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListServiceResponse.md b/rest/ip/messaging/docs/ListServiceResponse.md new file mode 100644 index 000000000..d90faab1d --- /dev/null +++ b/rest/ip/messaging/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Services** | [**[]IpMessagingV2Service**](ip_messaging.v2.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListUserBindingResponse.md b/rest/ip/messaging/docs/ListUserBindingResponse.md new file mode 100644 index 000000000..1e5d3eb7e --- /dev/null +++ b/rest/ip/messaging/docs/ListUserBindingResponse.md @@ -0,0 +1,12 @@ +# ListUserBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]IpMessagingV2ServiceUserUserBinding**](ip_messaging.v2.service.user.user_binding.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListUserChannelResponse.md b/rest/ip/messaging/docs/ListUserChannelResponse.md new file mode 100644 index 000000000..7fd9bd11f --- /dev/null +++ b/rest/ip/messaging/docs/ListUserChannelResponse.md @@ -0,0 +1,12 @@ +# ListUserChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]IpMessagingV2ServiceUserUserChannel**](ip_messaging.v2.service.user.user_channel.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/ListUserResponse.md b/rest/ip/messaging/docs/ListUserResponse.md new file mode 100644 index 000000000..2ddf741fb --- /dev/null +++ b/rest/ip/messaging/docs/ListUserResponse.md @@ -0,0 +1,12 @@ +# ListUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Users** | [**[]IpMessagingV2ServiceUser**](ip_messaging.v2.service.user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateChannelRequest.md b/rest/ip/messaging/docs/UpdateChannelRequest.md new file mode 100644 index 000000000..6e8ccb17e --- /dev/null +++ b/rest/ip/messaging/docs/UpdateChannelRequest.md @@ -0,0 +1,16 @@ +# UpdateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateChannelWebhookRequest.md b/rest/ip/messaging/docs/UpdateChannelWebhookRequest.md new file mode 100644 index 000000000..b6cb09e7f --- /dev/null +++ b/rest/ip/messaging/docs/UpdateChannelWebhookRequest.md @@ -0,0 +1,16 @@ +# UpdateChannelWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationFilters** | **[]string** | | [optional] +**ConfigurationFlowSid** | **string** | | [optional] +**ConfigurationMethod** | **string** | | [optional] +**ConfigurationRetryCount** | **int32** | | [optional] +**ConfigurationTriggers** | **[]string** | | [optional] +**ConfigurationUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateCredentialRequest.md b/rest/ip/messaging/docs/UpdateCredentialRequest.md new file mode 100644 index 000000000..14dec91c1 --- /dev/null +++ b/rest/ip/messaging/docs/UpdateCredentialRequest.md @@ -0,0 +1,16 @@ +# UpdateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | | [optional] +**Certificate** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**PrivateKey** | **string** | | [optional] +**Sandbox** | **bool** | | [optional] +**Secret** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateMemberRequest.md b/rest/ip/messaging/docs/UpdateMemberRequest.md new file mode 100644 index 000000000..ee68c8f3d --- /dev/null +++ b/rest/ip/messaging/docs/UpdateMemberRequest.md @@ -0,0 +1,16 @@ +# UpdateMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**RoleSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateMessageRequest.md b/rest/ip/messaging/docs/UpdateMessageRequest.md new file mode 100644 index 000000000..3aefcf033 --- /dev/null +++ b/rest/ip/messaging/docs/UpdateMessageRequest.md @@ -0,0 +1,16 @@ +# UpdateMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**Body** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**From** | **string** | | [optional] +**LastUpdatedBy** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateRoleRequest.md b/rest/ip/messaging/docs/UpdateRoleRequest.md new file mode 100644 index 000000000..bbf35fd49 --- /dev/null +++ b/rest/ip/messaging/docs/UpdateRoleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Permission** | **[]string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateServiceRequest.md b/rest/ip/messaging/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..ed591ce0e --- /dev/null +++ b/rest/ip/messaging/docs/UpdateServiceRequest.md @@ -0,0 +1,41 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConsumptionReportInterval** | **int32** | | [optional] +**DefaultChannelCreatorRoleSid** | **string** | | [optional] +**DefaultChannelRoleSid** | **string** | | [optional] +**DefaultServiceRoleSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**LimitsChannelMembers** | **int32** | | [optional] +**LimitsUserChannels** | **int32** | | [optional] +**MediaCompatibilityMessage** | **string** | | [optional] +**NotificationsAddedToChannelEnabled** | **bool** | | [optional] +**NotificationsAddedToChannelSound** | **string** | | [optional] +**NotificationsAddedToChannelTemplate** | **string** | | [optional] +**NotificationsInvitedToChannelEnabled** | **bool** | | [optional] +**NotificationsInvitedToChannelSound** | **string** | | [optional] +**NotificationsInvitedToChannelTemplate** | **string** | | [optional] +**NotificationsLogEnabled** | **bool** | | [optional] +**NotificationsNewMessageBadgeCountEnabled** | **bool** | | [optional] +**NotificationsNewMessageEnabled** | **bool** | | [optional] +**NotificationsNewMessageSound** | **string** | | [optional] +**NotificationsNewMessageTemplate** | **string** | | [optional] +**NotificationsRemovedFromChannelEnabled** | **bool** | | [optional] +**NotificationsRemovedFromChannelSound** | **string** | | [optional] +**NotificationsRemovedFromChannelTemplate** | **string** | | [optional] +**PostWebhookRetryCount** | **int32** | | [optional] +**PostWebhookUrl** | **string** | | [optional] +**PreWebhookRetryCount** | **int32** | | [optional] +**PreWebhookUrl** | **string** | | [optional] +**ReachabilityEnabled** | **bool** | | [optional] +**ReadStatusEnabled** | **bool** | | [optional] +**TypingIndicatorTimeout** | **int32** | | [optional] +**WebhookFilters** | **[]string** | | [optional] +**WebhookMethod** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateUserChannelRequest.md b/rest/ip/messaging/docs/UpdateUserChannelRequest.md new file mode 100644 index 000000000..013458183 --- /dev/null +++ b/rest/ip/messaging/docs/UpdateUserChannelRequest.md @@ -0,0 +1,13 @@ +# UpdateUserChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LastConsumedMessageIndex** | Pointer to **int32** | | [optional] +**LastConsumptionTimestamp** | [**time.Time**](time.Time.md) | | [optional] +**NotificationLevel** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/docs/UpdateUserRequest.md b/rest/ip/messaging/docs/UpdateUserRequest.md new file mode 100644 index 000000000..b90ce4764 --- /dev/null +++ b/rest/ip/messaging/docs/UpdateUserRequest.md @@ -0,0 +1,13 @@ +# UpdateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**RoleSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/ip/messaging/model_create_channel_request.go b/rest/ip/messaging/model_create_channel_request.go new file mode 100644 index 000000000..2f43b421e --- /dev/null +++ b/rest/ip/messaging/model_create_channel_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateChannelRequest struct for CreateChannelRequest +type CreateChannelRequest struct { + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/ip/messaging/model_create_channel_webhook_request.go b/rest/ip/messaging/model_create_channel_webhook_request.go new file mode 100644 index 000000000..1c7e72d65 --- /dev/null +++ b/rest/ip/messaging/model_create_channel_webhook_request.go @@ -0,0 +1,21 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateChannelWebhookRequest struct for CreateChannelWebhookRequest +type CreateChannelWebhookRequest struct { + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + ConfigurationRetryCount int32 `json:"ConfigurationRetryCount,omitempty"` + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` + Type string `json:"Type"` +} diff --git a/rest/ip/messaging/model_create_credential_request.go b/rest/ip/messaging/model_create_credential_request.go new file mode 100644 index 000000000..509da8350 --- /dev/null +++ b/rest/ip/messaging/model_create_credential_request.go @@ -0,0 +1,21 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialRequest struct for CreateCredentialRequest +type CreateCredentialRequest struct { + ApiKey string `json:"ApiKey,omitempty"` + Certificate string `json:"Certificate,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + PrivateKey string `json:"PrivateKey,omitempty"` + Sandbox bool `json:"Sandbox,omitempty"` + Secret string `json:"Secret,omitempty"` + Type string `json:"Type"` +} diff --git a/rest/ip/messaging/model_create_invite_request.go b/rest/ip/messaging/model_create_invite_request.go new file mode 100644 index 000000000..3ee869fce --- /dev/null +++ b/rest/ip/messaging/model_create_invite_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateInviteRequest struct for CreateInviteRequest +type CreateInviteRequest struct { + Identity string `json:"Identity"` + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/ip/messaging/model_create_member_request.go b/rest/ip/messaging/model_create_member_request.go new file mode 100644 index 000000000..7374eab1b --- /dev/null +++ b/rest/ip/messaging/model_create_member_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateMemberRequest struct for CreateMemberRequest +type CreateMemberRequest struct { + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/ip/messaging/model_create_message_request.go b/rest/ip/messaging/model_create_message_request.go new file mode 100644 index 000000000..d2a2fbf51 --- /dev/null +++ b/rest/ip/messaging/model_create_message_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateMessageRequest struct for CreateMessageRequest +type CreateMessageRequest struct { + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` + MediaSid string `json:"MediaSid,omitempty"` +} diff --git a/rest/ip/messaging/model_create_role_request.go b/rest/ip/messaging/model_create_role_request.go new file mode 100644 index 000000000..b1b293ea8 --- /dev/null +++ b/rest/ip/messaging/model_create_role_request.go @@ -0,0 +1,17 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRoleRequest struct for CreateRoleRequest +type CreateRoleRequest struct { + FriendlyName string `json:"FriendlyName"` + Permission []string `json:"Permission"` + Type string `json:"Type"` +} diff --git a/rest/ip/messaging/model_create_service_request.go b/rest/ip/messaging/model_create_service_request.go new file mode 100644 index 000000000..e1d10b934 --- /dev/null +++ b/rest/ip/messaging/model_create_service_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/ip/messaging/model_create_user_request.go b/rest/ip/messaging/model_create_user_request.go new file mode 100644 index 000000000..588f473fd --- /dev/null +++ b/rest/ip/messaging/model_create_user_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateUserRequest struct for CreateUserRequest +type CreateUserRequest struct { + Attributes string `json:"Attributes,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity"` + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_credential.go b/rest/ip/messaging/model_ip_messaging_v1_credential.go new file mode 100644 index 000000000..f3ccd12dc --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1Credential struct for IpMessagingV1Credential +type IpMessagingV1Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service.go b/rest/ip/messaging/model_ip_messaging_v1_service.go new file mode 100644 index 000000000..ec4484a68 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service.go @@ -0,0 +1,38 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1Service struct for IpMessagingV1Service +type IpMessagingV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Limits map[string]interface{} `json:"Limits,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Notifications map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + Url string `json:"Url,omitempty"` + WebhookFilters []string `json:"WebhookFilters,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + Webhooks map[string]interface{} `json:"Webhooks,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_channel.go b/rest/ip/messaging/model_ip_messaging_v1_service_channel.go new file mode 100644 index 000000000..539bb7f93 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_channel.go @@ -0,0 +1,31 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceChannel struct for IpMessagingV1ServiceChannel +type IpMessagingV1ServiceChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MembersCount int32 `json:"MembersCount,omitempty"` + MessagesCount int32 `json:"MessagesCount,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_channel_invite.go b/rest/ip/messaging/model_ip_messaging_v1_service_channel_invite.go new file mode 100644 index 000000000..5083b403c --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_channel_invite.go @@ -0,0 +1,27 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceChannelInvite struct for IpMessagingV1ServiceChannelInvite +type IpMessagingV1ServiceChannelInvite struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_channel_member.go b/rest/ip/messaging/model_ip_messaging_v1_service_channel_member.go new file mode 100644 index 000000000..5bb9d9a3e --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_channel_member.go @@ -0,0 +1,28 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceChannelMember struct for IpMessagingV1ServiceChannelMember +type IpMessagingV1ServiceChannelMember struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_channel_message.go b/rest/ip/messaging/model_ip_messaging_v1_service_channel_message.go new file mode 100644 index 000000000..19891a8b9 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_channel_message.go @@ -0,0 +1,30 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceChannelMessage struct for IpMessagingV1ServiceChannelMessage +type IpMessagingV1ServiceChannelMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + Index int32 `json:"Index,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + To string `json:"To,omitempty"` + Url string `json:"Url,omitempty"` + WasEdited bool `json:"WasEdited,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_role.go b/rest/ip/messaging/model_ip_messaging_v1_service_role.go new file mode 100644 index 000000000..fe4f2e8d4 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceRole struct for IpMessagingV1ServiceRole +type IpMessagingV1ServiceRole struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_user.go b/rest/ip/messaging/model_ip_messaging_v1_service_user.go new file mode 100644 index 000000000..256267a38 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_user.go @@ -0,0 +1,31 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV1ServiceUser struct for IpMessagingV1ServiceUser +type IpMessagingV1ServiceUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + JoinedChannelsCount int32 `json:"JoinedChannelsCount,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v1_service_user_user_channel.go b/rest/ip/messaging/model_ip_messaging_v1_service_user_user_channel.go new file mode 100644 index 000000000..c4a87346c --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v1_service_user_user_channel.go @@ -0,0 +1,22 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// IpMessagingV1ServiceUserUserChannel struct for IpMessagingV1ServiceUserUserChannel +type IpMessagingV1ServiceUserUserChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MemberSid string `json:"MemberSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Status string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_credential.go b/rest/ip/messaging/model_ip_messaging_v2_credential.go new file mode 100644 index 000000000..39c8a10f5 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2Credential struct for IpMessagingV2Credential +type IpMessagingV2Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service.go b/rest/ip/messaging/model_ip_messaging_v2_service.go new file mode 100644 index 000000000..6ee4c899d --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service.go @@ -0,0 +1,40 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2Service struct for IpMessagingV2Service +type IpMessagingV2Service struct { + AccountSid string `json:"AccountSid,omitempty"` + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Limits map[string]interface{} `json:"Limits,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Media map[string]interface{} `json:"Media,omitempty"` + Notifications map[string]interface{} `json:"Notifications,omitempty"` + PostWebhookRetryCount int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + Url string `json:"Url,omitempty"` + WebhookFilters []string `json:"WebhookFilters,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_binding.go b/rest/ip/messaging/model_ip_messaging_v2_service_binding.go new file mode 100644 index 000000000..7989bba69 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_binding.go @@ -0,0 +1,29 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceBinding struct for IpMessagingV2ServiceBinding +type IpMessagingV2ServiceBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + BindingType string `json:"BindingType,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MessageTypes []string `json:"MessageTypes,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_channel.go b/rest/ip/messaging/model_ip_messaging_v2_service_channel.go new file mode 100644 index 000000000..f00b4adf5 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_channel.go @@ -0,0 +1,31 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceChannel struct for IpMessagingV2ServiceChannel +type IpMessagingV2ServiceChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MembersCount int32 `json:"MembersCount,omitempty"` + MessagesCount int32 `json:"MessagesCount,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_channel_channel_webhook.go b/rest/ip/messaging/model_ip_messaging_v2_service_channel_channel_webhook.go new file mode 100644 index 000000000..0405260fe --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_channel_channel_webhook.go @@ -0,0 +1,26 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceChannelChannelWebhook struct for IpMessagingV2ServiceChannelChannelWebhook +type IpMessagingV2ServiceChannelChannelWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_channel_invite.go b/rest/ip/messaging/model_ip_messaging_v2_service_channel_invite.go new file mode 100644 index 000000000..b052a4068 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_channel_invite.go @@ -0,0 +1,27 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceChannelInvite struct for IpMessagingV2ServiceChannelInvite +type IpMessagingV2ServiceChannelInvite struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_channel_member.go b/rest/ip/messaging/model_ip_messaging_v2_service_channel_member.go new file mode 100644 index 000000000..b445c1e65 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_channel_member.go @@ -0,0 +1,29 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceChannelMember struct for IpMessagingV2ServiceChannelMember +type IpMessagingV2ServiceChannelMember struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_channel_message.go b/rest/ip/messaging/model_ip_messaging_v2_service_channel_message.go new file mode 100644 index 000000000..fd110ab7c --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_channel_message.go @@ -0,0 +1,33 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceChannelMessage struct for IpMessagingV2ServiceChannelMessage +type IpMessagingV2ServiceChannelMessage struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + Index int32 `json:"Index,omitempty"` + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` + Media map[string]interface{} `json:"Media,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + To string `json:"To,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` + WasEdited bool `json:"WasEdited,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_role.go b/rest/ip/messaging/model_ip_messaging_v2_service_role.go new file mode 100644 index 000000000..ce6819fd8 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_role.go @@ -0,0 +1,26 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceRole struct for IpMessagingV2ServiceRole +type IpMessagingV2ServiceRole struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Permissions []string `json:"Permissions,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_user.go b/rest/ip/messaging/model_ip_messaging_v2_service_user.go new file mode 100644 index 000000000..695210eaa --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_user.go @@ -0,0 +1,31 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceUser struct for IpMessagingV2ServiceUser +type IpMessagingV2ServiceUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + IsNotifiable bool `json:"IsNotifiable,omitempty"` + IsOnline bool `json:"IsOnline,omitempty"` + JoinedChannelsCount int32 `json:"JoinedChannelsCount,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_user_user_binding.go b/rest/ip/messaging/model_ip_messaging_v2_service_user_user_binding.go new file mode 100644 index 000000000..e6e7e8897 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_user_user_binding.go @@ -0,0 +1,29 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// IpMessagingV2ServiceUserUserBinding struct for IpMessagingV2ServiceUserUserBinding +type IpMessagingV2ServiceUserUserBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + BindingType string `json:"BindingType,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + MessageTypes []string `json:"MessageTypes,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + UserSid string `json:"UserSid,omitempty"` +} diff --git a/rest/ip/messaging/model_ip_messaging_v2_service_user_user_channel.go b/rest/ip/messaging/model_ip_messaging_v2_service_user_user_channel.go new file mode 100644 index 000000000..0851a0313 --- /dev/null +++ b/rest/ip/messaging/model_ip_messaging_v2_service_user_user_channel.go @@ -0,0 +1,25 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// IpMessagingV2ServiceUserUserChannel struct for IpMessagingV2ServiceUserUserChannel +type IpMessagingV2ServiceUserUserChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelSid string `json:"ChannelSid,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MemberSid string `json:"MemberSid,omitempty"` + NotificationLevel string `json:"NotificationLevel,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Status string `json:"Status,omitempty"` + UnreadMessagesCount *int32 `json:"UnreadMessagesCount,omitempty"` + Url string `json:"Url,omitempty"` + UserSid string `json:"UserSid,omitempty"` +} diff --git a/rest/ip/messaging/model_list_binding_response.go b/rest/ip/messaging/model_list_binding_response.go new file mode 100644 index 000000000..c972a01ef --- /dev/null +++ b/rest/ip/messaging/model_list_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBindingResponse struct for ListBindingResponse +type ListBindingResponse struct { + Bindings []IpMessagingV2ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_channel_response.go b/rest/ip/messaging/model_list_channel_response.go new file mode 100644 index 000000000..98f7724fb --- /dev/null +++ b/rest/ip/messaging/model_list_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelResponse struct for ListChannelResponse +type ListChannelResponse struct { + Channels []IpMessagingV2ServiceChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_channel_webhook_response.go b/rest/ip/messaging/model_list_channel_webhook_response.go new file mode 100644 index 000000000..eaadc2c23 --- /dev/null +++ b/rest/ip/messaging/model_list_channel_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChannelWebhookResponse struct for ListChannelWebhookResponse +type ListChannelWebhookResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Webhooks []IpMessagingV2ServiceChannelChannelWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/ip/messaging/model_list_credential_response.go b/rest/ip/messaging/model_list_credential_response.go new file mode 100644 index 000000000..b7662a671 --- /dev/null +++ b/rest/ip/messaging/model_list_credential_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponse struct for ListCredentialResponse +type ListCredentialResponse struct { + Credentials []IpMessagingV2Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_credential_response_meta.go b/rest/ip/messaging/model_list_credential_response_meta.go new file mode 100644 index 000000000..df95cac99 --- /dev/null +++ b/rest/ip/messaging/model_list_credential_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponseMeta struct for ListCredentialResponseMeta +type ListCredentialResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/ip/messaging/model_list_invite_response.go b/rest/ip/messaging/model_list_invite_response.go new file mode 100644 index 000000000..364cc21b7 --- /dev/null +++ b/rest/ip/messaging/model_list_invite_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInviteResponse struct for ListInviteResponse +type ListInviteResponse struct { + Invites []IpMessagingV2ServiceChannelInvite `json:"Invites,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_member_response.go b/rest/ip/messaging/model_list_member_response.go new file mode 100644 index 000000000..258215cba --- /dev/null +++ b/rest/ip/messaging/model_list_member_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMemberResponse struct for ListMemberResponse +type ListMemberResponse struct { + Members []IpMessagingV2ServiceChannelMember `json:"Members,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_message_response.go b/rest/ip/messaging/model_list_message_response.go new file mode 100644 index 000000000..f54cad29d --- /dev/null +++ b/rest/ip/messaging/model_list_message_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessageResponse struct for ListMessageResponse +type ListMessageResponse struct { + Messages []IpMessagingV2ServiceChannelMessage `json:"Messages,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_role_response.go b/rest/ip/messaging/model_list_role_response.go new file mode 100644 index 000000000..e11daa710 --- /dev/null +++ b/rest/ip/messaging/model_list_role_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoleResponse struct for ListRoleResponse +type ListRoleResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Roles []IpMessagingV2ServiceRole `json:"Roles,omitempty"` +} diff --git a/rest/ip/messaging/model_list_service_response.go b/rest/ip/messaging/model_list_service_response.go new file mode 100644 index 000000000..d7bd552fa --- /dev/null +++ b/rest/ip/messaging/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []IpMessagingV2Service `json:"Services,omitempty"` +} diff --git a/rest/ip/messaging/model_list_user_binding_response.go b/rest/ip/messaging/model_list_user_binding_response.go new file mode 100644 index 000000000..477180571 --- /dev/null +++ b/rest/ip/messaging/model_list_user_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserBindingResponse struct for ListUserBindingResponse +type ListUserBindingResponse struct { + Bindings []IpMessagingV2ServiceUserUserBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_user_channel_response.go b/rest/ip/messaging/model_list_user_channel_response.go new file mode 100644 index 000000000..8e2effa4b --- /dev/null +++ b/rest/ip/messaging/model_list_user_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserChannelResponse struct for ListUserChannelResponse +type ListUserChannelResponse struct { + Channels []IpMessagingV2ServiceUserUserChannel `json:"Channels,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/ip/messaging/model_list_user_response.go b/rest/ip/messaging/model_list_user_response.go new file mode 100644 index 000000000..e51d602c5 --- /dev/null +++ b/rest/ip/messaging/model_list_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUserResponse struct for ListUserResponse +type ListUserResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Users []IpMessagingV2ServiceUser `json:"Users,omitempty"` +} diff --git a/rest/ip/messaging/model_update_channel_request.go b/rest/ip/messaging/model_update_channel_request.go new file mode 100644 index 000000000..62a64489a --- /dev/null +++ b/rest/ip/messaging/model_update_channel_request.go @@ -0,0 +1,23 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateChannelRequest struct for UpdateChannelRequest +type UpdateChannelRequest struct { + Attributes string `json:"Attributes,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/ip/messaging/model_update_channel_webhook_request.go b/rest/ip/messaging/model_update_channel_webhook_request.go new file mode 100644 index 000000000..fea28dc18 --- /dev/null +++ b/rest/ip/messaging/model_update_channel_webhook_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateChannelWebhookRequest struct for UpdateChannelWebhookRequest +type UpdateChannelWebhookRequest struct { + ConfigurationFilters []string `json:"ConfigurationFilters,omitempty"` + ConfigurationFlowSid string `json:"ConfigurationFlowSid,omitempty"` + ConfigurationMethod string `json:"ConfigurationMethod,omitempty"` + ConfigurationRetryCount int32 `json:"ConfigurationRetryCount,omitempty"` + ConfigurationTriggers []string `json:"ConfigurationTriggers,omitempty"` + ConfigurationUrl string `json:"ConfigurationUrl,omitempty"` +} diff --git a/rest/ip/messaging/model_update_credential_request.go b/rest/ip/messaging/model_update_credential_request.go new file mode 100644 index 000000000..a119d337c --- /dev/null +++ b/rest/ip/messaging/model_update_credential_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialRequest struct for UpdateCredentialRequest +type UpdateCredentialRequest struct { + ApiKey string `json:"ApiKey,omitempty"` + Certificate string `json:"Certificate,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + PrivateKey string `json:"PrivateKey,omitempty"` + Sandbox bool `json:"Sandbox,omitempty"` + Secret string `json:"Secret,omitempty"` +} diff --git a/rest/ip/messaging/model_update_member_request.go b/rest/ip/messaging/model_update_member_request.go new file mode 100644 index 000000000..aa709a004 --- /dev/null +++ b/rest/ip/messaging/model_update_member_request.go @@ -0,0 +1,23 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateMemberRequest struct for UpdateMemberRequest +type UpdateMemberRequest struct { + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/ip/messaging/model_update_message_request.go b/rest/ip/messaging/model_update_message_request.go new file mode 100644 index 000000000..342bd9d14 --- /dev/null +++ b/rest/ip/messaging/model_update_message_request.go @@ -0,0 +1,23 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateMessageRequest struct for UpdateMessageRequest +type UpdateMessageRequest struct { + Attributes string `json:"Attributes,omitempty"` + Body string `json:"Body,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + From string `json:"From,omitempty"` + LastUpdatedBy string `json:"LastUpdatedBy,omitempty"` +} diff --git a/rest/ip/messaging/model_update_role_request.go b/rest/ip/messaging/model_update_role_request.go new file mode 100644 index 000000000..af94d16da --- /dev/null +++ b/rest/ip/messaging/model_update_role_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoleRequest struct for UpdateRoleRequest +type UpdateRoleRequest struct { + Permission []string `json:"Permission"` +} diff --git a/rest/ip/messaging/model_update_service_request.go b/rest/ip/messaging/model_update_service_request.go new file mode 100644 index 000000000..13765b90a --- /dev/null +++ b/rest/ip/messaging/model_update_service_request.go @@ -0,0 +1,45 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + ConsumptionReportInterval int32 `json:"ConsumptionReportInterval,omitempty"` + DefaultChannelCreatorRoleSid string `json:"DefaultChannelCreatorRoleSid,omitempty"` + DefaultChannelRoleSid string `json:"DefaultChannelRoleSid,omitempty"` + DefaultServiceRoleSid string `json:"DefaultServiceRoleSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + LimitsChannelMembers int32 `json:"LimitsChannelMembers,omitempty"` + LimitsUserChannels int32 `json:"LimitsUserChannels,omitempty"` + MediaCompatibilityMessage string `json:"MediaCompatibilityMessage,omitempty"` + NotificationsAddedToChannelEnabled bool `json:"NotificationsAddedToChannelEnabled,omitempty"` + NotificationsAddedToChannelSound string `json:"NotificationsAddedToChannelSound,omitempty"` + NotificationsAddedToChannelTemplate string `json:"NotificationsAddedToChannelTemplate,omitempty"` + NotificationsInvitedToChannelEnabled bool `json:"NotificationsInvitedToChannelEnabled,omitempty"` + NotificationsInvitedToChannelSound string `json:"NotificationsInvitedToChannelSound,omitempty"` + NotificationsInvitedToChannelTemplate string `json:"NotificationsInvitedToChannelTemplate,omitempty"` + NotificationsLogEnabled bool `json:"NotificationsLogEnabled,omitempty"` + NotificationsNewMessageBadgeCountEnabled bool `json:"NotificationsNewMessageBadgeCountEnabled,omitempty"` + NotificationsNewMessageEnabled bool `json:"NotificationsNewMessageEnabled,omitempty"` + NotificationsNewMessageSound string `json:"NotificationsNewMessageSound,omitempty"` + NotificationsNewMessageTemplate string `json:"NotificationsNewMessageTemplate,omitempty"` + NotificationsRemovedFromChannelEnabled bool `json:"NotificationsRemovedFromChannelEnabled,omitempty"` + NotificationsRemovedFromChannelSound string `json:"NotificationsRemovedFromChannelSound,omitempty"` + NotificationsRemovedFromChannelTemplate string `json:"NotificationsRemovedFromChannelTemplate,omitempty"` + PostWebhookRetryCount int32 `json:"PostWebhookRetryCount,omitempty"` + PostWebhookUrl string `json:"PostWebhookUrl,omitempty"` + PreWebhookRetryCount int32 `json:"PreWebhookRetryCount,omitempty"` + PreWebhookUrl string `json:"PreWebhookUrl,omitempty"` + ReachabilityEnabled bool `json:"ReachabilityEnabled,omitempty"` + ReadStatusEnabled bool `json:"ReadStatusEnabled,omitempty"` + TypingIndicatorTimeout int32 `json:"TypingIndicatorTimeout,omitempty"` + WebhookFilters []string `json:"WebhookFilters,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` +} diff --git a/rest/ip/messaging/model_update_user_channel_request.go b/rest/ip/messaging/model_update_user_channel_request.go new file mode 100644 index 000000000..55bb4f818 --- /dev/null +++ b/rest/ip/messaging/model_update_user_channel_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateUserChannelRequest struct for UpdateUserChannelRequest +type UpdateUserChannelRequest struct { + LastConsumedMessageIndex *int32 `json:"LastConsumedMessageIndex,omitempty"` + LastConsumptionTimestamp time.Time `json:"LastConsumptionTimestamp,omitempty"` + NotificationLevel string `json:"NotificationLevel,omitempty"` +} diff --git a/rest/ip/messaging/model_update_user_request.go b/rest/ip/messaging/model_update_user_request.go new file mode 100644 index 000000000..10a12cbf9 --- /dev/null +++ b/rest/ip/messaging/model_update_user_request.go @@ -0,0 +1,17 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateUserRequest struct for UpdateUserRequest +type UpdateUserRequest struct { + Attributes string `json:"Attributes,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + RoleSid string `json:"RoleSid,omitempty"` +} diff --git a/rest/ip/messaging/response.go b/rest/ip/messaging/response.go new file mode 100644 index 000000000..2f6d6abfb --- /dev/null +++ b/rest/ip/messaging/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Ip_messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/lookups/v1/.openapi-generator-ignore b/rest/lookups/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/lookups/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/lookups/v1/README.md b/rest/lookups/v1/README.md new file mode 100644 index 000000000..a8721c8d6 --- /dev/null +++ b/rest/lookups/v1/README.md @@ -0,0 +1,64 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**FetchPhoneNumber**](docs/DefaultApi.md#fetchphonenumber) | **Get** /v1/PhoneNumbers/{PhoneNumber} | + + +## Documentation For Models + + - [LookupsV1PhoneNumber](docs/LookupsV1PhoneNumber.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/lookups/v1/api_default.go b/rest/lookups/v1/api_default.go new file mode 100644 index 000000000..07f3b91ca --- /dev/null +++ b/rest/lookups/v1/api_default.go @@ -0,0 +1,91 @@ +/* + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://lookups.twilio.com"), + } +} +// FetchPhoneNumberParams Optional parameters for the method 'FetchPhoneNumber' +type FetchPhoneNumberParams struct { + CountryCode *string `json:"CountryCode,omitempty"` + Type *[]string `json:"Type,omitempty"` + AddOns *[]string `json:"AddOns,omitempty"` + AddOnsData *map[string]interface{} `json:"AddOnsData,omitempty"` +} + +/* +FetchPhoneNumber Method for FetchPhoneNumber + * @param PhoneNumber The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. + * @param optional nil or *FetchPhoneNumberOpts - Optional Parameters: + * @param "CountryCode" (string) - The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format. + * @param "Type" ([]string) - The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value. + * @param "AddOns" ([]string) - The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). + * @param "AddOnsData" (map[string]interface{}) - Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on. +@return LookupsV1PhoneNumber +*/ +func (c *DefaultApiService) FetchPhoneNumber(PhoneNumber string, params *FetchPhoneNumberParams) (*LookupsV1PhoneNumber, error) { + path := "/v1/PhoneNumbers/{PhoneNumber}" + path = strings.Replace(path, "{"+"PhoneNumber"+"}", PhoneNumber, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) + } + if params != nil && params.Type != nil { + data.Set("Type", strings.Join(*params.Type, ",")) + } + if params != nil && params.AddOns != nil { + data.Set("AddOns", strings.Join(*params.AddOns, ",")) + } + if params != nil && params.AddOnsData != nil { + v, err := json.Marshal(params.AddOnsData) + + if err != nil { + return nil, err + } + + data.Set("AddOnsData", fmt.Sprint(v)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &LookupsV1PhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/lookups/v1/docs/DefaultApi.md b/rest/lookups/v1/docs/DefaultApi.md new file mode 100644 index 000000000..e5d97e027 --- /dev/null +++ b/rest/lookups/v1/docs/DefaultApi.md @@ -0,0 +1,55 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchPhoneNumber**](DefaultApi.md#FetchPhoneNumber) | **Get** /v1/PhoneNumbers/{PhoneNumber} | + + + +## FetchPhoneNumber + +> LookupsV1PhoneNumber FetchPhoneNumber(ctx, PhoneNumber, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PhoneNumber** | **string**| The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. | + **optional** | ***FetchPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CountryCode** | **optional.String**| The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format. | + **Type** | [**optional.Interface of []string**](string.md)| The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value. | + **AddOns** | [**optional.Interface of []string**](string.md)| The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons). | + **AddOnsData** | [**optional.Interface of map[string]interface{}**](.md)| Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on. | + +### Return type + +[**LookupsV1PhoneNumber**](lookups.v1.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/lookups/v1/docs/LookupsV1PhoneNumber.md b/rest/lookups/v1/docs/LookupsV1PhoneNumber.md new file mode 100644 index 000000000..bad098575 --- /dev/null +++ b/rest/lookups/v1/docs/LookupsV1PhoneNumber.md @@ -0,0 +1,17 @@ +# LookupsV1PhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddOns** | [**map[string]interface{}**](.md) | | [optional] +**CallerName** | [**map[string]interface{}**](.md) | | [optional] +**Carrier** | [**map[string]interface{}**](.md) | | [optional] +**CountryCode** | **string** | | [optional] +**NationalFormat** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/lookups/v1/model_lookups_v1_phone_number.go b/rest/lookups/v1/model_lookups_v1_phone_number.go new file mode 100644 index 000000000..7cfe5285d --- /dev/null +++ b/rest/lookups/v1/model_lookups_v1_phone_number.go @@ -0,0 +1,21 @@ +/* + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// LookupsV1PhoneNumber struct for LookupsV1PhoneNumber +type LookupsV1PhoneNumber struct { + AddOns map[string]interface{} `json:"AddOns,omitempty"` + CallerName map[string]interface{} `json:"CallerName,omitempty"` + Carrier map[string]interface{} `json:"Carrier,omitempty"` + CountryCode string `json:"CountryCode,omitempty"` + NationalFormat string `json:"NationalFormat,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/lookups/v1/response.go b/rest/lookups/v1/response.go new file mode 100644 index 000000000..a15d14044 --- /dev/null +++ b/rest/lookups/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Lookups + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/messaging/v1/.openapi-generator-ignore b/rest/messaging/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/messaging/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/messaging/v1/README.md b/rest/messaging/v1/README.md new file mode 100644 index 000000000..d5f0d4cf3 --- /dev/null +++ b/rest/messaging/v1/README.md @@ -0,0 +1,95 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAlphaSender**](docs/DefaultApi.md#createalphasender) | **Post** /v1/Services/{ServiceSid}/AlphaSenders | +*DefaultApi* | [**CreatePhoneNumber**](docs/DefaultApi.md#createphonenumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateShortCode**](docs/DefaultApi.md#createshortcode) | **Post** /v1/Services/{ServiceSid}/ShortCodes | +*DefaultApi* | [**DeleteAlphaSender**](docs/DefaultApi.md#deletealphasender) | **Delete** /v1/Services/{ServiceSid}/AlphaSenders/{Sid} | +*DefaultApi* | [**DeletePhoneNumber**](docs/DefaultApi.md#deletephonenumber) | **Delete** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteShortCode**](docs/DefaultApi.md#deleteshortcode) | **Delete** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +*DefaultApi* | [**FetchAlphaSender**](docs/DefaultApi.md#fetchalphasender) | **Get** /v1/Services/{ServiceSid}/AlphaSenders/{Sid} | +*DefaultApi* | [**FetchDeactivation**](docs/DefaultApi.md#fetchdeactivation) | **Get** /v1/Deactivations | +*DefaultApi* | [**FetchPhoneNumber**](docs/DefaultApi.md#fetchphonenumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchShortCode**](docs/DefaultApi.md#fetchshortcode) | **Get** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +*DefaultApi* | [**ListAlphaSender**](docs/DefaultApi.md#listalphasender) | **Get** /v1/Services/{ServiceSid}/AlphaSenders | +*DefaultApi* | [**ListPhoneNumber**](docs/DefaultApi.md#listphonenumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListShortCode**](docs/DefaultApi.md#listshortcode) | **Get** /v1/Services/{ServiceSid}/ShortCodes | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | + + +## Documentation For Models + + - [CreateAlphaSenderRequest](docs/CreateAlphaSenderRequest.md) + - [CreatePhoneNumberRequest](docs/CreatePhoneNumberRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateShortCodeRequest](docs/CreateShortCodeRequest.md) + - [ListAlphaSenderResponse](docs/ListAlphaSenderResponse.md) + - [ListPhoneNumberResponse](docs/ListPhoneNumberResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) + - [ListShortCodeResponse](docs/ListShortCodeResponse.md) + - [MessagingV1Deactivation](docs/MessagingV1Deactivation.md) + - [MessagingV1Service](docs/MessagingV1Service.md) + - [MessagingV1ServiceAlphaSender](docs/MessagingV1ServiceAlphaSender.md) + - [MessagingV1ServicePhoneNumber](docs/MessagingV1ServicePhoneNumber.md) + - [MessagingV1ServiceShortCode](docs/MessagingV1ServiceShortCode.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/messaging/v1/api_default.go b/rest/messaging/v1/api_default.go new file mode 100644 index 000000000..98b1dcefc --- /dev/null +++ b/rest/messaging/v1/api_default.go @@ -0,0 +1,769 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://messaging.twilio.com"), + } +} +// CreateAlphaSenderParams Optional parameters for the method 'CreateAlphaSender' +type CreateAlphaSenderParams struct { + AlphaSender *string `json:"AlphaSender,omitempty"` +} + +/* +CreateAlphaSender Method for CreateAlphaSender + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. + * @param optional nil or *CreateAlphaSenderOpts - Optional Parameters: + * @param "AlphaSender" (string) - The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. +@return MessagingV1ServiceAlphaSender +*/ +func (c *DefaultApiService) CreateAlphaSender(ServiceSid string, params *CreateAlphaSenderParams) (*MessagingV1ServiceAlphaSender, error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AlphaSender != nil { + data.Set("AlphaSender", *params.AlphaSender) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' +type CreatePhoneNumberParams struct { + PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` +} + +/* +CreatePhoneNumber Method for CreatePhoneNumber + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. + * @param optional nil or *CreatePhoneNumberOpts - Optional Parameters: + * @param "PhoneNumberSid" (string) - The SID of the Phone Number being added to the Service. +@return MessagingV1ServicePhoneNumber +*/ +func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*MessagingV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "AreaCodeGeomatch" (bool) - Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. + * @param "FallbackMethod" (string) - The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. + * @param "FallbackToLongCode" (bool) - Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. + * @param "FallbackUrl" (string) - The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "InboundMethod" (string) - The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. + * @param "InboundRequestUrl" (string) - The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. + * @param "MmsConverter" (bool) - Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. + * @param "ScanMessageContent" (string) - Reserved. + * @param "SmartEncoding" (bool) - Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. + * @param "StatusCallback" (string) - The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. + * @param "StickySender" (bool) - Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. + * @param "SynchronousValidation" (bool) - Reserved. + * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. +@return MessagingV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*MessagingV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) + } + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) + } + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) + } + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) + } + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) + } + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateShortCodeParams Optional parameters for the method 'CreateShortCode' +type CreateShortCodeParams struct { + ShortCodeSid *string `json:"ShortCodeSid,omitempty"` +} + +/* +CreateShortCode Method for CreateShortCode + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. + * @param optional nil or *CreateShortCodeOpts - Optional Parameters: + * @param "ShortCodeSid" (string) - The SID of the ShortCode resource being added to the Service. +@return MessagingV1ServiceShortCode +*/ +func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*MessagingV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ShortCodeSid != nil { + data.Set("ShortCodeSid", *params.ShortCodeSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteAlphaSender Method for DeleteAlphaSender + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. + * @param Sid The SID of the AlphaSender resource to delete. +*/ +func (c *DefaultApiService) DeleteAlphaSender(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeletePhoneNumber Method for DeletePhoneNumber + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. + * @param Sid The SID of the PhoneNumber resource to delete. +*/ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid The SID of the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteShortCode Method for DeleteShortCode + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. + * @param Sid The SID of the ShortCode resource to delete. +*/ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchAlphaSender Method for FetchAlphaSender + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. + * @param Sid The SID of the AlphaSender resource to fetch. +@return MessagingV1ServiceAlphaSender +*/ +func (c *DefaultApiService) FetchAlphaSender(ServiceSid string, Sid string) (*MessagingV1ServiceAlphaSender, error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServiceAlphaSender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchDeactivationParams Optional parameters for the method 'FetchDeactivation' +type FetchDeactivationParams struct { + Date *time.Time `json:"Date,omitempty"` +} + +/* +FetchDeactivation Method for FetchDeactivation +Fetch a list of all United States numbers that have been deactivated on a specific date. + * @param optional nil or *FetchDeactivationOpts - Optional Parameters: + * @param "Date" (time.Time) - The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. +*/ +func (c *DefaultApiService) FetchDeactivation(params *FetchDeactivationParams) (error) { + path := "/v1/Deactivations" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Date != nil { + data.Set("Date", fmt.Sprint(*params.Date)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchPhoneNumber Method for FetchPhoneNumber + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. + * @param Sid The SID of the PhoneNumber resource to fetch. +@return MessagingV1ServicePhoneNumber +*/ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*MessagingV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid The SID of the Service resource to fetch. +@return MessagingV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*MessagingV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchShortCode Method for FetchShortCode + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. + * @param Sid The SID of the ShortCode resource to fetch. +@return MessagingV1ServiceShortCode +*/ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*MessagingV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAlphaSenderParams Optional parameters for the method 'ListAlphaSender' +type ListAlphaSenderParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAlphaSender Method for ListAlphaSender + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. + * @param optional nil or *ListAlphaSenderOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAlphaSenderResponse +*/ +func (c *DefaultApiService) ListAlphaSender(ServiceSid string, params *ListAlphaSenderParams) (*ListAlphaSenderResponse, error) { + path := "/v1/Services/{ServiceSid}/AlphaSenders" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAlphaSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' +type ListPhoneNumberParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListPhoneNumber Method for ListPhoneNumber + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. + * @param optional nil or *ListPhoneNumberOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListPhoneNumberResponse +*/ +func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListShortCodeParams Optional parameters for the method 'ListShortCode' +type ListShortCodeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListShortCode Method for ListShortCode + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. + * @param optional nil or *ListShortCodeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListShortCodeResponse +*/ +func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + AreaCodeGeomatch *bool `json:"AreaCodeGeomatch,omitempty"` + FallbackMethod *string `json:"FallbackMethod,omitempty"` + FallbackToLongCode *bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl *string `json:"FallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InboundMethod *string `json:"InboundMethod,omitempty"` + InboundRequestUrl *string `json:"InboundRequestUrl,omitempty"` + MmsConverter *bool `json:"MmsConverter,omitempty"` + ScanMessageContent *string `json:"ScanMessageContent,omitempty"` + SmartEncoding *bool `json:"SmartEncoding,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StickySender *bool `json:"StickySender,omitempty"` + SynchronousValidation *bool `json:"SynchronousValidation,omitempty"` + ValidityPeriod *int32 `json:"ValidityPeriod,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid The SID of the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "AreaCodeGeomatch" (bool) - Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. + * @param "FallbackMethod" (string) - The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. + * @param "FallbackToLongCode" (bool) - Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. + * @param "FallbackUrl" (string) - The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "InboundMethod" (string) - The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. + * @param "InboundRequestUrl" (string) - The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. + * @param "MmsConverter" (bool) - Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. + * @param "ScanMessageContent" (string) - Reserved. + * @param "SmartEncoding" (bool) - Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. + * @param "StatusCallback" (string) - The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. + * @param "StickySender" (bool) - Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. + * @param "SynchronousValidation" (bool) - Reserved. + * @param "ValidityPeriod" (int32) - How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. +@return MessagingV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*MessagingV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AreaCodeGeomatch != nil { + data.Set("AreaCodeGeomatch", fmt.Sprint(*params.AreaCodeGeomatch)) + } + if params != nil && params.FallbackMethod != nil { + data.Set("FallbackMethod", *params.FallbackMethod) + } + if params != nil && params.FallbackToLongCode != nil { + data.Set("FallbackToLongCode", fmt.Sprint(*params.FallbackToLongCode)) + } + if params != nil && params.FallbackUrl != nil { + data.Set("FallbackUrl", *params.FallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InboundMethod != nil { + data.Set("InboundMethod", *params.InboundMethod) + } + if params != nil && params.InboundRequestUrl != nil { + data.Set("InboundRequestUrl", *params.InboundRequestUrl) + } + if params != nil && params.MmsConverter != nil { + data.Set("MmsConverter", fmt.Sprint(*params.MmsConverter)) + } + if params != nil && params.ScanMessageContent != nil { + data.Set("ScanMessageContent", *params.ScanMessageContent) + } + if params != nil && params.SmartEncoding != nil { + data.Set("SmartEncoding", fmt.Sprint(*params.SmartEncoding)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StickySender != nil { + data.Set("StickySender", fmt.Sprint(*params.StickySender)) + } + if params != nil && params.SynchronousValidation != nil { + data.Set("SynchronousValidation", fmt.Sprint(*params.SynchronousValidation)) + } + if params != nil && params.ValidityPeriod != nil { + data.Set("ValidityPeriod", fmt.Sprint(*params.ValidityPeriod)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MessagingV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/messaging/v1/docs/CreateAlphaSenderRequest.md b/rest/messaging/v1/docs/CreateAlphaSenderRequest.md new file mode 100644 index 000000000..f58744c20 --- /dev/null +++ b/rest/messaging/v1/docs/CreateAlphaSenderRequest.md @@ -0,0 +1,11 @@ +# CreateAlphaSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlphaSender** | **string** | The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/CreatePhoneNumberRequest.md b/rest/messaging/v1/docs/CreatePhoneNumberRequest.md new file mode 100644 index 000000000..0d1e6aab8 --- /dev/null +++ b/rest/messaging/v1/docs/CreatePhoneNumberRequest.md @@ -0,0 +1,11 @@ +# CreatePhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumberSid** | **string** | The SID of the Phone Number being added to the Service. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/CreateServiceRequest.md b/rest/messaging/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..5d14a6fe2 --- /dev/null +++ b/rest/messaging/v1/docs/CreateServiceRequest.md @@ -0,0 +1,24 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AreaCodeGeomatch** | **bool** | Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. | [optional] +**FallbackMethod** | **string** | The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. | [optional] +**FallbackToLongCode** | **bool** | Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. | [optional] +**FallbackUrl** | **string** | The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | +**InboundMethod** | **string** | The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. | [optional] +**InboundRequestUrl** | **string** | The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. | [optional] +**MmsConverter** | **bool** | Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. | [optional] +**ScanMessageContent** | **string** | Reserved. | [optional] +**SmartEncoding** | **bool** | Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. | [optional] +**StatusCallback** | **string** | The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. | [optional] +**StickySender** | **bool** | Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. | [optional] +**SynchronousValidation** | **bool** | Reserved. | [optional] +**ValidityPeriod** | **int32** | How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/CreateShortCodeRequest.md b/rest/messaging/v1/docs/CreateShortCodeRequest.md new file mode 100644 index 000000000..dfbb2418c --- /dev/null +++ b/rest/messaging/v1/docs/CreateShortCodeRequest.md @@ -0,0 +1,11 @@ +# CreateShortCodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShortCodeSid** | **string** | The SID of the ShortCode resource being added to the Service. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/DefaultApi.md b/rest/messaging/v1/docs/DefaultApi.md new file mode 100644 index 000000000..4a1914768 --- /dev/null +++ b/rest/messaging/v1/docs/DefaultApi.md @@ -0,0 +1,740 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAlphaSender**](DefaultApi.md#CreateAlphaSender) | **Post** /v1/Services/{ServiceSid}/AlphaSenders | +[**CreatePhoneNumber**](DefaultApi.md#CreatePhoneNumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateShortCode**](DefaultApi.md#CreateShortCode) | **Post** /v1/Services/{ServiceSid}/ShortCodes | +[**DeleteAlphaSender**](DefaultApi.md#DeleteAlphaSender) | **Delete** /v1/Services/{ServiceSid}/AlphaSenders/{Sid} | +[**DeletePhoneNumber**](DefaultApi.md#DeletePhoneNumber) | **Delete** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteShortCode**](DefaultApi.md#DeleteShortCode) | **Delete** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +[**FetchAlphaSender**](DefaultApi.md#FetchAlphaSender) | **Get** /v1/Services/{ServiceSid}/AlphaSenders/{Sid} | +[**FetchDeactivation**](DefaultApi.md#FetchDeactivation) | **Get** /v1/Deactivations | +[**FetchPhoneNumber**](DefaultApi.md#FetchPhoneNumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchShortCode**](DefaultApi.md#FetchShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +[**ListAlphaSender**](DefaultApi.md#ListAlphaSender) | **Get** /v1/Services/{ServiceSid}/AlphaSenders | +[**ListPhoneNumber**](DefaultApi.md#ListPhoneNumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListShortCode**](DefaultApi.md#ListShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | + + + +## CreateAlphaSender + +> MessagingV1ServiceAlphaSender CreateAlphaSender(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. | + **optional** | ***CreateAlphaSenderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAlphaSenderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AlphaSender** | **optional.String**| The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. | + +### Return type + +[**MessagingV1ServiceAlphaSender**](messaging.v1.service.alpha_sender.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePhoneNumber + +> MessagingV1ServicePhoneNumber CreatePhoneNumber(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. | + **optional** | ***CreatePhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreatePhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PhoneNumberSid** | **optional.String**| The SID of the Phone Number being added to the Service. | + +### Return type + +[**MessagingV1ServicePhoneNumber**](messaging.v1.service.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> MessagingV1Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AreaCodeGeomatch** | **optional.Bool**| Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. | + **FallbackMethod** | **optional.String**| The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. | + **FallbackToLongCode** | **optional.Bool**| Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. | + **FallbackUrl** | **optional.String**| The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **InboundMethod** | **optional.String**| The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. | + **InboundRequestUrl** | **optional.String**| The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. | + **MmsConverter** | **optional.Bool**| Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. | + **ScanMessageContent** | **optional.String**| Reserved. | + **SmartEncoding** | **optional.Bool**| Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. | + **StatusCallback** | **optional.String**| The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. | + **StickySender** | **optional.Bool**| Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. | + **SynchronousValidation** | **optional.Bool**| Reserved. | + **ValidityPeriod** | **optional.Int32**| How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. | + +### Return type + +[**MessagingV1Service**](messaging.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateShortCode + +> MessagingV1ServiceShortCode CreateShortCode(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under. | + **optional** | ***CreateShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ShortCodeSid** | **optional.String**| The SID of the ShortCode resource being added to the Service. | + +### Return type + +[**MessagingV1ServiceShortCode**](messaging.v1.service.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAlphaSender + +> DeleteAlphaSender(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. | +**Sid** | **string**| The SID of the AlphaSender resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePhoneNumber + +> DeletePhoneNumber(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. | +**Sid** | **string**| The SID of the PhoneNumber resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteShortCode + +> DeleteShortCode(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from. | +**Sid** | **string**| The SID of the ShortCode resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAlphaSender + +> MessagingV1ServiceAlphaSender FetchAlphaSender(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. | +**Sid** | **string**| The SID of the AlphaSender resource to fetch. | + +### Return type + +[**MessagingV1ServiceAlphaSender**](messaging.v1.service.alpha_sender.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDeactivation + +> FetchDeactivation(ctx, optional) + + + +Fetch a list of all United States numbers that have been deactivated on a specific date. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FetchDeactivationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchDeactivationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Date** | **optional.Time**| The request will return a list of all United States Phone Numbers that were deactivated on the day specified by this parameter. This date should be specified in YYYY-MM-DD format. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchPhoneNumber + +> MessagingV1ServicePhoneNumber FetchPhoneNumber(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. | +**Sid** | **string**| The SID of the PhoneNumber resource to fetch. | + +### Return type + +[**MessagingV1ServicePhoneNumber**](messaging.v1.service.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> MessagingV1Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to fetch. | + +### Return type + +[**MessagingV1Service**](messaging.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchShortCode + +> MessagingV1ServiceShortCode FetchShortCode(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the resource from. | +**Sid** | **string**| The SID of the ShortCode resource to fetch. | + +### Return type + +[**MessagingV1ServiceShortCode**](messaging.v1.service.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlphaSender + +> ListAlphaSenderResponse ListAlphaSender(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. | + **optional** | ***ListAlphaSenderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAlphaSenderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAlphaSenderResponse**](ListAlphaSenderResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPhoneNumber + +> ListPhoneNumberResponse ListPhoneNumber(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. | + **optional** | ***ListPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListPhoneNumberResponse**](ListPhoneNumberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListShortCode + +> ListShortCodeResponse ListShortCode(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the resources from. | + **optional** | ***ListShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListShortCodeResponse**](ListShortCodeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> MessagingV1Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AreaCodeGeomatch** | **optional.Bool**| Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. | + **FallbackMethod** | **optional.String**| The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. | + **FallbackToLongCode** | **optional.Bool**| Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. | + **FallbackUrl** | **optional.String**| The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **InboundMethod** | **optional.String**| The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. | + **InboundRequestUrl** | **optional.String**| The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. | + **MmsConverter** | **optional.Bool**| Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. | + **ScanMessageContent** | **optional.String**| Reserved. | + **SmartEncoding** | **optional.Bool**| Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. | + **StatusCallback** | **optional.String**| The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. | + **StickySender** | **optional.Bool**| Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. | + **SynchronousValidation** | **optional.Bool**| Reserved. | + **ValidityPeriod** | **optional.Int32**| How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. | + +### Return type + +[**MessagingV1Service**](messaging.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/messaging/v1/docs/ListAlphaSenderResponse.md b/rest/messaging/v1/docs/ListAlphaSenderResponse.md new file mode 100644 index 000000000..e530f21aa --- /dev/null +++ b/rest/messaging/v1/docs/ListAlphaSenderResponse.md @@ -0,0 +1,12 @@ +# ListAlphaSenderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlphaSenders** | [**[]MessagingV1ServiceAlphaSender**](messaging.v1.service.alpha_sender.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/ListPhoneNumberResponse.md b/rest/messaging/v1/docs/ListPhoneNumberResponse.md new file mode 100644 index 000000000..b731e625b --- /dev/null +++ b/rest/messaging/v1/docs/ListPhoneNumberResponse.md @@ -0,0 +1,12 @@ +# ListPhoneNumberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**PhoneNumbers** | [**[]MessagingV1ServicePhoneNumber**](messaging.v1.service.phone_number.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/ListServiceResponse.md b/rest/messaging/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..6b8c5856c --- /dev/null +++ b/rest/messaging/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Services** | [**[]MessagingV1Service**](messaging.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/ListServiceResponseMeta.md b/rest/messaging/v1/docs/ListServiceResponseMeta.md new file mode 100644 index 000000000..010bc7d70 --- /dev/null +++ b/rest/messaging/v1/docs/ListServiceResponseMeta.md @@ -0,0 +1,17 @@ +# ListServiceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/ListShortCodeResponse.md b/rest/messaging/v1/docs/ListShortCodeResponse.md new file mode 100644 index 000000000..6bcf79206 --- /dev/null +++ b/rest/messaging/v1/docs/ListShortCodeResponse.md @@ -0,0 +1,12 @@ +# ListShortCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**ShortCodes** | [**[]MessagingV1ServiceShortCode**](messaging.v1.service.short_code.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/MessagingV1Deactivation.md b/rest/messaging/v1/docs/MessagingV1Deactivation.md new file mode 100644 index 000000000..3c82f7b2a --- /dev/null +++ b/rest/messaging/v1/docs/MessagingV1Deactivation.md @@ -0,0 +1,11 @@ +# MessagingV1Deactivation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectTo** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/MessagingV1Service.md b/rest/messaging/v1/docs/MessagingV1Service.md new file mode 100644 index 000000000..2772203db --- /dev/null +++ b/rest/messaging/v1/docs/MessagingV1Service.md @@ -0,0 +1,30 @@ +# MessagingV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AreaCodeGeomatch** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FallbackMethod** | **string** | | [optional] +**FallbackToLongCode** | **bool** | | [optional] +**FallbackUrl** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**InboundMethod** | **string** | | [optional] +**InboundRequestUrl** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MmsConverter** | **bool** | | [optional] +**ScanMessageContent** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmartEncoding** | **bool** | | [optional] +**StatusCallback** | **string** | | [optional] +**StickySender** | **bool** | | [optional] +**SynchronousValidation** | **bool** | | [optional] +**Url** | **string** | | [optional] +**ValidityPeriod** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md b/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md new file mode 100644 index 000000000..9d419afbb --- /dev/null +++ b/rest/messaging/v1/docs/MessagingV1ServiceAlphaSender.md @@ -0,0 +1,18 @@ +# MessagingV1ServiceAlphaSender + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AlphaSender** | **string** | | [optional] +**Capabilities** | **[]string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md b/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md new file mode 100644 index 000000000..c43558b8c --- /dev/null +++ b/rest/messaging/v1/docs/MessagingV1ServicePhoneNumber.md @@ -0,0 +1,19 @@ +# MessagingV1ServicePhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Capabilities** | **[]string** | | [optional] +**CountryCode** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**PhoneNumber** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md b/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md new file mode 100644 index 000000000..59ab2e3bf --- /dev/null +++ b/rest/messaging/v1/docs/MessagingV1ServiceShortCode.md @@ -0,0 +1,19 @@ +# MessagingV1ServiceShortCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Capabilities** | **[]string** | | [optional] +**CountryCode** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**ShortCode** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/docs/UpdateServiceRequest.md b/rest/messaging/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..e474dc8e5 --- /dev/null +++ b/rest/messaging/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,24 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AreaCodeGeomatch** | **bool** | Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. | [optional] +**FallbackMethod** | **string** | The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. | [optional] +**FallbackToLongCode** | **bool** | Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. | [optional] +**FallbackUrl** | **string** | The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**InboundMethod** | **string** | The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. | [optional] +**InboundRequestUrl** | **string** | The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. | [optional] +**MmsConverter** | **bool** | Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. | [optional] +**ScanMessageContent** | **string** | Reserved. | [optional] +**SmartEncoding** | **bool** | Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. | [optional] +**StatusCallback** | **string** | The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. | [optional] +**StickySender** | **bool** | Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. | [optional] +**SynchronousValidation** | **bool** | Reserved. | [optional] +**ValidityPeriod** | **int32** | How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/messaging/v1/model_create_alpha_sender_request.go b/rest/messaging/v1/model_create_alpha_sender_request.go new file mode 100644 index 000000000..adf89b2ef --- /dev/null +++ b/rest/messaging/v1/model_create_alpha_sender_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAlphaSenderRequest struct for CreateAlphaSenderRequest +type CreateAlphaSenderRequest struct { + // The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, and hyphen `-`. This value cannot contain only numbers. + AlphaSender string `json:"AlphaSender"` +} diff --git a/rest/messaging/v1/model_create_phone_number_request.go b/rest/messaging/v1/model_create_phone_number_request.go new file mode 100644 index 000000000..768c2fe32 --- /dev/null +++ b/rest/messaging/v1/model_create_phone_number_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreatePhoneNumberRequest struct for CreatePhoneNumberRequest +type CreatePhoneNumberRequest struct { + // The SID of the Phone Number being added to the Service. + PhoneNumberSid string `json:"PhoneNumberSid"` +} diff --git a/rest/messaging/v1/model_create_service_request.go b/rest/messaging/v1/model_create_service_request.go new file mode 100644 index 000000000..cd19dc45a --- /dev/null +++ b/rest/messaging/v1/model_create_service_request.go @@ -0,0 +1,42 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. + AreaCodeGeomatch bool `json:"AreaCodeGeomatch,omitempty"` + // The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. + FallbackMethod string `json:"FallbackMethod,omitempty"` + // Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. + FallbackToLongCode bool `json:"FallbackToLongCode,omitempty"` + // The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. + FallbackUrl string `json:"FallbackUrl,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. + InboundMethod string `json:"InboundMethod,omitempty"` + // The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. + InboundRequestUrl string `json:"InboundRequestUrl,omitempty"` + // Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. + MmsConverter bool `json:"MmsConverter,omitempty"` + // Reserved. + ScanMessageContent string `json:"ScanMessageContent,omitempty"` + // Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. + SmartEncoding bool `json:"SmartEncoding,omitempty"` + // The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. + StatusCallback string `json:"StatusCallback,omitempty"` + // Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. + StickySender bool `json:"StickySender,omitempty"` + // Reserved. + SynchronousValidation bool `json:"SynchronousValidation,omitempty"` + // How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. + ValidityPeriod int32 `json:"ValidityPeriod,omitempty"` +} diff --git a/rest/messaging/v1/model_create_short_code_request.go b/rest/messaging/v1/model_create_short_code_request.go new file mode 100644 index 000000000..a5ea587b2 --- /dev/null +++ b/rest/messaging/v1/model_create_short_code_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateShortCodeRequest struct for CreateShortCodeRequest +type CreateShortCodeRequest struct { + // The SID of the ShortCode resource being added to the Service. + ShortCodeSid string `json:"ShortCodeSid"` +} diff --git a/rest/messaging/v1/model_list_alpha_sender_response.go b/rest/messaging/v1/model_list_alpha_sender_response.go new file mode 100644 index 000000000..e2bdc4d81 --- /dev/null +++ b/rest/messaging/v1/model_list_alpha_sender_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAlphaSenderResponse struct for ListAlphaSenderResponse +type ListAlphaSenderResponse struct { + AlphaSenders []MessagingV1ServiceAlphaSender `json:"AlphaSenders,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/messaging/v1/model_list_phone_number_response.go b/rest/messaging/v1/model_list_phone_number_response.go new file mode 100644 index 000000000..cfa7cf4f5 --- /dev/null +++ b/rest/messaging/v1/model_list_phone_number_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListPhoneNumberResponse struct for ListPhoneNumberResponse +type ListPhoneNumberResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + PhoneNumbers []MessagingV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` +} diff --git a/rest/messaging/v1/model_list_service_response.go b/rest/messaging/v1/model_list_service_response.go new file mode 100644 index 000000000..fc6a100b0 --- /dev/null +++ b/rest/messaging/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []MessagingV1Service `json:"Services,omitempty"` +} diff --git a/rest/messaging/v1/model_list_service_response_meta.go b/rest/messaging/v1/model_list_service_response_meta.go new file mode 100644 index 000000000..42b624b3c --- /dev/null +++ b/rest/messaging/v1/model_list_service_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponseMeta struct for ListServiceResponseMeta +type ListServiceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/messaging/v1/model_list_short_code_response.go b/rest/messaging/v1/model_list_short_code_response.go new file mode 100644 index 000000000..40fe67f75 --- /dev/null +++ b/rest/messaging/v1/model_list_short_code_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListShortCodeResponse struct for ListShortCodeResponse +type ListShortCodeResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + ShortCodes []MessagingV1ServiceShortCode `json:"ShortCodes,omitempty"` +} diff --git a/rest/messaging/v1/model_messaging_v1_deactivation.go b/rest/messaging/v1/model_messaging_v1_deactivation.go new file mode 100644 index 000000000..cd22e39ad --- /dev/null +++ b/rest/messaging/v1/model_messaging_v1_deactivation.go @@ -0,0 +1,15 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// MessagingV1Deactivation struct for MessagingV1Deactivation +type MessagingV1Deactivation struct { + RedirectTo string `json:"RedirectTo,omitempty"` +} diff --git a/rest/messaging/v1/model_messaging_v1_service.go b/rest/messaging/v1/model_messaging_v1_service.go new file mode 100644 index 000000000..39db2d053 --- /dev/null +++ b/rest/messaging/v1/model_messaging_v1_service.go @@ -0,0 +1,37 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MessagingV1Service struct for MessagingV1Service +type MessagingV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + AreaCodeGeomatch bool `json:"AreaCodeGeomatch,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FallbackMethod string `json:"FallbackMethod,omitempty"` + FallbackToLongCode bool `json:"FallbackToLongCode,omitempty"` + FallbackUrl string `json:"FallbackUrl,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InboundMethod string `json:"InboundMethod,omitempty"` + InboundRequestUrl string `json:"InboundRequestUrl,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MmsConverter bool `json:"MmsConverter,omitempty"` + ScanMessageContent string `json:"ScanMessageContent,omitempty"` + Sid string `json:"Sid,omitempty"` + SmartEncoding bool `json:"SmartEncoding,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StickySender bool `json:"StickySender,omitempty"` + SynchronousValidation bool `json:"SynchronousValidation,omitempty"` + Url string `json:"Url,omitempty"` + ValidityPeriod int32 `json:"ValidityPeriod,omitempty"` +} diff --git a/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go b/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go new file mode 100644 index 000000000..b592d0b08 --- /dev/null +++ b/rest/messaging/v1/model_messaging_v1_service_alpha_sender.go @@ -0,0 +1,25 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MessagingV1ServiceAlphaSender struct for MessagingV1ServiceAlphaSender +type MessagingV1ServiceAlphaSender struct { + AccountSid string `json:"AccountSid,omitempty"` + AlphaSender string `json:"AlphaSender,omitempty"` + Capabilities []string `json:"Capabilities,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/messaging/v1/model_messaging_v1_service_phone_number.go b/rest/messaging/v1/model_messaging_v1_service_phone_number.go new file mode 100644 index 000000000..923e92993 --- /dev/null +++ b/rest/messaging/v1/model_messaging_v1_service_phone_number.go @@ -0,0 +1,26 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MessagingV1ServicePhoneNumber struct for MessagingV1ServicePhoneNumber +type MessagingV1ServicePhoneNumber struct { + AccountSid string `json:"AccountSid,omitempty"` + Capabilities []string `json:"Capabilities,omitempty"` + CountryCode string `json:"CountryCode,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/messaging/v1/model_messaging_v1_service_short_code.go b/rest/messaging/v1/model_messaging_v1_service_short_code.go new file mode 100644 index 000000000..1b092b1f4 --- /dev/null +++ b/rest/messaging/v1/model_messaging_v1_service_short_code.go @@ -0,0 +1,26 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MessagingV1ServiceShortCode struct for MessagingV1ServiceShortCode +type MessagingV1ServiceShortCode struct { + AccountSid string `json:"AccountSid,omitempty"` + Capabilities []string `json:"Capabilities,omitempty"` + CountryCode string `json:"CountryCode,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + ShortCode string `json:"ShortCode,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/messaging/v1/model_update_service_request.go b/rest/messaging/v1/model_update_service_request.go new file mode 100644 index 000000000..603d4baf9 --- /dev/null +++ b/rest/messaging/v1/model_update_service_request.go @@ -0,0 +1,42 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance. + AreaCodeGeomatch bool `json:"AreaCodeGeomatch,omitempty"` + // The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`. + FallbackMethod string `json:"FallbackMethod,omitempty"` + // Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance. + FallbackToLongCode bool `json:"FallbackToLongCode,omitempty"` + // The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. + FallbackUrl string `json:"FallbackUrl,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`. + InboundMethod string `json:"InboundMethod,omitempty"` + // The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. + InboundRequestUrl string `json:"InboundRequestUrl,omitempty"` + // Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance. + MmsConverter bool `json:"MmsConverter,omitempty"` + // Reserved. + ScanMessageContent string `json:"ScanMessageContent,omitempty"` + // Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance. + SmartEncoding bool `json:"SmartEncoding,omitempty"` + // The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery. + StatusCallback string `json:"StatusCallback,omitempty"` + // Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance. + StickySender bool `json:"StickySender,omitempty"` + // Reserved. + SynchronousValidation bool `json:"SynchronousValidation,omitempty"` + // How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`. + ValidityPeriod int32 `json:"ValidityPeriod,omitempty"` +} diff --git a/rest/messaging/v1/response.go b/rest/messaging/v1/response.go new file mode 100644 index 000000000..b6d9fcf41 --- /dev/null +++ b/rest/messaging/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Messaging + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/monitor/v1/.openapi-generator-ignore b/rest/monitor/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/monitor/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/monitor/v1/README.md b/rest/monitor/v1/README.md new file mode 100644 index 000000000..0b91ea536 --- /dev/null +++ b/rest/monitor/v1/README.md @@ -0,0 +1,72 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**FetchAlert**](docs/DefaultApi.md#fetchalert) | **Get** /v1/Alerts/{Sid} | +*DefaultApi* | [**FetchEvent**](docs/DefaultApi.md#fetchevent) | **Get** /v1/Events/{Sid} | +*DefaultApi* | [**ListAlert**](docs/DefaultApi.md#listalert) | **Get** /v1/Alerts | +*DefaultApi* | [**ListEvent**](docs/DefaultApi.md#listevent) | **Get** /v1/Events | + + +## Documentation For Models + + - [ListAlertResponse](docs/ListAlertResponse.md) + - [ListAlertResponseMeta](docs/ListAlertResponseMeta.md) + - [ListEventResponse](docs/ListEventResponse.md) + - [MonitorV1Alert](docs/MonitorV1Alert.md) + - [MonitorV1AlertInstance](docs/MonitorV1AlertInstance.md) + - [MonitorV1Event](docs/MonitorV1Event.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/monitor/v1/api_default.go b/rest/monitor/v1/api_default.go new file mode 100644 index 000000000..7b6e15f7e --- /dev/null +++ b/rest/monitor/v1/api_default.go @@ -0,0 +1,212 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://monitor.twilio.com"), + } +} + +/* +FetchAlert Method for FetchAlert + * @param Sid The SID of the Alert resource to fetch. +@return MonitorV1AlertInstance +*/ +func (c *DefaultApiService) FetchAlert(Sid string) (*MonitorV1AlertInstance, error) { + path := "/v1/Alerts/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MonitorV1AlertInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEvent Method for FetchEvent + * @param Sid The SID of the Event resource to fetch. +@return MonitorV1Event +*/ +func (c *DefaultApiService) FetchEvent(Sid string) (*MonitorV1Event, error) { + path := "/v1/Events/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &MonitorV1Event{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAlertParams Optional parameters for the method 'ListAlert' +type ListAlertParams struct { + LogLevel *string `json:"LogLevel,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAlert Method for ListAlert + * @param optional nil or *ListAlertOpts - Optional Parameters: + * @param "LogLevel" (string) - Only show alerts for this log-level. Can be: `error`, `warning`, `notice`, or `debug`. + * @param "StartDate" (time.Time) - Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. + * @param "EndDate" (time.Time) - Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAlertResponse +*/ +func (c *DefaultApiService) ListAlert(params *ListAlertParams) (*ListAlertResponse, error) { + path := "/v1/Alerts" + + + data := url.Values{} + headers := 0 + + if params != nil && params.LogLevel != nil { + data.Set("LogLevel", *params.LogLevel) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAlertResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEventParams Optional parameters for the method 'ListEvent' +type ListEventParams struct { + ActorSid *string `json:"ActorSid,omitempty"` + EventType *string `json:"EventType,omitempty"` + ResourceSid *string `json:"ResourceSid,omitempty"` + SourceIpAddress *string `json:"SourceIpAddress,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEvent Method for ListEvent +Returns a list of events in the account, sorted by event-date. + * @param optional nil or *ListEventOpts - Optional Parameters: + * @param "ActorSid" (string) - Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials. + * @param "EventType" (string) - Only include events of this [Event Type](https://www.twilio.com/docs/usage/monitor-events#event-types). + * @param "ResourceSid" (string) - Only include events that refer to this resource. Useful for discovering the history of a specific resource. + * @param "SourceIpAddress" (string) - Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console. + * @param "StartDate" (time.Time) - Only include events that occurred on or after this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "EndDate" (time.Time) - Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEventResponse +*/ +func (c *DefaultApiService) ListEvent(params *ListEventParams) (*ListEventResponse, error) { + path := "/v1/Events" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ActorSid != nil { + data.Set("ActorSid", *params.ActorSid) + } + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) + } + if params != nil && params.ResourceSid != nil { + data.Set("ResourceSid", *params.ResourceSid) + } + if params != nil && params.SourceIpAddress != nil { + data.Set("SourceIpAddress", *params.SourceIpAddress) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/monitor/v1/docs/DefaultApi.md b/rest/monitor/v1/docs/DefaultApi.md new file mode 100644 index 000000000..72adce34b --- /dev/null +++ b/rest/monitor/v1/docs/DefaultApi.md @@ -0,0 +1,169 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchAlert**](DefaultApi.md#FetchAlert) | **Get** /v1/Alerts/{Sid} | +[**FetchEvent**](DefaultApi.md#FetchEvent) | **Get** /v1/Events/{Sid} | +[**ListAlert**](DefaultApi.md#ListAlert) | **Get** /v1/Alerts | +[**ListEvent**](DefaultApi.md#ListEvent) | **Get** /v1/Events | + + + +## FetchAlert + +> MonitorV1AlertInstance FetchAlert(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Alert resource to fetch. | + +### Return type + +[**MonitorV1AlertInstance**](monitor.v1.alert-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEvent + +> MonitorV1Event FetchEvent(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Event resource to fetch. | + +### Return type + +[**MonitorV1Event**](monitor.v1.event.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAlert + +> ListAlertResponse ListAlert(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAlertOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAlertOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **LogLevel** | **optional.String**| Only show alerts for this log-level. Can be: `error`, `warning`, `notice`, or `debug`. | + **StartDate** | **optional.Time**| Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. | + **EndDate** | **optional.Time**| Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAlertResponse**](ListAlertResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEvent + +> ListEventResponse ListEvent(ctx, optional) + + + +Returns a list of events in the account, sorted by event-date. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListEventOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEventOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ActorSid** | **optional.String**| Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials. | + **EventType** | **optional.String**| Only include events of this [Event Type](https://www.twilio.com/docs/usage/monitor-events#event-types). | + **ResourceSid** | **optional.String**| Only include events that refer to this resource. Useful for discovering the history of a specific resource. | + **SourceIpAddress** | **optional.String**| Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console. | + **StartDate** | **optional.Time**| Only include events that occurred on or after this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **EndDate** | **optional.Time**| Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEventResponse**](ListEventResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/monitor/v1/docs/ListAlertResponse.md b/rest/monitor/v1/docs/ListAlertResponse.md new file mode 100644 index 000000000..3099c423b --- /dev/null +++ b/rest/monitor/v1/docs/ListAlertResponse.md @@ -0,0 +1,12 @@ +# ListAlertResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alerts** | [**[]MonitorV1Alert**](monitor.v1.alert.md) | | [optional] +**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/docs/ListAlertResponseMeta.md b/rest/monitor/v1/docs/ListAlertResponseMeta.md new file mode 100644 index 000000000..82a0c23e0 --- /dev/null +++ b/rest/monitor/v1/docs/ListAlertResponseMeta.md @@ -0,0 +1,17 @@ +# ListAlertResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/docs/ListEventResponse.md b/rest/monitor/v1/docs/ListEventResponse.md new file mode 100644 index 000000000..2928df6fa --- /dev/null +++ b/rest/monitor/v1/docs/ListEventResponse.md @@ -0,0 +1,12 @@ +# ListEventResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]MonitorV1Event**](monitor.v1.event.md) | | [optional] +**Meta** | [**ListAlertResponseMeta**](ListAlertResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/docs/MonitorV1Alert.md b/rest/monitor/v1/docs/MonitorV1Alert.md new file mode 100644 index 000000000..bc4203acc --- /dev/null +++ b/rest/monitor/v1/docs/MonitorV1Alert.md @@ -0,0 +1,25 @@ +# MonitorV1Alert + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AlertText** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateGenerated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | **string** | | [optional] +**LogLevel** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**ResourceSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/docs/MonitorV1AlertInstance.md b/rest/monitor/v1/docs/MonitorV1AlertInstance.md new file mode 100644 index 000000000..086e03264 --- /dev/null +++ b/rest/monitor/v1/docs/MonitorV1AlertInstance.md @@ -0,0 +1,29 @@ +# MonitorV1AlertInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AlertText** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateGenerated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | **string** | | [optional] +**LogLevel** | **string** | | [optional] +**MoreInfo** | **string** | | [optional] +**RequestHeaders** | **string** | | [optional] +**RequestMethod** | **string** | | [optional] +**RequestUrl** | **string** | | [optional] +**RequestVariables** | **string** | | [optional] +**ResourceSid** | **string** | | [optional] +**ResponseBody** | **string** | | [optional] +**ResponseHeaders** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/docs/MonitorV1Event.md b/rest/monitor/v1/docs/MonitorV1Event.md new file mode 100644 index 000000000..baf6a89ca --- /dev/null +++ b/rest/monitor/v1/docs/MonitorV1Event.md @@ -0,0 +1,24 @@ +# MonitorV1Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActorSid** | **string** | | [optional] +**ActorType** | **string** | | [optional] +**Description** | **string** | | [optional] +**EventData** | [**map[string]interface{}**](.md) | | [optional] +**EventDate** | [**time.Time**](time.Time.md) | | [optional] +**EventType** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ResourceSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Source** | **string** | | [optional] +**SourceIpAddress** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/monitor/v1/model_list_alert_response.go b/rest/monitor/v1/model_list_alert_response.go new file mode 100644 index 000000000..7e60e0324 --- /dev/null +++ b/rest/monitor/v1/model_list_alert_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAlertResponse struct for ListAlertResponse +type ListAlertResponse struct { + Alerts []MonitorV1Alert `json:"Alerts,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/monitor/v1/model_list_alert_response_meta.go b/rest/monitor/v1/model_list_alert_response_meta.go new file mode 100644 index 000000000..dc9e66575 --- /dev/null +++ b/rest/monitor/v1/model_list_alert_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAlertResponseMeta struct for ListAlertResponseMeta +type ListAlertResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/monitor/v1/model_list_event_response.go b/rest/monitor/v1/model_list_event_response.go new file mode 100644 index 000000000..9c194597e --- /dev/null +++ b/rest/monitor/v1/model_list_event_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEventResponse struct for ListEventResponse +type ListEventResponse struct { + Events []MonitorV1Event `json:"Events,omitempty"` + Meta ListAlertResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/monitor/v1/model_monitor_v1_alert.go b/rest/monitor/v1/model_monitor_v1_alert.go new file mode 100644 index 000000000..c05957662 --- /dev/null +++ b/rest/monitor/v1/model_monitor_v1_alert.go @@ -0,0 +1,32 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MonitorV1Alert struct for MonitorV1Alert +type MonitorV1Alert struct { + AccountSid string `json:"AccountSid,omitempty"` + AlertText string `json:"AlertText,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateGenerated time.Time `json:"DateGenerated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + LogLevel string `json:"LogLevel,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/monitor/v1/model_monitor_v1_alert_instance.go b/rest/monitor/v1/model_monitor_v1_alert_instance.go new file mode 100644 index 000000000..2f36f0506 --- /dev/null +++ b/rest/monitor/v1/model_monitor_v1_alert_instance.go @@ -0,0 +1,36 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MonitorV1AlertInstance struct for MonitorV1AlertInstance +type MonitorV1AlertInstance struct { + AccountSid string `json:"AccountSid,omitempty"` + AlertText string `json:"AlertText,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateGenerated time.Time `json:"DateGenerated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode string `json:"ErrorCode,omitempty"` + LogLevel string `json:"LogLevel,omitempty"` + MoreInfo string `json:"MoreInfo,omitempty"` + RequestHeaders string `json:"RequestHeaders,omitempty"` + RequestMethod string `json:"RequestMethod,omitempty"` + RequestUrl string `json:"RequestUrl,omitempty"` + RequestVariables string `json:"RequestVariables,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + ResponseBody string `json:"ResponseBody,omitempty"` + ResponseHeaders string `json:"ResponseHeaders,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/monitor/v1/model_monitor_v1_event.go b/rest/monitor/v1/model_monitor_v1_event.go new file mode 100644 index 000000000..d6227c3f7 --- /dev/null +++ b/rest/monitor/v1/model_monitor_v1_event.go @@ -0,0 +1,31 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// MonitorV1Event struct for MonitorV1Event +type MonitorV1Event struct { + AccountSid string `json:"AccountSid,omitempty"` + ActorSid string `json:"ActorSid,omitempty"` + ActorType string `json:"ActorType,omitempty"` + Description string `json:"Description,omitempty"` + EventData map[string]interface{} `json:"EventData,omitempty"` + EventDate time.Time `json:"EventDate,omitempty"` + EventType string `json:"EventType,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Sid string `json:"Sid,omitempty"` + Source string `json:"Source,omitempty"` + SourceIpAddress string `json:"SourceIpAddress,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/monitor/v1/response.go b/rest/monitor/v1/response.go new file mode 100644 index 000000000..084482780 --- /dev/null +++ b/rest/monitor/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Monitor + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/notify/v1/.openapi-generator-ignore b/rest/notify/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/notify/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/notify/v1/README.md b/rest/notify/v1/README.md new file mode 100644 index 000000000..32aa72b16 --- /dev/null +++ b/rest/notify/v1/README.md @@ -0,0 +1,91 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateBinding**](docs/DefaultApi.md#createbinding) | **Post** /v1/Services/{ServiceSid}/Bindings | +*DefaultApi* | [**CreateCredential**](docs/DefaultApi.md#createcredential) | **Post** /v1/Credentials | +*DefaultApi* | [**CreateNotification**](docs/DefaultApi.md#createnotification) | **Post** /v1/Services/{ServiceSid}/Notifications | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**DeleteBinding**](docs/DefaultApi.md#deletebinding) | **Delete** /v1/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**DeleteCredential**](docs/DefaultApi.md#deletecredential) | **Delete** /v1/Credentials/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**FetchBinding**](docs/DefaultApi.md#fetchbinding) | **Get** /v1/Services/{ServiceSid}/Bindings/{Sid} | +*DefaultApi* | [**FetchCredential**](docs/DefaultApi.md#fetchcredential) | **Get** /v1/Credentials/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**ListBinding**](docs/DefaultApi.md#listbinding) | **Get** /v1/Services/{ServiceSid}/Bindings | +*DefaultApi* | [**ListCredential**](docs/DefaultApi.md#listcredential) | **Get** /v1/Credentials | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**UpdateCredential**](docs/DefaultApi.md#updatecredential) | **Post** /v1/Credentials/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | + + +## Documentation For Models + + - [CreateBindingRequest](docs/CreateBindingRequest.md) + - [CreateCredentialRequest](docs/CreateCredentialRequest.md) + - [CreateNotificationRequest](docs/CreateNotificationRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [ListBindingResponse](docs/ListBindingResponse.md) + - [ListCredentialResponse](docs/ListCredentialResponse.md) + - [ListCredentialResponseMeta](docs/ListCredentialResponseMeta.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [NotifyV1Credential](docs/NotifyV1Credential.md) + - [NotifyV1Service](docs/NotifyV1Service.md) + - [NotifyV1ServiceBinding](docs/NotifyV1ServiceBinding.md) + - [NotifyV1ServiceNotification](docs/NotifyV1ServiceNotification.md) + - [UpdateCredentialRequest](docs/UpdateCredentialRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/notify/v1/api_default.go b/rest/notify/v1/api_default.go new file mode 100644 index 000000000..a139de1ac --- /dev/null +++ b/rest/notify/v1/api_default.go @@ -0,0 +1,908 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://notify.twilio.com"), + } +} +// CreateBindingParams Optional parameters for the method 'CreateBinding' +type CreateBindingParams struct { + Address *string `json:"Address,omitempty"` + BindingType *string `json:"BindingType,omitempty"` + CredentialSid *string `json:"CredentialSid,omitempty"` + Endpoint *string `json:"Endpoint,omitempty"` + Identity *string `json:"Identity,omitempty"` + NotificationProtocolVersion *string `json:"NotificationProtocolVersion,omitempty"` + Tag *[]string `json:"Tag,omitempty"` +} + +/* +CreateBinding Method for CreateBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under. + * @param optional nil or *CreateBindingOpts - Optional Parameters: + * @param "Address" (string) - The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. + * @param "BindingType" (string) - The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`. + * @param "CredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. + * @param "Endpoint" (string) - Deprecated. + * @param "Identity" (string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. + * @param "NotificationProtocolVersion" (string) - The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. + * @param "Tag" ([]string) - A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. +@return NotifyV1ServiceBinding +*/ +func (c *DefaultApiService) CreateBinding(ServiceSid string, params *CreateBindingParams) (*NotifyV1ServiceBinding, error) { + path := "/v1/Services/{ServiceSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Address != nil { + data.Set("Address", *params.Address) + } + if params != nil && params.BindingType != nil { + data.Set("BindingType", *params.BindingType) + } + if params != nil && params.CredentialSid != nil { + data.Set("CredentialSid", *params.CredentialSid) + } + if params != nil && params.Endpoint != nil { + data.Set("Endpoint", *params.Endpoint) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.NotificationProtocolVersion != nil { + data.Set("NotificationProtocolVersion", *params.NotificationProtocolVersion) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCredentialParams Optional parameters for the method 'CreateCredential' +type CreateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateCredential Method for CreateCredential + * @param optional nil or *CreateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + * @param "Certificate" (string) - [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + * @param "Type" (string) - The Credential type. Can be: `gcm`, `fcm`, or `apn`. +@return NotifyV1Credential +*/ +func (c *DefaultApiService) CreateCredential(params *CreateCredentialParams) (*NotifyV1Credential, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateNotificationParams Optional parameters for the method 'CreateNotification' +type CreateNotificationParams struct { + Action *string `json:"Action,omitempty"` + Alexa *map[string]interface{} `json:"Alexa,omitempty"` + Apn *map[string]interface{} `json:"Apn,omitempty"` + Body *string `json:"Body,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessenger *map[string]interface{} `json:"FacebookMessenger,omitempty"` + Fcm *map[string]interface{} `json:"Fcm,omitempty"` + Gcm *map[string]interface{} `json:"Gcm,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Priority *string `json:"Priority,omitempty"` + Segment *[]string `json:"Segment,omitempty"` + Sms *map[string]interface{} `json:"Sms,omitempty"` + Sound *string `json:"Sound,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + Title *string `json:"Title,omitempty"` + ToBinding *[]string `json:"ToBinding,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +CreateNotification Method for CreateNotification + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under. + * @param optional nil or *CreateNotificationOpts - Optional Parameters: + * @param "Action" (string) - The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. + * @param "Alexa" (map[string]interface{}) - Deprecated. + * @param "Apn" (map[string]interface{}) - The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. + * @param "Body" (string) - The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. + * @param "Data" (map[string]interface{}) - The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. + * @param "DeliveryCallbackUrl" (string) - URL to send webhooks. + * @param "FacebookMessenger" (map[string]interface{}) - Deprecated. + * @param "Fcm" (map[string]interface{}) - The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. + * @param "Gcm" (map[string]interface{}) - The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). + * @param "Identity" ([]string) - The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. + * @param "Priority" (string) - The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property. + * @param "Segment" ([]string) - The Segment resource is deprecated. Use the `tag` parameter, instead. + * @param "Sms" (map[string]interface{}) - The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + * @param "Sound" (string) - The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. + * @param "Tag" ([]string) - A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. + * @param "Title" (string) - The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. + * @param "ToBinding" ([]string) - The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. + * @param "Ttl" (int32) - How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. +@return NotifyV1ServiceNotification +*/ +func (c *DefaultApiService) CreateNotification(ServiceSid string, params *CreateNotificationParams) (*NotifyV1ServiceNotification, error) { + path := "/v1/Services/{ServiceSid}/Notifications" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Action != nil { + data.Set("Action", *params.Action) + } + if params != nil && params.Alexa != nil { + v, err := json.Marshal(params.Alexa) + + if err != nil { + return nil, err + } + + data.Set("Alexa", fmt.Sprint(v)) + } + if params != nil && params.Apn != nil { + v, err := json.Marshal(params.Apn) + + if err != nil { + return nil, err + } + + data.Set("Apn", fmt.Sprint(v)) + } + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + } + if params != nil && params.FacebookMessenger != nil { + v, err := json.Marshal(params.FacebookMessenger) + + if err != nil { + return nil, err + } + + data.Set("FacebookMessenger", fmt.Sprint(v)) + } + if params != nil && params.Fcm != nil { + v, err := json.Marshal(params.Fcm) + + if err != nil { + return nil, err + } + + data.Set("Fcm", fmt.Sprint(v)) + } + if params != nil && params.Gcm != nil { + v, err := json.Marshal(params.Gcm) + + if err != nil { + return nil, err + } + + data.Set("Gcm", fmt.Sprint(v)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.Priority != nil { + data.Set("Priority", *params.Priority) + } + if params != nil && params.Segment != nil { + data.Set("Segment", strings.Join(*params.Segment, ",")) + } + if params != nil && params.Sms != nil { + v, err := json.Marshal(params.Sms) + + if err != nil { + return nil, err + } + + data.Set("Sms", fmt.Sprint(v)) + } + if params != nil && params.Sound != nil { + data.Set("Sound", *params.Sound) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } + if params != nil && params.Title != nil { + data.Set("Title", *params.Title) + } + if params != nil && params.ToBinding != nil { + data.Set("ToBinding", strings.Join(*params.ToBinding, ",")) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1ServiceNotification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "AlexaSkillId" (string) - Deprecated. + * @param "ApnCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. + * @param "DefaultAlexaNotificationProtocolVersion" (string) - Deprecated. + * @param "DefaultApnNotificationProtocolVersion" (string) - The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DefaultFcmNotificationProtocolVersion" (string) - The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DefaultGcmNotificationProtocolVersion" (string) - The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DeliveryCallbackEnabled" (bool) - Callback configuration that enables delivery callbacks, default false + * @param "DeliveryCallbackUrl" (string) - URL to send delivery status callback. + * @param "FacebookMessengerPageId" (string) - Deprecated. + * @param "FcmCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "GcmCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. + * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. + * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. +@return NotifyV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*NotifyV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) + } + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) + } + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) + } + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) + } + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) + } + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) + } + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + } + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) + } + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteBinding Method for DeleteBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to delete the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to delete. +*/ +func (c *DefaultApiService) DeleteBinding(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCredential Method for DeleteCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to delete. +*/ +func (c *DefaultApiService) DeleteCredential(Sid string) (error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchBinding Method for FetchBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Binding resource to fetch. +@return NotifyV1ServiceBinding +*/ +func (c *DefaultApiService) FetchBinding(ServiceSid string, Sid string) (*NotifyV1ServiceBinding, error) { + path := "/v1/Services/{ServiceSid}/Bindings/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1ServiceBinding{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCredential Method for FetchCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to fetch. +@return NotifyV1Credential +*/ +func (c *DefaultApiService) FetchCredential(Sid string) (*NotifyV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. +@return NotifyV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*NotifyV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBindingParams Optional parameters for the method 'ListBinding' +type ListBindingParams struct { + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + Identity *[]string `json:"Identity,omitempty"` + Tag *[]string `json:"Tag,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBinding Method for ListBinding + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to read the resource from. + * @param optional nil or *ListBindingOpts - Optional Parameters: + * @param "StartDate" (time.Time) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. + * @param "Identity" ([]string) - The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. + * @param "Tag" ([]string) - Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBindingResponse +*/ +func (c *DefaultApiService) ListBinding(ServiceSid string, params *ListBindingParams) (*ListBindingResponse, error) { + path := "/v1/Services/{ServiceSid}/Bindings" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Identity != nil { + data.Set("Identity", strings.Join(*params.Identity, ",")) + } + if params != nil && params.Tag != nil { + data.Set("Tag", strings.Join(*params.Tag, ",")) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBindingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialParams Optional parameters for the method 'ListCredential' +type ListCredentialParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredential Method for ListCredential + * @param optional nil or *ListCredentialOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialResponse +*/ +func (c *DefaultApiService) ListCredential(params *ListCredentialParams) (*ListCredentialResponse, error) { + path := "/v1/Credentials" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - The string that identifies the Service resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCredentialParams Optional parameters for the method 'UpdateCredential' +type UpdateCredentialParams struct { + ApiKey *string `json:"ApiKey,omitempty"` + Certificate *string `json:"Certificate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PrivateKey *string `json:"PrivateKey,omitempty"` + Sandbox *bool `json:"Sandbox,omitempty"` + Secret *string `json:"Secret,omitempty"` +} + +/* +UpdateCredential Method for UpdateCredential + * @param Sid The Twilio-provided string that uniquely identifies the Credential resource to update. + * @param optional nil or *UpdateCredentialOpts - Optional Parameters: + * @param "ApiKey" (string) - [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + * @param "Certificate" (string) - [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "PrivateKey" (string) - [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` + * @param "Sandbox" (bool) - [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + * @param "Secret" (string) - [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. +@return NotifyV1Credential +*/ +func (c *DefaultApiService) UpdateCredential(Sid string, params *UpdateCredentialParams) (*NotifyV1Credential, error) { + path := "/v1/Credentials/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ApiKey != nil { + data.Set("ApiKey", *params.ApiKey) + } + if params != nil && params.Certificate != nil { + data.Set("Certificate", *params.Certificate) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PrivateKey != nil { + data.Set("PrivateKey", *params.PrivateKey) + } + if params != nil && params.Sandbox != nil { + data.Set("Sandbox", fmt.Sprint(*params.Sandbox)) + } + if params != nil && params.Secret != nil { + data.Set("Secret", *params.Secret) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Credential{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + AlexaSkillId *string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid *string `json:"ApnCredentialSid,omitempty"` + DefaultAlexaNotificationProtocolVersion *string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + DefaultApnNotificationProtocolVersion *string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion *string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion *string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled *bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl *string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId *string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid *string `json:"FcmCredentialSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + GcmCredentialSid *string `json:"GcmCredentialSid,omitempty"` + LogEnabled *bool `json:"LogEnabled,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "AlexaSkillId" (string) - Deprecated. + * @param "ApnCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. + * @param "DefaultAlexaNotificationProtocolVersion" (string) - Deprecated. + * @param "DefaultApnNotificationProtocolVersion" (string) - The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DefaultFcmNotificationProtocolVersion" (string) - The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DefaultGcmNotificationProtocolVersion" (string) - The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + * @param "DeliveryCallbackEnabled" (bool) - Callback configuration that enables delivery callbacks, default false + * @param "DeliveryCallbackUrl" (string) - URL to send delivery status callback. + * @param "FacebookMessengerPageId" (string) - Deprecated. + * @param "FcmCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "GcmCredentialSid" (string) - The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. + * @param "LogEnabled" (bool) - Whether to log notifications. Can be: `true` or `false` and the default is `true`. + * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. +@return NotifyV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*NotifyV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AlexaSkillId != nil { + data.Set("AlexaSkillId", *params.AlexaSkillId) + } + if params != nil && params.ApnCredentialSid != nil { + data.Set("ApnCredentialSid", *params.ApnCredentialSid) + } + if params != nil && params.DefaultAlexaNotificationProtocolVersion != nil { + data.Set("DefaultAlexaNotificationProtocolVersion", *params.DefaultAlexaNotificationProtocolVersion) + } + if params != nil && params.DefaultApnNotificationProtocolVersion != nil { + data.Set("DefaultApnNotificationProtocolVersion", *params.DefaultApnNotificationProtocolVersion) + } + if params != nil && params.DefaultFcmNotificationProtocolVersion != nil { + data.Set("DefaultFcmNotificationProtocolVersion", *params.DefaultFcmNotificationProtocolVersion) + } + if params != nil && params.DefaultGcmNotificationProtocolVersion != nil { + data.Set("DefaultGcmNotificationProtocolVersion", *params.DefaultGcmNotificationProtocolVersion) + } + if params != nil && params.DeliveryCallbackEnabled != nil { + data.Set("DeliveryCallbackEnabled", fmt.Sprint(*params.DeliveryCallbackEnabled)) + } + if params != nil && params.DeliveryCallbackUrl != nil { + data.Set("DeliveryCallbackUrl", *params.DeliveryCallbackUrl) + } + if params != nil && params.FacebookMessengerPageId != nil { + data.Set("FacebookMessengerPageId", *params.FacebookMessengerPageId) + } + if params != nil && params.FcmCredentialSid != nil { + data.Set("FcmCredentialSid", *params.FcmCredentialSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.GcmCredentialSid != nil { + data.Set("GcmCredentialSid", *params.GcmCredentialSid) + } + if params != nil && params.LogEnabled != nil { + data.Set("LogEnabled", fmt.Sprint(*params.LogEnabled)) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NotifyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/notify/v1/docs/CreateBindingRequest.md b/rest/notify/v1/docs/CreateBindingRequest.md new file mode 100644 index 000000000..376868ab7 --- /dev/null +++ b/rest/notify/v1/docs/CreateBindingRequest.md @@ -0,0 +1,17 @@ +# CreateBindingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. | +**BindingType** | **string** | The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`. | +**CredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. | [optional] +**Endpoint** | **string** | Deprecated. | [optional] +**Identity** | **string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. | +**NotificationProtocolVersion** | **string** | The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\"3\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. | [optional] +**Tag** | **[]string** | A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/CreateCredentialRequest.md b/rest/notify/v1/docs/CreateCredentialRequest.md new file mode 100644 index 000000000..642ecb259 --- /dev/null +++ b/rest/notify/v1/docs/CreateCredentialRequest.md @@ -0,0 +1,17 @@ +# CreateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | [optional] +**Certificate** | **string** | [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\n.-----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | [optional] +**Type** | **string** | The Credential type. Can be: `gcm`, `fcm`, or `apn`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/CreateNotificationRequest.md b/rest/notify/v1/docs/CreateNotificationRequest.md new file mode 100644 index 000000000..3d48b4f0b --- /dev/null +++ b/rest/notify/v1/docs/CreateNotificationRequest.md @@ -0,0 +1,28 @@ +# CreateNotificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | **string** | The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. | [optional] +**Alexa** | [**map[string]interface{}**](.md) | Deprecated. | [optional] +**Apn** | [**map[string]interface{}**](.md) | The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. | [optional] +**Body** | **string** | The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. | [optional] +**Data** | [**map[string]interface{}**](.md) | The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. | [optional] +**DeliveryCallbackUrl** | **string** | URL to send webhooks. | [optional] +**FacebookMessenger** | [**map[string]interface{}**](.md) | Deprecated. | [optional] +**Fcm** | [**map[string]interface{}**](.md) | The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. | [optional] +**Gcm** | [**map[string]interface{}**](.md) | The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). | [optional] +**Identity** | **[]string** | The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. | [optional] +**Priority** | **string** | The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property. | [optional] +**Segment** | **[]string** | The Segment resource is deprecated. Use the `tag` parameter, instead. | [optional] +**Sms** | [**map[string]interface{}**](.md) | The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. | [optional] +**Sound** | **string** | The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. | [optional] +**Tag** | **[]string** | A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. | [optional] +**Title** | **string** | The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. | [optional] +**ToBinding** | **[]string** | The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. | [optional] +**Ttl** | **int32** | How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/CreateServiceRequest.md b/rest/notify/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..1cb557067 --- /dev/null +++ b/rest/notify/v1/docs/CreateServiceRequest.md @@ -0,0 +1,24 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlexaSkillId** | **string** | Deprecated. | [optional] +**ApnCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. | [optional] +**DefaultAlexaNotificationProtocolVersion** | **string** | Deprecated. | [optional] +**DefaultApnNotificationProtocolVersion** | **string** | The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DefaultFcmNotificationProtocolVersion** | **string** | The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DefaultGcmNotificationProtocolVersion** | **string** | The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DeliveryCallbackEnabled** | **bool** | Callback configuration that enables delivery callbacks, default false | [optional] +**DeliveryCallbackUrl** | **string** | URL to send delivery status callback. | [optional] +**FacebookMessengerPageId** | **string** | Deprecated. | [optional] +**FcmCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**GcmCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. | [optional] +**LogEnabled** | **bool** | Whether to log notifications. Can be: `true` or `false` and the default is `true`. | [optional] +**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/DefaultApi.md b/rest/notify/v1/docs/DefaultApi.md new file mode 100644 index 000000000..235f36de5 --- /dev/null +++ b/rest/notify/v1/docs/DefaultApi.md @@ -0,0 +1,661 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBinding**](DefaultApi.md#CreateBinding) | **Post** /v1/Services/{ServiceSid}/Bindings | +[**CreateCredential**](DefaultApi.md#CreateCredential) | **Post** /v1/Credentials | +[**CreateNotification**](DefaultApi.md#CreateNotification) | **Post** /v1/Services/{ServiceSid}/Notifications | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**DeleteBinding**](DefaultApi.md#DeleteBinding) | **Delete** /v1/Services/{ServiceSid}/Bindings/{Sid} | +[**DeleteCredential**](DefaultApi.md#DeleteCredential) | **Delete** /v1/Credentials/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**FetchBinding**](DefaultApi.md#FetchBinding) | **Get** /v1/Services/{ServiceSid}/Bindings/{Sid} | +[**FetchCredential**](DefaultApi.md#FetchCredential) | **Get** /v1/Credentials/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**ListBinding**](DefaultApi.md#ListBinding) | **Get** /v1/Services/{ServiceSid}/Bindings | +[**ListCredential**](DefaultApi.md#ListCredential) | **Get** /v1/Credentials | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**UpdateCredential**](DefaultApi.md#UpdateCredential) | **Post** /v1/Credentials/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | + + + +## CreateBinding + +> NotifyV1ServiceBinding CreateBinding(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under. | + **optional** | ***CreateBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Address** | **optional.String**| The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. | + **BindingType** | **optional.String**| The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`. | + **CredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. | + **Endpoint** | **optional.String**| Deprecated. | + **Identity** | **optional.String**| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. | + **NotificationProtocolVersion** | **optional.String**| The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. | + **Tag** | [**optional.Interface of []string**](string.md)| A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. | + +### Return type + +[**NotifyV1ServiceBinding**](notify.v1.service.binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCredential + +> NotifyV1Credential CreateCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ApiKey** | **optional.String**| [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | + **Certificate** | **optional.String**| [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | + **Type** | **optional.String**| The Credential type. Can be: `gcm`, `fcm`, or `apn`. | + +### Return type + +[**NotifyV1Credential**](notify.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNotification + +> NotifyV1ServiceNotification CreateNotification(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under. | + **optional** | ***CreateNotificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateNotificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Action** | **optional.String**| The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. | + **Alexa** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Deprecated. | + **Apn** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. | + **Body** | **optional.String**| The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. | + **DeliveryCallbackUrl** | **optional.String**| URL to send webhooks. | + **FacebookMessenger** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Deprecated. | + **Fcm** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. | + **Gcm** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). | + **Identity** | [**optional.Interface of []string**](string.md)| The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. | + **Priority** | **optional.String**| The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property. | + **Segment** | [**optional.Interface of []string**](string.md)| The Segment resource is deprecated. Use the `tag` parameter, instead. | + **Sms** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. | + **Sound** | **optional.String**| The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. | + **Tag** | [**optional.Interface of []string**](string.md)| A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. | + **Title** | **optional.String**| The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. | + **ToBinding** | [**optional.Interface of []string**](string.md)| The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. | + **Ttl** | **optional.Int32**| How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. | + +### Return type + +[**NotifyV1ServiceNotification**](notify.v1.service.notification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> NotifyV1Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AlexaSkillId** | **optional.String**| Deprecated. | + **ApnCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. | + **DefaultAlexaNotificationProtocolVersion** | **optional.String**| Deprecated. | + **DefaultApnNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DefaultFcmNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DefaultGcmNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DeliveryCallbackEnabled** | **optional.Bool**| Callback configuration that enables delivery callbacks, default false | + **DeliveryCallbackUrl** | **optional.String**| URL to send delivery status callback. | + **FacebookMessengerPageId** | **optional.String**| Deprecated. | + **FcmCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **GcmCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. | + **LogEnabled** | **optional.Bool**| Whether to log notifications. Can be: `true` or `false` and the default is `true`. | + **MessagingServiceSid** | **optional.String**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. | + +### Return type + +[**NotifyV1Service**](notify.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBinding + +> DeleteBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to delete the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Binding resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBinding + +> NotifyV1ServiceBinding FetchBinding(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Binding resource to fetch. | + +### Return type + +[**NotifyV1ServiceBinding**](notify.v1.service.binding.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredential + +> NotifyV1Credential FetchCredential(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to fetch. | + +### Return type + +[**NotifyV1Credential**](notify.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> NotifyV1Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to fetch. | + +### Return type + +[**NotifyV1Service**](notify.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBinding + +> ListBindingResponse ListBinding(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to read the resource from. | + **optional** | ***ListBindingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBindingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **StartDate** | **optional.Time**| Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. | + **Identity** | [**optional.Interface of []string**](string.md)| The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. | + **Tag** | [**optional.Interface of []string**](string.md)| Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBindingResponse**](ListBindingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredential + +> ListCredentialResponse ListCredential(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialResponse**](ListCredentialResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| The string that identifies the Service resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCredential + +> NotifyV1Credential UpdateCredential(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Credential resource to update. | + **optional** | ***UpdateCredentialOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCredentialOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ApiKey** | **optional.String**| [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | + **Certificate** | **optional.String**| [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **PrivateKey** | **optional.String**| [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----` | + **Sandbox** | **optional.Bool**| [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | + **Secret** | **optional.String**| [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | + +### Return type + +[**NotifyV1Credential**](notify.v1.credential.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> NotifyV1Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AlexaSkillId** | **optional.String**| Deprecated. | + **ApnCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. | + **DefaultAlexaNotificationProtocolVersion** | **optional.String**| Deprecated. | + **DefaultApnNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DefaultFcmNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DefaultGcmNotificationProtocolVersion** | **optional.String**| The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | + **DeliveryCallbackEnabled** | **optional.Bool**| Callback configuration that enables delivery callbacks, default false | + **DeliveryCallbackUrl** | **optional.String**| URL to send delivery status callback. | + **FacebookMessengerPageId** | **optional.String**| Deprecated. | + **FcmCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **GcmCredentialSid** | **optional.String**| The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. | + **LogEnabled** | **optional.Bool**| Whether to log notifications. Can be: `true` or `false` and the default is `true`. | + **MessagingServiceSid** | **optional.String**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. | + +### Return type + +[**NotifyV1Service**](notify.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/notify/v1/docs/ListBindingResponse.md b/rest/notify/v1/docs/ListBindingResponse.md new file mode 100644 index 000000000..1720bc3bd --- /dev/null +++ b/rest/notify/v1/docs/ListBindingResponse.md @@ -0,0 +1,12 @@ +# ListBindingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bindings** | [**[]NotifyV1ServiceBinding**](notify.v1.service.binding.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/ListCredentialResponse.md b/rest/notify/v1/docs/ListCredentialResponse.md new file mode 100644 index 000000000..fd50d66ee --- /dev/null +++ b/rest/notify/v1/docs/ListCredentialResponse.md @@ -0,0 +1,12 @@ +# ListCredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credentials** | [**[]NotifyV1Credential**](notify.v1.credential.md) | | [optional] +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/ListCredentialResponseMeta.md b/rest/notify/v1/docs/ListCredentialResponseMeta.md new file mode 100644 index 000000000..20d8e9381 --- /dev/null +++ b/rest/notify/v1/docs/ListCredentialResponseMeta.md @@ -0,0 +1,17 @@ +# ListCredentialResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/ListServiceResponse.md b/rest/notify/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..db8835dc6 --- /dev/null +++ b/rest/notify/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCredentialResponseMeta**](ListCredentialResponse_meta.md) | | [optional] +**Services** | [**[]NotifyV1Service**](notify.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/NotifyV1Credential.md b/rest/notify/v1/docs/NotifyV1Credential.md new file mode 100644 index 000000000..f24f89b45 --- /dev/null +++ b/rest/notify/v1/docs/NotifyV1Credential.md @@ -0,0 +1,18 @@ +# NotifyV1Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sandbox** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/NotifyV1Service.md b/rest/notify/v1/docs/NotifyV1Service.md new file mode 100644 index 000000000..c8d800b40 --- /dev/null +++ b/rest/notify/v1/docs/NotifyV1Service.md @@ -0,0 +1,30 @@ +# NotifyV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AlexaSkillId** | **string** | | [optional] +**ApnCredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultAlexaNotificationProtocolVersion** | **string** | | [optional] +**DefaultApnNotificationProtocolVersion** | **string** | | [optional] +**DefaultFcmNotificationProtocolVersion** | **string** | | [optional] +**DefaultGcmNotificationProtocolVersion** | **string** | | [optional] +**DeliveryCallbackEnabled** | **bool** | | [optional] +**DeliveryCallbackUrl** | **string** | | [optional] +**FacebookMessengerPageId** | **string** | | [optional] +**FcmCredentialSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**GcmCredentialSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**LogEnabled** | **bool** | | [optional] +**MessagingServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/NotifyV1ServiceBinding.md b/rest/notify/v1/docs/NotifyV1ServiceBinding.md new file mode 100644 index 000000000..5ded80e59 --- /dev/null +++ b/rest/notify/v1/docs/NotifyV1ServiceBinding.md @@ -0,0 +1,24 @@ +# NotifyV1ServiceBinding + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Address** | **string** | | [optional] +**BindingType** | **string** | | [optional] +**CredentialSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Endpoint** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**NotificationProtocolVersion** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Tags** | **[]string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/NotifyV1ServiceNotification.md b/rest/notify/v1/docs/NotifyV1ServiceNotification.md new file mode 100644 index 000000000..47aa439f1 --- /dev/null +++ b/rest/notify/v1/docs/NotifyV1ServiceNotification.md @@ -0,0 +1,30 @@ +# NotifyV1ServiceNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Action** | **string** | | [optional] +**Alexa** | [**map[string]interface{}**](.md) | | [optional] +**Apn** | [**map[string]interface{}**](.md) | | [optional] +**Body** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**FacebookMessenger** | [**map[string]interface{}**](.md) | | [optional] +**Fcm** | [**map[string]interface{}**](.md) | | [optional] +**Gcm** | [**map[string]interface{}**](.md) | | [optional] +**Identities** | **[]string** | | [optional] +**Priority** | **string** | | [optional] +**Segments** | **[]string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Sms** | [**map[string]interface{}**](.md) | | [optional] +**Sound** | **string** | | [optional] +**Tags** | **[]string** | | [optional] +**Title** | **string** | | [optional] +**Ttl** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/UpdateCredentialRequest.md b/rest/notify/v1/docs/UpdateCredentialRequest.md new file mode 100644 index 000000000..ed5e1ec86 --- /dev/null +++ b/rest/notify/v1/docs/UpdateCredentialRequest.md @@ -0,0 +1,16 @@ +# UpdateCredentialRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | [optional] +**Certificate** | **string** | [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**PrivateKey** | **string** | [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\n.-----END RSA PRIVATE KEY-----` | [optional] +**Sandbox** | **bool** | [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. | [optional] +**Secret** | **string** | [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/docs/UpdateServiceRequest.md b/rest/notify/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..33925af72 --- /dev/null +++ b/rest/notify/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,24 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlexaSkillId** | **string** | Deprecated. | [optional] +**ApnCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. | [optional] +**DefaultAlexaNotificationProtocolVersion** | **string** | Deprecated. | [optional] +**DefaultApnNotificationProtocolVersion** | **string** | The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DefaultFcmNotificationProtocolVersion** | **string** | The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DefaultGcmNotificationProtocolVersion** | **string** | The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. | [optional] +**DeliveryCallbackEnabled** | **bool** | Callback configuration that enables delivery callbacks, default false | [optional] +**DeliveryCallbackUrl** | **string** | URL to send delivery status callback. | [optional] +**FacebookMessengerPageId** | **string** | Deprecated. | [optional] +**FcmCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**GcmCredentialSid** | **string** | The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. | [optional] +**LogEnabled** | **bool** | Whether to log notifications. Can be: `true` or `false` and the default is `true`. | [optional] +**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/notify/v1/model_create_binding_request.go b/rest/notify/v1/model_create_binding_request.go new file mode 100644 index 000000000..4b7ad0469 --- /dev/null +++ b/rest/notify/v1/model_create_binding_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateBindingRequest struct for CreateBindingRequest +type CreateBindingRequest struct { + // The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format. + Address string `json:"Address"` + // The transport technology to use for the Binding. Can be: `apn`, `fcm`, `gcm`, `sms`, or `facebook-messenger`. + BindingType string `json:"BindingType"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings. + CredentialSid string `json:"CredentialSid,omitempty"` + // Deprecated. + Endpoint string `json:"Endpoint,omitempty"` + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service. + Identity string `json:"Identity"` + // The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\"3\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed. + NotificationProtocolVersion string `json:"NotificationProtocolVersion,omitempty"` + // A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags. + Tag []string `json:"Tag,omitempty"` +} diff --git a/rest/notify/v1/model_create_credential_request.go b/rest/notify/v1/model_create_credential_request.go new file mode 100644 index 000000000..e94f2795d --- /dev/null +++ b/rest/notify/v1/model_create_credential_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialRequest struct for CreateCredentialRequest +type CreateCredentialRequest struct { + // [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\n.-----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` + // The Credential type. Can be: `gcm`, `fcm`, or `apn`. + Type string `json:"Type"` +} diff --git a/rest/notify/v1/model_create_notification_request.go b/rest/notify/v1/model_create_notification_request.go new file mode 100644 index 000000000..e40c88740 --- /dev/null +++ b/rest/notify/v1/model_create_notification_request.go @@ -0,0 +1,50 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateNotificationRequest struct for CreateNotificationRequest +type CreateNotificationRequest struct { + // The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels. + Action string `json:"Action,omitempty"` + // Deprecated. + Alexa map[string]interface{} `json:"Alexa,omitempty"` + // The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. + Apn map[string]interface{} `json:"Apn,omitempty"` + // The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification. + Body string `json:"Body,omitempty"` + // The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels. + Data map[string]interface{} `json:"Data,omitempty"` + // URL to send webhooks. + DeliveryCallbackUrl string `json:"DeliveryCallbackUrl,omitempty"` + // Deprecated. + FacebookMessenger map[string]interface{} `json:"FacebookMessenger,omitempty"` + // The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel. + Fcm map[string]interface{} `json:"Fcm,omitempty"` + // The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). + Gcm map[string]interface{} `json:"Gcm,omitempty"` + // The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list. + Identity []string `json:"Identity,omitempty"` + // The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property. + Priority string `json:"Priority,omitempty"` + // The Segment resource is deprecated. Use the `tag` parameter, instead. + Segment []string `json:"Segment,omitempty"` + // The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. + Sms map[string]interface{} `json:"Sms,omitempty"` + // The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property. + Sound string `json:"Sound,omitempty"` + // A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel. + Tag []string `json:"Tag,omitempty"` + // The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices. + Title string `json:"Title,omitempty"` + // The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers. + ToBinding []string `json:"ToBinding,omitempty"` + // How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/notify/v1/model_create_service_request.go b/rest/notify/v1/model_create_service_request.go new file mode 100644 index 000000000..5eec70177 --- /dev/null +++ b/rest/notify/v1/model_create_service_request.go @@ -0,0 +1,42 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // Deprecated. + AlexaSkillId string `json:"AlexaSkillId,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. + ApnCredentialSid string `json:"ApnCredentialSid,omitempty"` + // Deprecated. + DefaultAlexaNotificationProtocolVersion string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultApnNotificationProtocolVersion string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultFcmNotificationProtocolVersion string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultGcmNotificationProtocolVersion string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + // Callback configuration that enables delivery callbacks, default false + DeliveryCallbackEnabled bool `json:"DeliveryCallbackEnabled,omitempty"` + // URL to send delivery status callback. + DeliveryCallbackUrl string `json:"DeliveryCallbackUrl,omitempty"` + // Deprecated. + FacebookMessengerPageId string `json:"FacebookMessengerPageId,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. + FcmCredentialSid string `json:"FcmCredentialSid,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. + GcmCredentialSid string `json:"GcmCredentialSid,omitempty"` + // Whether to log notifications. Can be: `true` or `false` and the default is `true`. + LogEnabled bool `json:"LogEnabled,omitempty"` + // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` +} diff --git a/rest/notify/v1/model_list_binding_response.go b/rest/notify/v1/model_list_binding_response.go new file mode 100644 index 000000000..75c8ea0f7 --- /dev/null +++ b/rest/notify/v1/model_list_binding_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBindingResponse struct for ListBindingResponse +type ListBindingResponse struct { + Bindings []NotifyV1ServiceBinding `json:"Bindings,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/notify/v1/model_list_credential_response.go b/rest/notify/v1/model_list_credential_response.go new file mode 100644 index 000000000..649b7eff2 --- /dev/null +++ b/rest/notify/v1/model_list_credential_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponse struct for ListCredentialResponse +type ListCredentialResponse struct { + Credentials []NotifyV1Credential `json:"Credentials,omitempty"` + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/notify/v1/model_list_credential_response_meta.go b/rest/notify/v1/model_list_credential_response_meta.go new file mode 100644 index 000000000..15184f1d8 --- /dev/null +++ b/rest/notify/v1/model_list_credential_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialResponseMeta struct for ListCredentialResponseMeta +type ListCredentialResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/notify/v1/model_list_service_response.go b/rest/notify/v1/model_list_service_response.go new file mode 100644 index 000000000..d7cec6258 --- /dev/null +++ b/rest/notify/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListCredentialResponseMeta `json:"Meta,omitempty"` + Services []NotifyV1Service `json:"Services,omitempty"` +} diff --git a/rest/notify/v1/model_notify_v1_credential.go b/rest/notify/v1/model_notify_v1_credential.go new file mode 100644 index 000000000..d061179e3 --- /dev/null +++ b/rest/notify/v1/model_notify_v1_credential.go @@ -0,0 +1,25 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NotifyV1Credential struct for NotifyV1Credential +type NotifyV1Credential struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sandbox string `json:"Sandbox,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/notify/v1/model_notify_v1_service.go b/rest/notify/v1/model_notify_v1_service.go new file mode 100644 index 000000000..1778124a2 --- /dev/null +++ b/rest/notify/v1/model_notify_v1_service.go @@ -0,0 +1,37 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NotifyV1Service struct for NotifyV1Service +type NotifyV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + AlexaSkillId string `json:"AlexaSkillId,omitempty"` + ApnCredentialSid string `json:"ApnCredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultAlexaNotificationProtocolVersion string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + DefaultApnNotificationProtocolVersion string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + DefaultFcmNotificationProtocolVersion string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + DefaultGcmNotificationProtocolVersion string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + DeliveryCallbackEnabled bool `json:"DeliveryCallbackEnabled,omitempty"` + DeliveryCallbackUrl string `json:"DeliveryCallbackUrl,omitempty"` + FacebookMessengerPageId string `json:"FacebookMessengerPageId,omitempty"` + FcmCredentialSid string `json:"FcmCredentialSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + GcmCredentialSid string `json:"GcmCredentialSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LogEnabled bool `json:"LogEnabled,omitempty"` + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/notify/v1/model_notify_v1_service_binding.go b/rest/notify/v1/model_notify_v1_service_binding.go new file mode 100644 index 000000000..e864221eb --- /dev/null +++ b/rest/notify/v1/model_notify_v1_service_binding.go @@ -0,0 +1,31 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NotifyV1ServiceBinding struct for NotifyV1ServiceBinding +type NotifyV1ServiceBinding struct { + AccountSid string `json:"AccountSid,omitempty"` + Address string `json:"Address,omitempty"` + BindingType string `json:"BindingType,omitempty"` + CredentialSid string `json:"CredentialSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Endpoint string `json:"Endpoint,omitempty"` + Identity string `json:"Identity,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + NotificationProtocolVersion string `json:"NotificationProtocolVersion,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Tags []string `json:"Tags,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/notify/v1/model_notify_v1_service_notification.go b/rest/notify/v1/model_notify_v1_service_notification.go new file mode 100644 index 000000000..15f5799ea --- /dev/null +++ b/rest/notify/v1/model_notify_v1_service_notification.go @@ -0,0 +1,37 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NotifyV1ServiceNotification struct for NotifyV1ServiceNotification +type NotifyV1ServiceNotification struct { + AccountSid string `json:"AccountSid,omitempty"` + Action string `json:"Action,omitempty"` + Alexa map[string]interface{} `json:"Alexa,omitempty"` + Apn map[string]interface{} `json:"Apn,omitempty"` + Body string `json:"Body,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + FacebookMessenger map[string]interface{} `json:"FacebookMessenger,omitempty"` + Fcm map[string]interface{} `json:"Fcm,omitempty"` + Gcm map[string]interface{} `json:"Gcm,omitempty"` + Identities []string `json:"Identities,omitempty"` + Priority string `json:"Priority,omitempty"` + Segments []string `json:"Segments,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Sms map[string]interface{} `json:"Sms,omitempty"` + Sound string `json:"Sound,omitempty"` + Tags []string `json:"Tags,omitempty"` + Title string `json:"Title,omitempty"` + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/notify/v1/model_update_credential_request.go b/rest/notify/v1/model_update_credential_request.go new file mode 100644 index 000000000..dcd82d8f7 --- /dev/null +++ b/rest/notify/v1/model_update_credential_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCredentialRequest struct for UpdateCredentialRequest +type UpdateCredentialRequest struct { + // [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + ApiKey string `json:"ApiKey,omitempty"` + // [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----` + Certificate string `json:"Certificate,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\n.-----END RSA PRIVATE KEY-----` + PrivateKey string `json:"PrivateKey,omitempty"` + // [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production. + Sandbox bool `json:"Sandbox,omitempty"` + // [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging. + Secret string `json:"Secret,omitempty"` +} diff --git a/rest/notify/v1/model_update_service_request.go b/rest/notify/v1/model_update_service_request.go new file mode 100644 index 000000000..79ba68e43 --- /dev/null +++ b/rest/notify/v1/model_update_service_request.go @@ -0,0 +1,42 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // Deprecated. + AlexaSkillId string `json:"AlexaSkillId,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings. + ApnCredentialSid string `json:"ApnCredentialSid,omitempty"` + // Deprecated. + DefaultAlexaNotificationProtocolVersion string `json:"DefaultAlexaNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultApnNotificationProtocolVersion string `json:"DefaultApnNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultFcmNotificationProtocolVersion string `json:"DefaultFcmNotificationProtocolVersion,omitempty"` + // The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource. + DefaultGcmNotificationProtocolVersion string `json:"DefaultGcmNotificationProtocolVersion,omitempty"` + // Callback configuration that enables delivery callbacks, default false + DeliveryCallbackEnabled bool `json:"DeliveryCallbackEnabled,omitempty"` + // URL to send delivery status callback. + DeliveryCallbackUrl string `json:"DeliveryCallbackUrl,omitempty"` + // Deprecated. + FacebookMessengerPageId string `json:"FacebookMessengerPageId,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings. + FcmCredentialSid string `json:"FcmCredentialSid,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings. + GcmCredentialSid string `json:"GcmCredentialSid,omitempty"` + // Whether to log notifications. Can be: `true` or `false` and the default is `true`. + LogEnabled bool `json:"LogEnabled,omitempty"` + // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications. + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` +} diff --git a/rest/notify/v1/response.go b/rest/notify/v1/response.go new file mode 100644 index 000000000..9a82b4595 --- /dev/null +++ b/rest/notify/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Notify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/numbers/v2/.openapi-generator-ignore b/rest/numbers/v2/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/numbers/v2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/numbers/v2/README.md b/rest/numbers/v2/README.md new file mode 100644 index 000000000..37fe5a9d3 --- /dev/null +++ b/rest/numbers/v2/README.md @@ -0,0 +1,114 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateBundle**](docs/DefaultApi.md#createbundle) | **Post** /v2/RegulatoryCompliance/Bundles | +*DefaultApi* | [**CreateEndUser**](docs/DefaultApi.md#createenduser) | **Post** /v2/RegulatoryCompliance/EndUsers | +*DefaultApi* | [**CreateEvaluation**](docs/DefaultApi.md#createevaluation) | **Post** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations | +*DefaultApi* | [**CreateItemAssignment**](docs/DefaultApi.md#createitemassignment) | **Post** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments | +*DefaultApi* | [**CreateSupportingDocument**](docs/DefaultApi.md#createsupportingdocument) | **Post** /v2/RegulatoryCompliance/SupportingDocuments | +*DefaultApi* | [**DeleteBundle**](docs/DefaultApi.md#deletebundle) | **Delete** /v2/RegulatoryCompliance/Bundles/{Sid} | +*DefaultApi* | [**DeleteEndUser**](docs/DefaultApi.md#deleteenduser) | **Delete** /v2/RegulatoryCompliance/EndUsers/{Sid} | +*DefaultApi* | [**DeleteItemAssignment**](docs/DefaultApi.md#deleteitemassignment) | **Delete** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid} | +*DefaultApi* | [**DeleteSupportingDocument**](docs/DefaultApi.md#deletesupportingdocument) | **Delete** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | +*DefaultApi* | [**FetchBundle**](docs/DefaultApi.md#fetchbundle) | **Get** /v2/RegulatoryCompliance/Bundles/{Sid} | +*DefaultApi* | [**FetchEndUser**](docs/DefaultApi.md#fetchenduser) | **Get** /v2/RegulatoryCompliance/EndUsers/{Sid} | +*DefaultApi* | [**FetchEndUserType**](docs/DefaultApi.md#fetchendusertype) | **Get** /v2/RegulatoryCompliance/EndUserTypes/{Sid} | +*DefaultApi* | [**FetchEvaluation**](docs/DefaultApi.md#fetchevaluation) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid} | +*DefaultApi* | [**FetchItemAssignment**](docs/DefaultApi.md#fetchitemassignment) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid} | +*DefaultApi* | [**FetchRegulation**](docs/DefaultApi.md#fetchregulation) | **Get** /v2/RegulatoryCompliance/Regulations/{Sid} | +*DefaultApi* | [**FetchSupportingDocument**](docs/DefaultApi.md#fetchsupportingdocument) | **Get** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | +*DefaultApi* | [**FetchSupportingDocumentType**](docs/DefaultApi.md#fetchsupportingdocumenttype) | **Get** /v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid} | +*DefaultApi* | [**ListBundle**](docs/DefaultApi.md#listbundle) | **Get** /v2/RegulatoryCompliance/Bundles | +*DefaultApi* | [**ListEndUser**](docs/DefaultApi.md#listenduser) | **Get** /v2/RegulatoryCompliance/EndUsers | +*DefaultApi* | [**ListEndUserType**](docs/DefaultApi.md#listendusertype) | **Get** /v2/RegulatoryCompliance/EndUserTypes | +*DefaultApi* | [**ListEvaluation**](docs/DefaultApi.md#listevaluation) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations | +*DefaultApi* | [**ListItemAssignment**](docs/DefaultApi.md#listitemassignment) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments | +*DefaultApi* | [**ListRegulation**](docs/DefaultApi.md#listregulation) | **Get** /v2/RegulatoryCompliance/Regulations | +*DefaultApi* | [**ListSupportingDocument**](docs/DefaultApi.md#listsupportingdocument) | **Get** /v2/RegulatoryCompliance/SupportingDocuments | +*DefaultApi* | [**ListSupportingDocumentType**](docs/DefaultApi.md#listsupportingdocumenttype) | **Get** /v2/RegulatoryCompliance/SupportingDocumentTypes | +*DefaultApi* | [**UpdateBundle**](docs/DefaultApi.md#updatebundle) | **Post** /v2/RegulatoryCompliance/Bundles/{Sid} | +*DefaultApi* | [**UpdateEndUser**](docs/DefaultApi.md#updateenduser) | **Post** /v2/RegulatoryCompliance/EndUsers/{Sid} | +*DefaultApi* | [**UpdateSupportingDocument**](docs/DefaultApi.md#updatesupportingdocument) | **Post** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | + + +## Documentation For Models + + - [CreateBundleRequest](docs/CreateBundleRequest.md) + - [CreateEndUserRequest](docs/CreateEndUserRequest.md) + - [CreateItemAssignmentRequest](docs/CreateItemAssignmentRequest.md) + - [CreateSupportingDocumentRequest](docs/CreateSupportingDocumentRequest.md) + - [ListBundleResponse](docs/ListBundleResponse.md) + - [ListBundleResponseMeta](docs/ListBundleResponseMeta.md) + - [ListEndUserResponse](docs/ListEndUserResponse.md) + - [ListEndUserTypeResponse](docs/ListEndUserTypeResponse.md) + - [ListEvaluationResponse](docs/ListEvaluationResponse.md) + - [ListItemAssignmentResponse](docs/ListItemAssignmentResponse.md) + - [ListRegulationResponse](docs/ListRegulationResponse.md) + - [ListSupportingDocumentResponse](docs/ListSupportingDocumentResponse.md) + - [ListSupportingDocumentTypeResponse](docs/ListSupportingDocumentTypeResponse.md) + - [NumbersV2RegulatoryComplianceBundle](docs/NumbersV2RegulatoryComplianceBundle.md) + - [NumbersV2RegulatoryComplianceBundleEvaluation](docs/NumbersV2RegulatoryComplianceBundleEvaluation.md) + - [NumbersV2RegulatoryComplianceBundleItemAssignment](docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md) + - [NumbersV2RegulatoryComplianceEndUser](docs/NumbersV2RegulatoryComplianceEndUser.md) + - [NumbersV2RegulatoryComplianceEndUserType](docs/NumbersV2RegulatoryComplianceEndUserType.md) + - [NumbersV2RegulatoryComplianceRegulation](docs/NumbersV2RegulatoryComplianceRegulation.md) + - [NumbersV2RegulatoryComplianceSupportingDocument](docs/NumbersV2RegulatoryComplianceSupportingDocument.md) + - [NumbersV2RegulatoryComplianceSupportingDocumentType](docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md) + - [UpdateBundleRequest](docs/UpdateBundleRequest.md) + - [UpdateEndUserRequest](docs/UpdateEndUserRequest.md) + - [UpdateSupportingDocumentRequest](docs/UpdateSupportingDocumentRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/numbers/v2/api_default.go b/rest/numbers/v2/api_default.go new file mode 100644 index 000000000..3a2e30815 --- /dev/null +++ b/rest/numbers/v2/api_default.go @@ -0,0 +1,1136 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://numbers.twilio.com"), + } +} +// CreateBundleParams Optional parameters for the method 'CreateBundle' +type CreateBundleParams struct { + Email *string `json:"Email,omitempty"` + EndUserType *string `json:"EndUserType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + RegulationSid *string `json:"RegulationSid,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` +} + +/* +CreateBundle Method for CreateBundle +Create a new Bundle. + * @param optional nil or *CreateBundleOpts - Optional Parameters: + * @param "Email" (string) - The email address that will receive updates when the Bundle resource changes status. + * @param "EndUserType" (string) - The type of End User of the Bundle resource. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "IsoCountry" (string) - The ISO country code of the Bundle's phone number country ownership request. + * @param "NumberType" (string) - The type of phone number of the Bundle's ownership request. + * @param "RegulationSid" (string) - The unique string of a regulation that is associated to the Bundle resource. + * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. +@return NumbersV2RegulatoryComplianceBundle +*/ +func (c *DefaultApiService) CreateBundle(params *CreateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { + path := "/v2/RegulatoryCompliance/Bundles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateEndUserParams Optional parameters for the method 'CreateEndUser' +type CreateEndUserParams struct { + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateEndUser Method for CreateEndUser +Create a new End User. + * @param optional nil or *CreateEndUserOpts - Optional Parameters: + * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "Type" (string) - The type of end user of the Bundle resource - can be `individual` or `business`. +@return NumbersV2RegulatoryComplianceEndUser +*/ +func (c *DefaultApiService) CreateEndUser(params *CreateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { + path := "/v2/RegulatoryCompliance/EndUsers" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) + + if err != nil { + return nil, err + } + + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +CreateEvaluation Method for CreateEvaluation + * @param BundleSid +@return NumbersV2RegulatoryComplianceBundleEvaluation +*/ +func (c *DefaultApiService) CreateEvaluation(BundleSid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateItemAssignmentParams Optional parameters for the method 'CreateItemAssignment' +type CreateItemAssignmentParams struct { + ObjectSid *string `json:"ObjectSid,omitempty"` +} + +/* +CreateItemAssignment Method for CreateItemAssignment +Create a new Assigned Item. + * @param BundleSid The unique string that we created to identify the Bundle resource. + * @param optional nil or *CreateItemAssignmentOpts - Optional Parameters: + * @param "ObjectSid" (string) - The SID of an object bag that holds information of the different items. +@return NumbersV2RegulatoryComplianceBundleItemAssignment +*/ +func (c *DefaultApiService) CreateItemAssignment(BundleSid string, params *CreateItemAssignmentParams) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ObjectSid != nil { + data.Set("ObjectSid", *params.ObjectSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSupportingDocumentParams Optional parameters for the method 'CreateSupportingDocument' +type CreateSupportingDocumentParams struct { + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Type *string `json:"Type,omitempty"` +} + +/* +CreateSupportingDocument Method for CreateSupportingDocument +Create a new Supporting Document. + * @param optional nil or *CreateSupportingDocumentOpts - Optional Parameters: + * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "Type" (string) - The type of the Supporting Document. +@return NumbersV2RegulatoryComplianceSupportingDocument +*/ +func (c *DefaultApiService) CreateSupportingDocument(params *CreateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) + + if err != nil { + return nil, err + } + + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteBundle Method for DeleteBundle +Delete a specific Bundle. + * @param Sid The unique string that we created to identify the Bundle resource. +*/ +func (c *DefaultApiService) DeleteBundle(Sid string) (error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteEndUser Method for DeleteEndUser +Delete a specific End User. + * @param Sid The unique string created by Twilio to identify the End User resource. +*/ +func (c *DefaultApiService) DeleteEndUser(Sid string) (error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteItemAssignment Method for DeleteItemAssignment +Remove an Assignment Item Instance. + * @param BundleSid The unique string that we created to identify the Bundle resource. + * @param Sid The unique string that we created to identify the Identity resource. +*/ +func (c *DefaultApiService) DeleteItemAssignment(BundleSid string, Sid string) (error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSupportingDocument Method for DeleteSupportingDocument +Delete a specific Supporting Document. + * @param Sid The unique string created by Twilio to identify the Supporting Document resource. +*/ +func (c *DefaultApiService) DeleteSupportingDocument(Sid string) (error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchBundle Method for FetchBundle +Fetch a specific Bundle instance. + * @param Sid The unique string that we created to identify the Bundle resource. +@return NumbersV2RegulatoryComplianceBundle +*/ +func (c *DefaultApiService) FetchBundle(Sid string) (*NumbersV2RegulatoryComplianceBundle, error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEndUser Method for FetchEndUser +Fetch specific End User Instance. + * @param Sid The unique string created by Twilio to identify the End User resource. +@return NumbersV2RegulatoryComplianceEndUser +*/ +func (c *DefaultApiService) FetchEndUser(Sid string) (*NumbersV2RegulatoryComplianceEndUser, error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEndUserType Method for FetchEndUserType +Fetch a specific End-User Type Instance. + * @param Sid The unique string that identifies the End-User Type resource. +@return NumbersV2RegulatoryComplianceEndUserType +*/ +func (c *DefaultApiService) FetchEndUserType(Sid string) (*NumbersV2RegulatoryComplianceEndUserType, error) { + path := "/v2/RegulatoryCompliance/EndUserTypes/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUserType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEvaluation Method for FetchEvaluation +Fetch specific Evaluation Instance. + * @param BundleSid The unique string that we created to identify the Bundle resource. + * @param Sid The unique string that identifies the Evaluation resource. +@return NumbersV2RegulatoryComplianceBundleEvaluation +*/ +func (c *DefaultApiService) FetchEvaluation(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleEvaluation, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid}" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundleEvaluation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchItemAssignment Method for FetchItemAssignment +Fetch specific Assigned Item Instance. + * @param BundleSid The unique string that we created to identify the Bundle resource. + * @param Sid The unique string that we created to identify the Identity resource. +@return NumbersV2RegulatoryComplianceBundleItemAssignment +*/ +func (c *DefaultApiService) FetchItemAssignment(BundleSid string, Sid string) (*NumbersV2RegulatoryComplianceBundleItemAssignment, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid}" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundleItemAssignment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRegulation Method for FetchRegulation +Fetch specific Regulation Instance. + * @param Sid The unique string that identifies the Regulation resource. +@return NumbersV2RegulatoryComplianceRegulation +*/ +func (c *DefaultApiService) FetchRegulation(Sid string) (*NumbersV2RegulatoryComplianceRegulation, error) { + path := "/v2/RegulatoryCompliance/Regulations/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceRegulation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSupportingDocument Method for FetchSupportingDocument +Fetch specific Supporting Document Instance. + * @param Sid The unique string created by Twilio to identify the Supporting Document resource. +@return NumbersV2RegulatoryComplianceSupportingDocument +*/ +func (c *DefaultApiService) FetchSupportingDocument(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSupportingDocumentType Method for FetchSupportingDocumentType +Fetch a specific Supporting Document Type Instance. + * @param Sid The unique string that identifies the Supporting Document Type resource. +@return NumbersV2RegulatoryComplianceSupportingDocumentType +*/ +func (c *DefaultApiService) FetchSupportingDocumentType(Sid string) (*NumbersV2RegulatoryComplianceSupportingDocumentType, error) { + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocumentType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBundleParams Optional parameters for the method 'ListBundle' +type ListBundleParams struct { + Status *string `json:"Status,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RegulationSid *string `json:"RegulationSid,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBundle Method for ListBundle +Retrieve a list of all Bundles for an account. + * @param optional nil or *ListBundleOpts - Optional Parameters: + * @param "Status" (string) - The verification status of the Bundle resource. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "RegulationSid" (string) - The unique string of a regulation that is associated to the Bundle resource. + * @param "IsoCountry" (string) - The ISO country code of the Bundle's phone number country ownership request. + * @param "NumberType" (string) - The type of phone number of the Bundle's ownership request. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBundleResponse +*/ +func (c *DefaultApiService) ListBundle(params *ListBundleParams) (*ListBundleResponse, error) { + path := "/v2/RegulatoryCompliance/Bundles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RegulationSid != nil { + data.Set("RegulationSid", *params.RegulationSid) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBundleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEndUserParams Optional parameters for the method 'ListEndUser' +type ListEndUserParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEndUser Method for ListEndUser +Retrieve a list of all End User for an account. + * @param optional nil or *ListEndUserOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEndUserResponse +*/ +func (c *DefaultApiService) ListEndUser(params *ListEndUserParams) (*ListEndUserResponse, error) { + path := "/v2/RegulatoryCompliance/EndUsers" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEndUserResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEndUserTypeParams Optional parameters for the method 'ListEndUserType' +type ListEndUserTypeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEndUserType Method for ListEndUserType +Retrieve a list of all End-User Types. + * @param optional nil or *ListEndUserTypeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEndUserTypeResponse +*/ +func (c *DefaultApiService) ListEndUserType(params *ListEndUserTypeParams) (*ListEndUserTypeResponse, error) { + path := "/v2/RegulatoryCompliance/EndUserTypes" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEndUserTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEvaluationParams Optional parameters for the method 'ListEvaluation' +type ListEvaluationParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEvaluation Method for ListEvaluation +Retrieve a list of Evaluations associated to the Bundle resource. + * @param BundleSid + * @param optional nil or *ListEvaluationOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEvaluationResponse +*/ +func (c *DefaultApiService) ListEvaluation(BundleSid string, params *ListEvaluationParams) (*ListEvaluationResponse, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEvaluationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListItemAssignmentParams Optional parameters for the method 'ListItemAssignment' +type ListItemAssignmentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListItemAssignment Method for ListItemAssignment +Retrieve a list of all Assigned Items for an account. + * @param BundleSid The unique string that we created to identify the Bundle resource. + * @param optional nil or *ListItemAssignmentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListItemAssignmentResponse +*/ +func (c *DefaultApiService) ListItemAssignment(BundleSid string, params *ListItemAssignmentParams) (*ListItemAssignmentResponse, error) { + path := "/v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments" + path = strings.Replace(path, "{"+"BundleSid"+"}", BundleSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListItemAssignmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRegulationParams Optional parameters for the method 'ListRegulation' +type ListRegulationParams struct { + EndUserType *string `json:"EndUserType,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + NumberType *string `json:"NumberType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRegulation Method for ListRegulation +Retrieve a list of all Regulations. + * @param optional nil or *ListRegulationOpts - Optional Parameters: + * @param "EndUserType" (string) - The type of End User the regulation requires - can be `individual` or `business`. + * @param "IsoCountry" (string) - The ISO country code of the phone number's country. + * @param "NumberType" (string) - The type of phone number that the regulatory requiremnt is restricting. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRegulationResponse +*/ +func (c *DefaultApiService) ListRegulation(params *ListRegulationParams) (*ListRegulationResponse, error) { + path := "/v2/RegulatoryCompliance/Regulations" + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndUserType != nil { + data.Set("EndUserType", *params.EndUserType) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.NumberType != nil { + data.Set("NumberType", *params.NumberType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRegulationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSupportingDocumentParams Optional parameters for the method 'ListSupportingDocument' +type ListSupportingDocumentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSupportingDocument Method for ListSupportingDocument +Retrieve a list of all Supporting Document for an account. + * @param optional nil or *ListSupportingDocumentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSupportingDocumentResponse +*/ +func (c *DefaultApiService) ListSupportingDocument(params *ListSupportingDocumentParams) (*ListSupportingDocumentResponse, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSupportingDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSupportingDocumentTypeParams Optional parameters for the method 'ListSupportingDocumentType' +type ListSupportingDocumentTypeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSupportingDocumentType Method for ListSupportingDocumentType +Retrieve a list of all Supporting Document Types. + * @param optional nil or *ListSupportingDocumentTypeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSupportingDocumentTypeResponse +*/ +func (c *DefaultApiService) ListSupportingDocumentType(params *ListSupportingDocumentTypeParams) (*ListSupportingDocumentTypeResponse, error) { + path := "/v2/RegulatoryCompliance/SupportingDocumentTypes" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSupportingDocumentTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateBundleParams Optional parameters for the method 'UpdateBundle' +type UpdateBundleParams struct { + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` +} + +/* +UpdateBundle Method for UpdateBundle +Updates a Bundle in an account. + * @param Sid The unique string that we created to identify the Bundle resource. + * @param optional nil or *UpdateBundleOpts - Optional Parameters: + * @param "Email" (string) - The email address that will receive updates when the Bundle resource changes status. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. + * @param "Status" (string) - The verification status of the Bundle resource. + * @param "StatusCallback" (string) - The URL we call to inform your application of status changes. +@return NumbersV2RegulatoryComplianceBundle +*/ +func (c *DefaultApiService) UpdateBundle(Sid string, params *UpdateBundleParams) (*NumbersV2RegulatoryComplianceBundle, error) { + path := "/v2/RegulatoryCompliance/Bundles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceBundle{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateEndUserParams Optional parameters for the method 'UpdateEndUser' +type UpdateEndUserParams struct { + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateEndUser Method for UpdateEndUser +Update an existing End User. + * @param Sid The unique string created by Twilio to identify the End User resource. + * @param optional nil or *UpdateEndUserOpts - Optional Parameters: + * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the End User resource which are derived End User Types. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. +@return NumbersV2RegulatoryComplianceEndUser +*/ +func (c *DefaultApiService) UpdateEndUser(Sid string, params *UpdateEndUserParams) (*NumbersV2RegulatoryComplianceEndUser, error) { + path := "/v2/RegulatoryCompliance/EndUsers/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) + + if err != nil { + return nil, err + } + + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceEndUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSupportingDocumentParams Optional parameters for the method 'UpdateSupportingDocument' +type UpdateSupportingDocumentParams struct { + Attributes *map[string]interface{} `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateSupportingDocument Method for UpdateSupportingDocument +Update an existing Supporting Document. + * @param Sid The unique string created by Twilio to identify the Supporting Document resource. + * @param optional nil or *UpdateSupportingDocumentOpts - Optional Parameters: + * @param "Attributes" (map[string]interface{}) - The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. + * @param "FriendlyName" (string) - The string that you assigned to describe the resource. +@return NumbersV2RegulatoryComplianceSupportingDocument +*/ +func (c *DefaultApiService) UpdateSupportingDocument(Sid string, params *UpdateSupportingDocumentParams) (*NumbersV2RegulatoryComplianceSupportingDocument, error) { + path := "/v2/RegulatoryCompliance/SupportingDocuments/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + v, err := json.Marshal(params.Attributes) + + if err != nil { + return nil, err + } + + data.Set("Attributes", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &NumbersV2RegulatoryComplianceSupportingDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/numbers/v2/docs/CreateBundleRequest.md b/rest/numbers/v2/docs/CreateBundleRequest.md new file mode 100644 index 000000000..649ed5e82 --- /dev/null +++ b/rest/numbers/v2/docs/CreateBundleRequest.md @@ -0,0 +1,17 @@ +# CreateBundleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that will receive updates when the Bundle resource changes status. | +**EndUserType** | **string** | The type of End User of the Bundle resource. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | +**IsoCountry** | **string** | The ISO country code of the Bundle's phone number country ownership request. | [optional] +**NumberType** | **string** | The type of phone number of the Bundle's ownership request. | [optional] +**RegulationSid** | **string** | The unique string of a regulation that is associated to the Bundle resource. | [optional] +**StatusCallback** | **string** | The URL we call to inform your application of status changes. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/CreateEndUserRequest.md b/rest/numbers/v2/docs/CreateEndUserRequest.md new file mode 100644 index 000000000..7fa3fe0c0 --- /dev/null +++ b/rest/numbers/v2/docs/CreateEndUserRequest.md @@ -0,0 +1,13 @@ +# CreateEndUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**map[string]interface{}**](.md) | The set of parameters that are the attributes of the End User resource which are derived End User Types. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | +**Type** | **string** | The type of end user of the Bundle resource - can be `individual` or `business`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/CreateItemAssignmentRequest.md b/rest/numbers/v2/docs/CreateItemAssignmentRequest.md new file mode 100644 index 000000000..decdc2aea --- /dev/null +++ b/rest/numbers/v2/docs/CreateItemAssignmentRequest.md @@ -0,0 +1,11 @@ +# CreateItemAssignmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ObjectSid** | **string** | The SID of an object bag that holds information of the different items. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/CreateSupportingDocumentRequest.md b/rest/numbers/v2/docs/CreateSupportingDocumentRequest.md new file mode 100644 index 000000000..4044a7b13 --- /dev/null +++ b/rest/numbers/v2/docs/CreateSupportingDocumentRequest.md @@ -0,0 +1,13 @@ +# CreateSupportingDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**map[string]interface{}**](.md) | The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | +**Type** | **string** | The type of the Supporting Document. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/DefaultApi.md b/rest/numbers/v2/docs/DefaultApi.md new file mode 100644 index 000000000..05be7c797 --- /dev/null +++ b/rest/numbers/v2/docs/DefaultApi.md @@ -0,0 +1,1159 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBundle**](DefaultApi.md#CreateBundle) | **Post** /v2/RegulatoryCompliance/Bundles | +[**CreateEndUser**](DefaultApi.md#CreateEndUser) | **Post** /v2/RegulatoryCompliance/EndUsers | +[**CreateEvaluation**](DefaultApi.md#CreateEvaluation) | **Post** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations | +[**CreateItemAssignment**](DefaultApi.md#CreateItemAssignment) | **Post** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments | +[**CreateSupportingDocument**](DefaultApi.md#CreateSupportingDocument) | **Post** /v2/RegulatoryCompliance/SupportingDocuments | +[**DeleteBundle**](DefaultApi.md#DeleteBundle) | **Delete** /v2/RegulatoryCompliance/Bundles/{Sid} | +[**DeleteEndUser**](DefaultApi.md#DeleteEndUser) | **Delete** /v2/RegulatoryCompliance/EndUsers/{Sid} | +[**DeleteItemAssignment**](DefaultApi.md#DeleteItemAssignment) | **Delete** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid} | +[**DeleteSupportingDocument**](DefaultApi.md#DeleteSupportingDocument) | **Delete** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | +[**FetchBundle**](DefaultApi.md#FetchBundle) | **Get** /v2/RegulatoryCompliance/Bundles/{Sid} | +[**FetchEndUser**](DefaultApi.md#FetchEndUser) | **Get** /v2/RegulatoryCompliance/EndUsers/{Sid} | +[**FetchEndUserType**](DefaultApi.md#FetchEndUserType) | **Get** /v2/RegulatoryCompliance/EndUserTypes/{Sid} | +[**FetchEvaluation**](DefaultApi.md#FetchEvaluation) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations/{Sid} | +[**FetchItemAssignment**](DefaultApi.md#FetchItemAssignment) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments/{Sid} | +[**FetchRegulation**](DefaultApi.md#FetchRegulation) | **Get** /v2/RegulatoryCompliance/Regulations/{Sid} | +[**FetchSupportingDocument**](DefaultApi.md#FetchSupportingDocument) | **Get** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | +[**FetchSupportingDocumentType**](DefaultApi.md#FetchSupportingDocumentType) | **Get** /v2/RegulatoryCompliance/SupportingDocumentTypes/{Sid} | +[**ListBundle**](DefaultApi.md#ListBundle) | **Get** /v2/RegulatoryCompliance/Bundles | +[**ListEndUser**](DefaultApi.md#ListEndUser) | **Get** /v2/RegulatoryCompliance/EndUsers | +[**ListEndUserType**](DefaultApi.md#ListEndUserType) | **Get** /v2/RegulatoryCompliance/EndUserTypes | +[**ListEvaluation**](DefaultApi.md#ListEvaluation) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/Evaluations | +[**ListItemAssignment**](DefaultApi.md#ListItemAssignment) | **Get** /v2/RegulatoryCompliance/Bundles/{BundleSid}/ItemAssignments | +[**ListRegulation**](DefaultApi.md#ListRegulation) | **Get** /v2/RegulatoryCompliance/Regulations | +[**ListSupportingDocument**](DefaultApi.md#ListSupportingDocument) | **Get** /v2/RegulatoryCompliance/SupportingDocuments | +[**ListSupportingDocumentType**](DefaultApi.md#ListSupportingDocumentType) | **Get** /v2/RegulatoryCompliance/SupportingDocumentTypes | +[**UpdateBundle**](DefaultApi.md#UpdateBundle) | **Post** /v2/RegulatoryCompliance/Bundles/{Sid} | +[**UpdateEndUser**](DefaultApi.md#UpdateEndUser) | **Post** /v2/RegulatoryCompliance/EndUsers/{Sid} | +[**UpdateSupportingDocument**](DefaultApi.md#UpdateSupportingDocument) | **Post** /v2/RegulatoryCompliance/SupportingDocuments/{Sid} | + + + +## CreateBundle + +> NumbersV2RegulatoryComplianceBundle CreateBundle(ctx, optional) + + + +Create a new Bundle. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateBundleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateBundleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Email** | **optional.String**| The email address that will receive updates when the Bundle resource changes status. | + **EndUserType** | **optional.String**| The type of End User of the Bundle resource. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **IsoCountry** | **optional.String**| The ISO country code of the Bundle's phone number country ownership request. | + **NumberType** | **optional.String**| The type of phone number of the Bundle's ownership request. | + **RegulationSid** | **optional.String**| The unique string of a regulation that is associated to the Bundle resource. | + **StatusCallback** | **optional.String**| The URL we call to inform your application of status changes. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEndUser + +> NumbersV2RegulatoryComplianceEndUser CreateEndUser(ctx, optional) + + + +Create a new End User. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateEndUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateEndUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Attributes** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The set of parameters that are the attributes of the End User resource which are derived End User Types. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **Type** | **optional.String**| The type of end user of the Bundle resource - can be `individual` or `business`. | + +### Return type + +[**NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEvaluation + +> NumbersV2RegulatoryComplianceBundleEvaluation CreateEvaluation(ctx, BundleSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| | + +### Return type + +[**NumbersV2RegulatoryComplianceBundleEvaluation**](numbers.v2.regulatory_compliance.bundle.evaluation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateItemAssignment + +> NumbersV2RegulatoryComplianceBundleItemAssignment CreateItemAssignment(ctx, BundleSid, optional) + + + +Create a new Assigned Item. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| The unique string that we created to identify the Bundle resource. | + **optional** | ***CreateItemAssignmentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateItemAssignmentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ObjectSid** | **optional.String**| The SID of an object bag that holds information of the different items. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundleItemAssignment**](numbers.v2.regulatory_compliance.bundle.item_assignment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSupportingDocument + +> NumbersV2RegulatoryComplianceSupportingDocument CreateSupportingDocument(ctx, optional) + + + +Create a new Supporting Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateSupportingDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSupportingDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Attributes** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **Type** | **optional.String**| The type of the Supporting Document. | + +### Return type + +[**NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBundle + +> DeleteBundle(ctx, Sid) + + + +Delete a specific Bundle. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Bundle resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEndUser + +> DeleteEndUser(ctx, Sid) + + + +Delete a specific End User. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the End User resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteItemAssignment + +> DeleteItemAssignment(ctx, BundleSid, Sid) + + + +Remove an Assignment Item Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| The unique string that we created to identify the Bundle resource. | +**Sid** | **string**| The unique string that we created to identify the Identity resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSupportingDocument + +> DeleteSupportingDocument(ctx, Sid) + + + +Delete a specific Supporting Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the Supporting Document resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBundle + +> NumbersV2RegulatoryComplianceBundle FetchBundle(ctx, Sid) + + + +Fetch a specific Bundle instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Bundle resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEndUser + +> NumbersV2RegulatoryComplianceEndUser FetchEndUser(ctx, Sid) + + + +Fetch specific End User Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the End User resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEndUserType + +> NumbersV2RegulatoryComplianceEndUserType FetchEndUserType(ctx, Sid) + + + +Fetch a specific End-User Type Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that identifies the End-User Type resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceEndUserType**](numbers.v2.regulatory_compliance.end_user_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEvaluation + +> NumbersV2RegulatoryComplianceBundleEvaluation FetchEvaluation(ctx, BundleSid, Sid) + + + +Fetch specific Evaluation Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| The unique string that we created to identify the Bundle resource. | +**Sid** | **string**| The unique string that identifies the Evaluation resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundleEvaluation**](numbers.v2.regulatory_compliance.bundle.evaluation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchItemAssignment + +> NumbersV2RegulatoryComplianceBundleItemAssignment FetchItemAssignment(ctx, BundleSid, Sid) + + + +Fetch specific Assigned Item Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| The unique string that we created to identify the Bundle resource. | +**Sid** | **string**| The unique string that we created to identify the Identity resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundleItemAssignment**](numbers.v2.regulatory_compliance.bundle.item_assignment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRegulation + +> NumbersV2RegulatoryComplianceRegulation FetchRegulation(ctx, Sid) + + + +Fetch specific Regulation Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that identifies the Regulation resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceRegulation**](numbers.v2.regulatory_compliance.regulation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSupportingDocument + +> NumbersV2RegulatoryComplianceSupportingDocument FetchSupportingDocument(ctx, Sid) + + + +Fetch specific Supporting Document Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the Supporting Document resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSupportingDocumentType + +> NumbersV2RegulatoryComplianceSupportingDocumentType FetchSupportingDocumentType(ctx, Sid) + + + +Fetch a specific Supporting Document Type Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that identifies the Supporting Document Type resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceSupportingDocumentType**](numbers.v2.regulatory_compliance.supporting_document_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBundle + +> ListBundleResponse ListBundle(ctx, optional) + + + +Retrieve a list of all Bundles for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListBundleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBundleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| The verification status of the Bundle resource. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **RegulationSid** | **optional.String**| The unique string of a regulation that is associated to the Bundle resource. | + **IsoCountry** | **optional.String**| The ISO country code of the Bundle's phone number country ownership request. | + **NumberType** | **optional.String**| The type of phone number of the Bundle's ownership request. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBundleResponse**](ListBundleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEndUser + +> ListEndUserResponse ListEndUser(ctx, optional) + + + +Retrieve a list of all End User for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListEndUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEndUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEndUserResponse**](ListEndUserResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEndUserType + +> ListEndUserTypeResponse ListEndUserType(ctx, optional) + + + +Retrieve a list of all End-User Types. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListEndUserTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEndUserTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEndUserTypeResponse**](ListEndUserTypeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEvaluation + +> ListEvaluationResponse ListEvaluation(ctx, BundleSid, optional) + + + +Retrieve a list of Evaluations associated to the Bundle resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| | + **optional** | ***ListEvaluationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEvaluationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEvaluationResponse**](ListEvaluationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListItemAssignment + +> ListItemAssignmentResponse ListItemAssignment(ctx, BundleSid, optional) + + + +Retrieve a list of all Assigned Items for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BundleSid** | **string**| The unique string that we created to identify the Bundle resource. | + **optional** | ***ListItemAssignmentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListItemAssignmentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListItemAssignmentResponse**](ListItemAssignmentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRegulation + +> ListRegulationResponse ListRegulation(ctx, optional) + + + +Retrieve a list of all Regulations. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRegulationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRegulationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **EndUserType** | **optional.String**| The type of End User the regulation requires - can be `individual` or `business`. | + **IsoCountry** | **optional.String**| The ISO country code of the phone number's country. | + **NumberType** | **optional.String**| The type of phone number that the regulatory requiremnt is restricting. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRegulationResponse**](ListRegulationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSupportingDocument + +> ListSupportingDocumentResponse ListSupportingDocument(ctx, optional) + + + +Retrieve a list of all Supporting Document for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSupportingDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSupportingDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSupportingDocumentResponse**](ListSupportingDocumentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSupportingDocumentType + +> ListSupportingDocumentTypeResponse ListSupportingDocumentType(ctx, optional) + + + +Retrieve a list of all Supporting Document Types. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSupportingDocumentTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSupportingDocumentTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSupportingDocumentTypeResponse**](ListSupportingDocumentTypeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateBundle + +> NumbersV2RegulatoryComplianceBundle UpdateBundle(ctx, Sid, optional) + + + +Updates a Bundle in an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Bundle resource. | + **optional** | ***UpdateBundleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateBundleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Email** | **optional.String**| The email address that will receive updates when the Bundle resource changes status. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + **Status** | **optional.String**| The verification status of the Bundle resource. | + **StatusCallback** | **optional.String**| The URL we call to inform your application of status changes. | + +### Return type + +[**NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateEndUser + +> NumbersV2RegulatoryComplianceEndUser UpdateEndUser(ctx, Sid, optional) + + + +Update an existing End User. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the End User resource. | + **optional** | ***UpdateEndUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateEndUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Attributes** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The set of parameters that are the attributes of the End User resource which are derived End User Types. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSupportingDocument + +> NumbersV2RegulatoryComplianceSupportingDocument UpdateSupportingDocument(ctx, Sid, optional) + + + +Update an existing Supporting Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string created by Twilio to identify the Supporting Document resource. | + **optional** | ***UpdateSupportingDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSupportingDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Attributes** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the resource. | + +### Return type + +[**NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/numbers/v2/docs/ListBundleResponse.md b/rest/numbers/v2/docs/ListBundleResponse.md new file mode 100644 index 000000000..1518fb1b0 --- /dev/null +++ b/rest/numbers/v2/docs/ListBundleResponse.md @@ -0,0 +1,12 @@ +# ListBundleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundle**](numbers.v2.regulatory_compliance.bundle.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListBundleResponseMeta.md b/rest/numbers/v2/docs/ListBundleResponseMeta.md new file mode 100644 index 000000000..d31df1f41 --- /dev/null +++ b/rest/numbers/v2/docs/ListBundleResponseMeta.md @@ -0,0 +1,17 @@ +# ListBundleResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListEndUserResponse.md b/rest/numbers/v2/docs/ListEndUserResponse.md new file mode 100644 index 000000000..b8bf4cabf --- /dev/null +++ b/rest/numbers/v2/docs/ListEndUserResponse.md @@ -0,0 +1,12 @@ +# ListEndUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceEndUser**](numbers.v2.regulatory_compliance.end_user.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListEndUserTypeResponse.md b/rest/numbers/v2/docs/ListEndUserTypeResponse.md new file mode 100644 index 000000000..1cf55b2c3 --- /dev/null +++ b/rest/numbers/v2/docs/ListEndUserTypeResponse.md @@ -0,0 +1,12 @@ +# ListEndUserTypeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndUserTypes** | [**[]NumbersV2RegulatoryComplianceEndUserType**](numbers.v2.regulatory_compliance.end_user_type.md) | | [optional] +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListEvaluationResponse.md b/rest/numbers/v2/docs/ListEvaluationResponse.md new file mode 100644 index 000000000..78d379727 --- /dev/null +++ b/rest/numbers/v2/docs/ListEvaluationResponse.md @@ -0,0 +1,12 @@ +# ListEvaluationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundleEvaluation**](numbers.v2.regulatory_compliance.bundle.evaluation.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListItemAssignmentResponse.md b/rest/numbers/v2/docs/ListItemAssignmentResponse.md new file mode 100644 index 000000000..71d1fe26a --- /dev/null +++ b/rest/numbers/v2/docs/ListItemAssignmentResponse.md @@ -0,0 +1,12 @@ +# ListItemAssignmentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceBundleItemAssignment**](numbers.v2.regulatory_compliance.bundle.item_assignment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListRegulationResponse.md b/rest/numbers/v2/docs/ListRegulationResponse.md new file mode 100644 index 000000000..ae2397c26 --- /dev/null +++ b/rest/numbers/v2/docs/ListRegulationResponse.md @@ -0,0 +1,12 @@ +# ListRegulationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceRegulation**](numbers.v2.regulatory_compliance.regulation.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListSupportingDocumentResponse.md b/rest/numbers/v2/docs/ListSupportingDocumentResponse.md new file mode 100644 index 000000000..3c558faf7 --- /dev/null +++ b/rest/numbers/v2/docs/ListSupportingDocumentResponse.md @@ -0,0 +1,12 @@ +# ListSupportingDocumentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**Results** | [**[]NumbersV2RegulatoryComplianceSupportingDocument**](numbers.v2.regulatory_compliance.supporting_document.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md b/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md new file mode 100644 index 000000000..1ffd2aab7 --- /dev/null +++ b/rest/numbers/v2/docs/ListSupportingDocumentTypeResponse.md @@ -0,0 +1,12 @@ +# ListSupportingDocumentTypeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListBundleResponseMeta**](ListBundleResponse_meta.md) | | [optional] +**SupportingDocumentTypes** | [**[]NumbersV2RegulatoryComplianceSupportingDocumentType**](numbers.v2.regulatory_compliance.supporting_document_type.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md new file mode 100644 index 000000000..38997d065 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundle.md @@ -0,0 +1,22 @@ +# NumbersV2RegulatoryComplianceBundle + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Email** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RegulationSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**Url** | **string** | | [optional] +**ValidUntil** | [**time.Time**](time.Time.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md new file mode 100644 index 000000000..cb1a0c009 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleEvaluation.md @@ -0,0 +1,18 @@ +# NumbersV2RegulatoryComplianceBundleEvaluation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BundleSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**RegulationSid** | **string** | | [optional] +**Results** | **[]map[string]interface{}** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md new file mode 100644 index 000000000..2203ad6f2 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceBundleItemAssignment.md @@ -0,0 +1,16 @@ +# NumbersV2RegulatoryComplianceBundleItemAssignment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BundleSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**ObjectSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md new file mode 100644 index 000000000..65f116562 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUser.md @@ -0,0 +1,18 @@ +# NumbersV2RegulatoryComplianceEndUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md new file mode 100644 index 000000000..85b76e325 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceEndUserType.md @@ -0,0 +1,15 @@ +# NumbersV2RegulatoryComplianceEndUserType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | **[]map[string]interface{}** | | [optional] +**FriendlyName** | **string** | | [optional] +**MachineName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md new file mode 100644 index 000000000..1d5298c68 --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceRegulation.md @@ -0,0 +1,17 @@ +# NumbersV2RegulatoryComplianceRegulation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EndUserType** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**NumberType** | **string** | | [optional] +**Requirements** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md new file mode 100644 index 000000000..a5588a78c --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocument.md @@ -0,0 +1,20 @@ +# NumbersV2RegulatoryComplianceSupportingDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Attributes** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**MimeType** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md new file mode 100644 index 000000000..0aec637df --- /dev/null +++ b/rest/numbers/v2/docs/NumbersV2RegulatoryComplianceSupportingDocumentType.md @@ -0,0 +1,15 @@ +# NumbersV2RegulatoryComplianceSupportingDocumentType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | **[]map[string]interface{}** | | [optional] +**FriendlyName** | **string** | | [optional] +**MachineName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/UpdateBundleRequest.md b/rest/numbers/v2/docs/UpdateBundleRequest.md new file mode 100644 index 000000000..8e2397a1f --- /dev/null +++ b/rest/numbers/v2/docs/UpdateBundleRequest.md @@ -0,0 +1,14 @@ +# UpdateBundleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that will receive updates when the Bundle resource changes status. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] +**Status** | **string** | The verification status of the Bundle resource. | [optional] +**StatusCallback** | **string** | The URL we call to inform your application of status changes. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/UpdateEndUserRequest.md b/rest/numbers/v2/docs/UpdateEndUserRequest.md new file mode 100644 index 000000000..e91f8bfd9 --- /dev/null +++ b/rest/numbers/v2/docs/UpdateEndUserRequest.md @@ -0,0 +1,12 @@ +# UpdateEndUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**map[string]interface{}**](.md) | The set of parameters that are the attributes of the End User resource which are derived End User Types. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/docs/UpdateSupportingDocumentRequest.md b/rest/numbers/v2/docs/UpdateSupportingDocumentRequest.md new file mode 100644 index 000000000..2ec9c4e97 --- /dev/null +++ b/rest/numbers/v2/docs/UpdateSupportingDocumentRequest.md @@ -0,0 +1,12 @@ +# UpdateSupportingDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**map[string]interface{}**](.md) | The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/numbers/v2/model_create_bundle_request.go b/rest/numbers/v2/model_create_bundle_request.go new file mode 100644 index 000000000..dc0353ebf --- /dev/null +++ b/rest/numbers/v2/model_create_bundle_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateBundleRequest struct for CreateBundleRequest +type CreateBundleRequest struct { + // The email address that will receive updates when the Bundle resource changes status. + Email string `json:"Email"` + // The type of End User of the Bundle resource. + EndUserType string `json:"EndUserType,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName"` + // The ISO country code of the Bundle's phone number country ownership request. + IsoCountry string `json:"IsoCountry,omitempty"` + // The type of phone number of the Bundle's ownership request. + NumberType string `json:"NumberType,omitempty"` + // The unique string of a regulation that is associated to the Bundle resource. + RegulationSid string `json:"RegulationSid,omitempty"` + // The URL we call to inform your application of status changes. + StatusCallback string `json:"StatusCallback,omitempty"` +} diff --git a/rest/numbers/v2/model_create_end_user_request.go b/rest/numbers/v2/model_create_end_user_request.go new file mode 100644 index 000000000..c742c955d --- /dev/null +++ b/rest/numbers/v2/model_create_end_user_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateEndUserRequest struct for CreateEndUserRequest +type CreateEndUserRequest struct { + // The set of parameters that are the attributes of the End User resource which are derived End User Types. + Attributes map[string]interface{} `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName"` + // The type of end user of the Bundle resource - can be `individual` or `business`. + Type string `json:"Type"` +} diff --git a/rest/numbers/v2/model_create_item_assignment_request.go b/rest/numbers/v2/model_create_item_assignment_request.go new file mode 100644 index 000000000..d33c8f483 --- /dev/null +++ b/rest/numbers/v2/model_create_item_assignment_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateItemAssignmentRequest struct for CreateItemAssignmentRequest +type CreateItemAssignmentRequest struct { + // The SID of an object bag that holds information of the different items. + ObjectSid string `json:"ObjectSid"` +} diff --git a/rest/numbers/v2/model_create_supporting_document_request.go b/rest/numbers/v2/model_create_supporting_document_request.go new file mode 100644 index 000000000..f80c8adf9 --- /dev/null +++ b/rest/numbers/v2/model_create_supporting_document_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSupportingDocumentRequest struct for CreateSupportingDocumentRequest +type CreateSupportingDocumentRequest struct { + // The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types. + Attributes map[string]interface{} `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName"` + // The type of the Supporting Document. + Type string `json:"Type"` +} diff --git a/rest/numbers/v2/model_list_bundle_response.go b/rest/numbers/v2/model_list_bundle_response.go new file mode 100644 index 000000000..83abb94c6 --- /dev/null +++ b/rest/numbers/v2/model_list_bundle_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBundleResponse struct for ListBundleResponse +type ListBundleResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceBundle `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_bundle_response_meta.go b/rest/numbers/v2/model_list_bundle_response_meta.go new file mode 100644 index 000000000..8ea7744a6 --- /dev/null +++ b/rest/numbers/v2/model_list_bundle_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBundleResponseMeta struct for ListBundleResponseMeta +type ListBundleResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_list_end_user_response.go b/rest/numbers/v2/model_list_end_user_response.go new file mode 100644 index 000000000..f4bff2830 --- /dev/null +++ b/rest/numbers/v2/model_list_end_user_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEndUserResponse struct for ListEndUserResponse +type ListEndUserResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceEndUser `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_end_user_type_response.go b/rest/numbers/v2/model_list_end_user_type_response.go new file mode 100644 index 000000000..ede4a9141 --- /dev/null +++ b/rest/numbers/v2/model_list_end_user_type_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEndUserTypeResponse struct for ListEndUserTypeResponse +type ListEndUserTypeResponse struct { + EndUserTypes []NumbersV2RegulatoryComplianceEndUserType `json:"EndUserTypes,omitempty"` + Meta ListBundleResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/numbers/v2/model_list_evaluation_response.go b/rest/numbers/v2/model_list_evaluation_response.go new file mode 100644 index 000000000..97e10e15d --- /dev/null +++ b/rest/numbers/v2/model_list_evaluation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEvaluationResponse struct for ListEvaluationResponse +type ListEvaluationResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceBundleEvaluation `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_item_assignment_response.go b/rest/numbers/v2/model_list_item_assignment_response.go new file mode 100644 index 000000000..fddf70ef5 --- /dev/null +++ b/rest/numbers/v2/model_list_item_assignment_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListItemAssignmentResponse struct for ListItemAssignmentResponse +type ListItemAssignmentResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceBundleItemAssignment `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_regulation_response.go b/rest/numbers/v2/model_list_regulation_response.go new file mode 100644 index 000000000..4c7eff279 --- /dev/null +++ b/rest/numbers/v2/model_list_regulation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRegulationResponse struct for ListRegulationResponse +type ListRegulationResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceRegulation `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_supporting_document_response.go b/rest/numbers/v2/model_list_supporting_document_response.go new file mode 100644 index 000000000..68e6c46f8 --- /dev/null +++ b/rest/numbers/v2/model_list_supporting_document_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSupportingDocumentResponse struct for ListSupportingDocumentResponse +type ListSupportingDocumentResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + Results []NumbersV2RegulatoryComplianceSupportingDocument `json:"Results,omitempty"` +} diff --git a/rest/numbers/v2/model_list_supporting_document_type_response.go b/rest/numbers/v2/model_list_supporting_document_type_response.go new file mode 100644 index 000000000..952f730de --- /dev/null +++ b/rest/numbers/v2/model_list_supporting_document_type_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSupportingDocumentTypeResponse struct for ListSupportingDocumentTypeResponse +type ListSupportingDocumentTypeResponse struct { + Meta ListBundleResponseMeta `json:"Meta,omitempty"` + SupportingDocumentTypes []NumbersV2RegulatoryComplianceSupportingDocumentType `json:"SupportingDocumentTypes,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go new file mode 100644 index 000000000..ee6839145 --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle.go @@ -0,0 +1,29 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NumbersV2RegulatoryComplianceBundle struct for NumbersV2RegulatoryComplianceBundle +type NumbersV2RegulatoryComplianceBundle struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Email string `json:"Email,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RegulationSid string `json:"RegulationSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + Url string `json:"Url,omitempty"` + ValidUntil time.Time `json:"ValidUntil,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go new file mode 100644 index 000000000..1b1b8d083 --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_evaluation.go @@ -0,0 +1,25 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NumbersV2RegulatoryComplianceBundleEvaluation struct for NumbersV2RegulatoryComplianceBundleEvaluation +type NumbersV2RegulatoryComplianceBundleEvaluation struct { + AccountSid string `json:"AccountSid,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + RegulationSid string `json:"RegulationSid,omitempty"` + Results []map[string]interface{} `json:"Results,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go new file mode 100644 index 000000000..645dddf0b --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_bundle_item_assignment.go @@ -0,0 +1,23 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NumbersV2RegulatoryComplianceBundleItemAssignment struct for NumbersV2RegulatoryComplianceBundleItemAssignment +type NumbersV2RegulatoryComplianceBundleItemAssignment struct { + AccountSid string `json:"AccountSid,omitempty"` + BundleSid string `json:"BundleSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + ObjectSid string `json:"ObjectSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go new file mode 100644 index 000000000..a16461a2b --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user.go @@ -0,0 +1,25 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NumbersV2RegulatoryComplianceEndUser struct for NumbersV2RegulatoryComplianceEndUser +type NumbersV2RegulatoryComplianceEndUser struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes map[string]interface{} `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go new file mode 100644 index 000000000..ce1839f8f --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_end_user_type.go @@ -0,0 +1,19 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// NumbersV2RegulatoryComplianceEndUserType struct for NumbersV2RegulatoryComplianceEndUserType +type NumbersV2RegulatoryComplianceEndUserType struct { + Fields []map[string]interface{} `json:"Fields,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + MachineName string `json:"MachineName,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go new file mode 100644 index 000000000..6141e42e4 --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_regulation.go @@ -0,0 +1,21 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// NumbersV2RegulatoryComplianceRegulation struct for NumbersV2RegulatoryComplianceRegulation +type NumbersV2RegulatoryComplianceRegulation struct { + EndUserType string `json:"EndUserType,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + NumberType string `json:"NumberType,omitempty"` + Requirements map[string]interface{} `json:"Requirements,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go new file mode 100644 index 000000000..82e0854b7 --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document.go @@ -0,0 +1,27 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// NumbersV2RegulatoryComplianceSupportingDocument struct for NumbersV2RegulatoryComplianceSupportingDocument +type NumbersV2RegulatoryComplianceSupportingDocument struct { + AccountSid string `json:"AccountSid,omitempty"` + Attributes map[string]interface{} `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + MimeType string `json:"MimeType,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go new file mode 100644 index 000000000..a7f7a652f --- /dev/null +++ b/rest/numbers/v2/model_numbers_v2_regulatory_compliance_supporting_document_type.go @@ -0,0 +1,19 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// NumbersV2RegulatoryComplianceSupportingDocumentType struct for NumbersV2RegulatoryComplianceSupportingDocumentType +type NumbersV2RegulatoryComplianceSupportingDocumentType struct { + Fields []map[string]interface{} `json:"Fields,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + MachineName string `json:"MachineName,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/numbers/v2/model_update_bundle_request.go b/rest/numbers/v2/model_update_bundle_request.go new file mode 100644 index 000000000..39327517b --- /dev/null +++ b/rest/numbers/v2/model_update_bundle_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateBundleRequest struct for UpdateBundleRequest +type UpdateBundleRequest struct { + // The email address that will receive updates when the Bundle resource changes status. + Email string `json:"Email,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The verification status of the Bundle resource. + Status string `json:"Status,omitempty"` + // The URL we call to inform your application of status changes. + StatusCallback string `json:"StatusCallback,omitempty"` +} diff --git a/rest/numbers/v2/model_update_end_user_request.go b/rest/numbers/v2/model_update_end_user_request.go new file mode 100644 index 000000000..f46f8e7b1 --- /dev/null +++ b/rest/numbers/v2/model_update_end_user_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateEndUserRequest struct for UpdateEndUserRequest +type UpdateEndUserRequest struct { + // The set of parameters that are the attributes of the End User resource which are derived End User Types. + Attributes map[string]interface{} `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/numbers/v2/model_update_supporting_document_request.go b/rest/numbers/v2/model_update_supporting_document_request.go new file mode 100644 index 000000000..00beecfdb --- /dev/null +++ b/rest/numbers/v2/model_update_supporting_document_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSupportingDocumentRequest struct for UpdateSupportingDocumentRequest +type UpdateSupportingDocumentRequest struct { + // The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types. + Attributes map[string]interface{} `json:"Attributes,omitempty"` + // The string that you assigned to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/numbers/v2/response.go b/rest/numbers/v2/response.go new file mode 100644 index 000000000..71596f55b --- /dev/null +++ b/rest/numbers/v2/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Numbers + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/preview/.openapi-generator-ignore b/rest/preview/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/preview/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/preview/README.md b/rest/preview/README.md new file mode 100644 index 000000000..5629fd946 --- /dev/null +++ b/rest/preview/README.md @@ -0,0 +1,363 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAssistant**](docs/DefaultApi.md#createassistant) | **Post** /understand/Assistants | +*DefaultApi* | [**CreateAuthorizationDocument**](docs/DefaultApi.md#createauthorizationdocument) | **Post** /HostedNumbers/AuthorizationDocuments | +*DefaultApi* | [**CreateCertificate**](docs/DefaultApi.md#createcertificate) | **Post** /DeployedDevices/Fleets/{FleetSid}/Certificates | +*DefaultApi* | [**CreateChannel**](docs/DefaultApi.md#createchannel) | **Post** /TrustedComms/BrandedChannels/{BrandedChannelSid}/Channels | +*DefaultApi* | [**CreateCommand**](docs/DefaultApi.md#createcommand) | **Post** /wireless/Commands | +*DefaultApi* | [**CreateDeployment**](docs/DefaultApi.md#createdeployment) | **Post** /DeployedDevices/Fleets/{FleetSid}/Deployments | +*DefaultApi* | [**CreateDevice**](docs/DefaultApi.md#createdevice) | **Post** /DeployedDevices/Fleets/{FleetSid}/Devices | +*DefaultApi* | [**CreateDocument**](docs/DefaultApi.md#createdocument) | **Post** /Sync/Services/{ServiceSid}/Documents | +*DefaultApi* | [**CreateExportCustomJob**](docs/DefaultApi.md#createexportcustomjob) | **Post** /BulkExports/Exports/{ResourceType}/Jobs | +*DefaultApi* | [**CreateField**](docs/DefaultApi.md#createfield) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +*DefaultApi* | [**CreateFieldType**](docs/DefaultApi.md#createfieldtype) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes | +*DefaultApi* | [**CreateFieldValue**](docs/DefaultApi.md#createfieldvalue) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +*DefaultApi* | [**CreateFleet**](docs/DefaultApi.md#createfleet) | **Post** /DeployedDevices/Fleets | +*DefaultApi* | [**CreateHostedNumberOrder**](docs/DefaultApi.md#createhostednumberorder) | **Post** /HostedNumbers/HostedNumberOrders | +*DefaultApi* | [**CreateInstalledAddOn**](docs/DefaultApi.md#createinstalledaddon) | **Post** /marketplace/InstalledAddOns | +*DefaultApi* | [**CreateKey**](docs/DefaultApi.md#createkey) | **Post** /DeployedDevices/Fleets/{FleetSid}/Keys | +*DefaultApi* | [**CreateModelBuild**](docs/DefaultApi.md#createmodelbuild) | **Post** /understand/Assistants/{AssistantSid}/ModelBuilds | +*DefaultApi* | [**CreateQuery**](docs/DefaultApi.md#createquery) | **Post** /understand/Assistants/{AssistantSid}/Queries | +*DefaultApi* | [**CreateRatePlan**](docs/DefaultApi.md#createrateplan) | **Post** /wireless/RatePlans | +*DefaultApi* | [**CreateSample**](docs/DefaultApi.md#createsample) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /Sync/Services | +*DefaultApi* | [**CreateSyncList**](docs/DefaultApi.md#createsynclist) | **Post** /Sync/Services/{ServiceSid}/Lists | +*DefaultApi* | [**CreateSyncListItem**](docs/DefaultApi.md#createsynclistitem) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items | +*DefaultApi* | [**CreateSyncMap**](docs/DefaultApi.md#createsyncmap) | **Post** /Sync/Services/{ServiceSid}/Maps | +*DefaultApi* | [**CreateSyncMapItem**](docs/DefaultApi.md#createsyncmapitem) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items | +*DefaultApi* | [**CreateTask**](docs/DefaultApi.md#createtask) | **Post** /understand/Assistants/{AssistantSid}/Tasks | +*DefaultApi* | [**DeleteAssistant**](docs/DefaultApi.md#deleteassistant) | **Delete** /understand/Assistants/{Sid} | +*DefaultApi* | [**DeleteCertificate**](docs/DefaultApi.md#deletecertificate) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +*DefaultApi* | [**DeleteDeployment**](docs/DefaultApi.md#deletedeployment) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +*DefaultApi* | [**DeleteDevice**](docs/DefaultApi.md#deletedevice) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +*DefaultApi* | [**DeleteDocument**](docs/DefaultApi.md#deletedocument) | **Delete** /Sync/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**DeleteDocumentPermission**](docs/DefaultApi.md#deletedocumentpermission) | **Delete** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteField**](docs/DefaultApi.md#deletefield) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +*DefaultApi* | [**DeleteFieldType**](docs/DefaultApi.md#deletefieldtype) | **Delete** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**DeleteFieldValue**](docs/DefaultApi.md#deletefieldvalue) | **Delete** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +*DefaultApi* | [**DeleteFleet**](docs/DefaultApi.md#deletefleet) | **Delete** /DeployedDevices/Fleets/{Sid} | +*DefaultApi* | [**DeleteHostedNumberOrder**](docs/DefaultApi.md#deletehostednumberorder) | **Delete** /HostedNumbers/HostedNumberOrders/{Sid} | +*DefaultApi* | [**DeleteInstalledAddOn**](docs/DefaultApi.md#deleteinstalledaddon) | **Delete** /marketplace/InstalledAddOns/{Sid} | +*DefaultApi* | [**DeleteJob**](docs/DefaultApi.md#deletejob) | **Delete** /BulkExports/Exports/Jobs/{JobSid} | +*DefaultApi* | [**DeleteKey**](docs/DefaultApi.md#deletekey) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +*DefaultApi* | [**DeleteModelBuild**](docs/DefaultApi.md#deletemodelbuild) | **Delete** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**DeleteQuery**](docs/DefaultApi.md#deletequery) | **Delete** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**DeleteRatePlan**](docs/DefaultApi.md#deleterateplan) | **Delete** /wireless/RatePlans/{Sid} | +*DefaultApi* | [**DeleteSample**](docs/DefaultApi.md#deletesample) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /Sync/Services/{Sid} | +*DefaultApi* | [**DeleteSyncList**](docs/DefaultApi.md#deletesynclist) | **Delete** /Sync/Services/{ServiceSid}/Lists/{Sid} | +*DefaultApi* | [**DeleteSyncListItem**](docs/DefaultApi.md#deletesynclistitem) | **Delete** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**DeleteSyncListPermission**](docs/DefaultApi.md#deletesynclistpermission) | **Delete** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteSyncMap**](docs/DefaultApi.md#deletesyncmap) | **Delete** /Sync/Services/{ServiceSid}/Maps/{Sid} | +*DefaultApi* | [**DeleteSyncMapItem**](docs/DefaultApi.md#deletesyncmapitem) | **Delete** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**DeleteSyncMapPermission**](docs/DefaultApi.md#deletesyncmappermission) | **Delete** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteTask**](docs/DefaultApi.md#deletetask) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**FetchAssistant**](docs/DefaultApi.md#fetchassistant) | **Get** /understand/Assistants/{Sid} | +*DefaultApi* | [**FetchAssistantFallbackActions**](docs/DefaultApi.md#fetchassistantfallbackactions) | **Get** /understand/Assistants/{AssistantSid}/FallbackActions | +*DefaultApi* | [**FetchAssistantInitiationActions**](docs/DefaultApi.md#fetchassistantinitiationactions) | **Get** /understand/Assistants/{AssistantSid}/InitiationActions | +*DefaultApi* | [**FetchAuthorizationDocument**](docs/DefaultApi.md#fetchauthorizationdocument) | **Get** /HostedNumbers/AuthorizationDocuments/{Sid} | +*DefaultApi* | [**FetchAvailableAddOn**](docs/DefaultApi.md#fetchavailableaddon) | **Get** /marketplace/AvailableAddOns/{Sid} | +*DefaultApi* | [**FetchAvailableAddOnExtension**](docs/DefaultApi.md#fetchavailableaddonextension) | **Get** /marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid} | +*DefaultApi* | [**FetchBrandedChannel**](docs/DefaultApi.md#fetchbrandedchannel) | **Get** /TrustedComms/BrandedChannels/{Sid} | +*DefaultApi* | [**FetchBrandsInformation**](docs/DefaultApi.md#fetchbrandsinformation) | **Get** /TrustedComms/BrandsInformation | +*DefaultApi* | [**FetchCertificate**](docs/DefaultApi.md#fetchcertificate) | **Get** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +*DefaultApi* | [**FetchCommand**](docs/DefaultApi.md#fetchcommand) | **Get** /wireless/Commands/{Sid} | +*DefaultApi* | [**FetchCps**](docs/DefaultApi.md#fetchcps) | **Get** /TrustedComms/CPS | +*DefaultApi* | [**FetchCurrentCall**](docs/DefaultApi.md#fetchcurrentcall) | **Get** /TrustedComms/CurrentCall | +*DefaultApi* | [**FetchDay**](docs/DefaultApi.md#fetchday) | **Get** /BulkExports/Exports/{ResourceType}/Days/{Day} | +*DefaultApi* | [**FetchDeployment**](docs/DefaultApi.md#fetchdeployment) | **Get** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +*DefaultApi* | [**FetchDevice**](docs/DefaultApi.md#fetchdevice) | **Get** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +*DefaultApi* | [**FetchDialogue**](docs/DefaultApi.md#fetchdialogue) | **Get** /understand/Assistants/{AssistantSid}/Dialogues/{Sid} | +*DefaultApi* | [**FetchDocument**](docs/DefaultApi.md#fetchdocument) | **Get** /Sync/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**FetchDocumentPermission**](docs/DefaultApi.md#fetchdocumentpermission) | **Get** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchExport**](docs/DefaultApi.md#fetchexport) | **Get** /BulkExports/Exports/{ResourceType} | +*DefaultApi* | [**FetchExportConfiguration**](docs/DefaultApi.md#fetchexportconfiguration) | **Get** /BulkExports/Exports/{ResourceType}/Configuration | +*DefaultApi* | [**FetchField**](docs/DefaultApi.md#fetchfield) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +*DefaultApi* | [**FetchFieldType**](docs/DefaultApi.md#fetchfieldtype) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**FetchFieldValue**](docs/DefaultApi.md#fetchfieldvalue) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +*DefaultApi* | [**FetchFleet**](docs/DefaultApi.md#fetchfleet) | **Get** /DeployedDevices/Fleets/{Sid} | +*DefaultApi* | [**FetchHostedNumberOrder**](docs/DefaultApi.md#fetchhostednumberorder) | **Get** /HostedNumbers/HostedNumberOrders/{Sid} | +*DefaultApi* | [**FetchInstalledAddOn**](docs/DefaultApi.md#fetchinstalledaddon) | **Get** /marketplace/InstalledAddOns/{Sid} | +*DefaultApi* | [**FetchInstalledAddOnExtension**](docs/DefaultApi.md#fetchinstalledaddonextension) | **Get** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid} | +*DefaultApi* | [**FetchJob**](docs/DefaultApi.md#fetchjob) | **Get** /BulkExports/Exports/Jobs/{JobSid} | +*DefaultApi* | [**FetchKey**](docs/DefaultApi.md#fetchkey) | **Get** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +*DefaultApi* | [**FetchModelBuild**](docs/DefaultApi.md#fetchmodelbuild) | **Get** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**FetchQuery**](docs/DefaultApi.md#fetchquery) | **Get** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**FetchRatePlan**](docs/DefaultApi.md#fetchrateplan) | **Get** /wireless/RatePlans/{Sid} | +*DefaultApi* | [**FetchSample**](docs/DefaultApi.md#fetchsample) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /Sync/Services/{Sid} | +*DefaultApi* | [**FetchSim**](docs/DefaultApi.md#fetchsim) | **Get** /wireless/Sims/{Sid} | +*DefaultApi* | [**FetchStyleSheet**](docs/DefaultApi.md#fetchstylesheet) | **Get** /understand/Assistants/{AssistantSid}/StyleSheet | +*DefaultApi* | [**FetchSyncList**](docs/DefaultApi.md#fetchsynclist) | **Get** /Sync/Services/{ServiceSid}/Lists/{Sid} | +*DefaultApi* | [**FetchSyncListItem**](docs/DefaultApi.md#fetchsynclistitem) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**FetchSyncListPermission**](docs/DefaultApi.md#fetchsynclistpermission) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchSyncMap**](docs/DefaultApi.md#fetchsyncmap) | **Get** /Sync/Services/{ServiceSid}/Maps/{Sid} | +*DefaultApi* | [**FetchSyncMapItem**](docs/DefaultApi.md#fetchsyncmapitem) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**FetchSyncMapPermission**](docs/DefaultApi.md#fetchsyncmappermission) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchTask**](docs/DefaultApi.md#fetchtask) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**FetchTaskActions**](docs/DefaultApi.md#fetchtaskactions) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +*DefaultApi* | [**FetchTaskStatistics**](docs/DefaultApi.md#fetchtaskstatistics) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics | +*DefaultApi* | [**FetchUsage**](docs/DefaultApi.md#fetchusage) | **Get** /wireless/Sims/{SimSid}/Usage | +*DefaultApi* | [**ListAssistant**](docs/DefaultApi.md#listassistant) | **Get** /understand/Assistants | +*DefaultApi* | [**ListAuthorizationDocument**](docs/DefaultApi.md#listauthorizationdocument) | **Get** /HostedNumbers/AuthorizationDocuments | +*DefaultApi* | [**ListAvailableAddOn**](docs/DefaultApi.md#listavailableaddon) | **Get** /marketplace/AvailableAddOns | +*DefaultApi* | [**ListAvailableAddOnExtension**](docs/DefaultApi.md#listavailableaddonextension) | **Get** /marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions | +*DefaultApi* | [**ListCertificate**](docs/DefaultApi.md#listcertificate) | **Get** /DeployedDevices/Fleets/{FleetSid}/Certificates | +*DefaultApi* | [**ListCommand**](docs/DefaultApi.md#listcommand) | **Get** /wireless/Commands | +*DefaultApi* | [**ListDay**](docs/DefaultApi.md#listday) | **Get** /BulkExports/Exports/{ResourceType}/Days | +*DefaultApi* | [**ListDependentHostedNumberOrder**](docs/DefaultApi.md#listdependenthostednumberorder) | **Get** /HostedNumbers/AuthorizationDocuments/{SigningDocumentSid}/DependentHostedNumberOrders | +*DefaultApi* | [**ListDeployment**](docs/DefaultApi.md#listdeployment) | **Get** /DeployedDevices/Fleets/{FleetSid}/Deployments | +*DefaultApi* | [**ListDevice**](docs/DefaultApi.md#listdevice) | **Get** /DeployedDevices/Fleets/{FleetSid}/Devices | +*DefaultApi* | [**ListDocument**](docs/DefaultApi.md#listdocument) | **Get** /Sync/Services/{ServiceSid}/Documents | +*DefaultApi* | [**ListDocumentPermission**](docs/DefaultApi.md#listdocumentpermission) | **Get** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions | +*DefaultApi* | [**ListExportCustomJob**](docs/DefaultApi.md#listexportcustomjob) | **Get** /BulkExports/Exports/{ResourceType}/Jobs | +*DefaultApi* | [**ListField**](docs/DefaultApi.md#listfield) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +*DefaultApi* | [**ListFieldType**](docs/DefaultApi.md#listfieldtype) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes | +*DefaultApi* | [**ListFieldValue**](docs/DefaultApi.md#listfieldvalue) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +*DefaultApi* | [**ListFleet**](docs/DefaultApi.md#listfleet) | **Get** /DeployedDevices/Fleets | +*DefaultApi* | [**ListHostedNumberOrder**](docs/DefaultApi.md#listhostednumberorder) | **Get** /HostedNumbers/HostedNumberOrders | +*DefaultApi* | [**ListInstalledAddOn**](docs/DefaultApi.md#listinstalledaddon) | **Get** /marketplace/InstalledAddOns | +*DefaultApi* | [**ListInstalledAddOnExtension**](docs/DefaultApi.md#listinstalledaddonextension) | **Get** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions | +*DefaultApi* | [**ListKey**](docs/DefaultApi.md#listkey) | **Get** /DeployedDevices/Fleets/{FleetSid}/Keys | +*DefaultApi* | [**ListModelBuild**](docs/DefaultApi.md#listmodelbuild) | **Get** /understand/Assistants/{AssistantSid}/ModelBuilds | +*DefaultApi* | [**ListQuery**](docs/DefaultApi.md#listquery) | **Get** /understand/Assistants/{AssistantSid}/Queries | +*DefaultApi* | [**ListRatePlan**](docs/DefaultApi.md#listrateplan) | **Get** /wireless/RatePlans | +*DefaultApi* | [**ListSample**](docs/DefaultApi.md#listsample) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /Sync/Services | +*DefaultApi* | [**ListSim**](docs/DefaultApi.md#listsim) | **Get** /wireless/Sims | +*DefaultApi* | [**ListSyncList**](docs/DefaultApi.md#listsynclist) | **Get** /Sync/Services/{ServiceSid}/Lists | +*DefaultApi* | [**ListSyncListItem**](docs/DefaultApi.md#listsynclistitem) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items | +*DefaultApi* | [**ListSyncListPermission**](docs/DefaultApi.md#listsynclistpermission) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions | +*DefaultApi* | [**ListSyncMap**](docs/DefaultApi.md#listsyncmap) | **Get** /Sync/Services/{ServiceSid}/Maps | +*DefaultApi* | [**ListSyncMapItem**](docs/DefaultApi.md#listsyncmapitem) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items | +*DefaultApi* | [**ListSyncMapPermission**](docs/DefaultApi.md#listsyncmappermission) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions | +*DefaultApi* | [**ListTask**](docs/DefaultApi.md#listtask) | **Get** /understand/Assistants/{AssistantSid}/Tasks | +*DefaultApi* | [**UpdateAssistant**](docs/DefaultApi.md#updateassistant) | **Post** /understand/Assistants/{Sid} | +*DefaultApi* | [**UpdateAssistantFallbackActions**](docs/DefaultApi.md#updateassistantfallbackactions) | **Post** /understand/Assistants/{AssistantSid}/FallbackActions | +*DefaultApi* | [**UpdateAssistantInitiationActions**](docs/DefaultApi.md#updateassistantinitiationactions) | **Post** /understand/Assistants/{AssistantSid}/InitiationActions | +*DefaultApi* | [**UpdateAuthorizationDocument**](docs/DefaultApi.md#updateauthorizationdocument) | **Post** /HostedNumbers/AuthorizationDocuments/{Sid} | +*DefaultApi* | [**UpdateCertificate**](docs/DefaultApi.md#updatecertificate) | **Post** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +*DefaultApi* | [**UpdateDeployment**](docs/DefaultApi.md#updatedeployment) | **Post** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +*DefaultApi* | [**UpdateDevice**](docs/DefaultApi.md#updatedevice) | **Post** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +*DefaultApi* | [**UpdateDocument**](docs/DefaultApi.md#updatedocument) | **Post** /Sync/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**UpdateDocumentPermission**](docs/DefaultApi.md#updatedocumentpermission) | **Post** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateExportConfiguration**](docs/DefaultApi.md#updateexportconfiguration) | **Post** /BulkExports/Exports/{ResourceType}/Configuration | +*DefaultApi* | [**UpdateFieldType**](docs/DefaultApi.md#updatefieldtype) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +*DefaultApi* | [**UpdateFleet**](docs/DefaultApi.md#updatefleet) | **Post** /DeployedDevices/Fleets/{Sid} | +*DefaultApi* | [**UpdateHostedNumberOrder**](docs/DefaultApi.md#updatehostednumberorder) | **Post** /HostedNumbers/HostedNumberOrders/{Sid} | +*DefaultApi* | [**UpdateInstalledAddOn**](docs/DefaultApi.md#updateinstalledaddon) | **Post** /marketplace/InstalledAddOns/{Sid} | +*DefaultApi* | [**UpdateInstalledAddOnExtension**](docs/DefaultApi.md#updateinstalledaddonextension) | **Post** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid} | +*DefaultApi* | [**UpdateKey**](docs/DefaultApi.md#updatekey) | **Post** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +*DefaultApi* | [**UpdateModelBuild**](docs/DefaultApi.md#updatemodelbuild) | **Post** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +*DefaultApi* | [**UpdateQuery**](docs/DefaultApi.md#updatequery) | **Post** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +*DefaultApi* | [**UpdateRatePlan**](docs/DefaultApi.md#updaterateplan) | **Post** /wireless/RatePlans/{Sid} | +*DefaultApi* | [**UpdateSample**](docs/DefaultApi.md#updatesample) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /Sync/Services/{Sid} | +*DefaultApi* | [**UpdateSim**](docs/DefaultApi.md#updatesim) | **Post** /wireless/Sims/{Sid} | +*DefaultApi* | [**UpdateStyleSheet**](docs/DefaultApi.md#updatestylesheet) | **Post** /understand/Assistants/{AssistantSid}/StyleSheet | +*DefaultApi* | [**UpdateSyncListItem**](docs/DefaultApi.md#updatesynclistitem) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**UpdateSyncListPermission**](docs/DefaultApi.md#updatesynclistpermission) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateSyncMapItem**](docs/DefaultApi.md#updatesyncmapitem) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**UpdateSyncMapPermission**](docs/DefaultApi.md#updatesyncmappermission) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateTask**](docs/DefaultApi.md#updatetask) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +*DefaultApi* | [**UpdateTaskActions**](docs/DefaultApi.md#updatetaskactions) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | + + +## Documentation For Models + + - [CreateAssistantRequest](docs/CreateAssistantRequest.md) + - [CreateAuthorizationDocumentRequest](docs/CreateAuthorizationDocumentRequest.md) + - [CreateCertificateRequest](docs/CreateCertificateRequest.md) + - [CreateChannelRequest](docs/CreateChannelRequest.md) + - [CreateCommandRequest](docs/CreateCommandRequest.md) + - [CreateDeploymentRequest](docs/CreateDeploymentRequest.md) + - [CreateDeviceRequest](docs/CreateDeviceRequest.md) + - [CreateDocumentRequest](docs/CreateDocumentRequest.md) + - [CreateExportCustomJobRequest](docs/CreateExportCustomJobRequest.md) + - [CreateFieldRequest](docs/CreateFieldRequest.md) + - [CreateFieldTypeRequest](docs/CreateFieldTypeRequest.md) + - [CreateFieldValueRequest](docs/CreateFieldValueRequest.md) + - [CreateFleetRequest](docs/CreateFleetRequest.md) + - [CreateHostedNumberOrderRequest](docs/CreateHostedNumberOrderRequest.md) + - [CreateInstalledAddOnRequest](docs/CreateInstalledAddOnRequest.md) + - [CreateKeyRequest](docs/CreateKeyRequest.md) + - [CreateModelBuildRequest](docs/CreateModelBuildRequest.md) + - [CreateQueryRequest](docs/CreateQueryRequest.md) + - [CreateRatePlanRequest](docs/CreateRatePlanRequest.md) + - [CreateSampleRequest](docs/CreateSampleRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateSyncListItemRequest](docs/CreateSyncListItemRequest.md) + - [CreateSyncListRequest](docs/CreateSyncListRequest.md) + - [CreateSyncMapItemRequest](docs/CreateSyncMapItemRequest.md) + - [CreateSyncMapRequest](docs/CreateSyncMapRequest.md) + - [CreateTaskRequest](docs/CreateTaskRequest.md) + - [ListAssistantResponse](docs/ListAssistantResponse.md) + - [ListAuthorizationDocumentResponse](docs/ListAuthorizationDocumentResponse.md) + - [ListAvailableAddOnExtensionResponse](docs/ListAvailableAddOnExtensionResponse.md) + - [ListAvailableAddOnResponse](docs/ListAvailableAddOnResponse.md) + - [ListCertificateResponse](docs/ListCertificateResponse.md) + - [ListCommandResponse](docs/ListCommandResponse.md) + - [ListDayResponse](docs/ListDayResponse.md) + - [ListDayResponseMeta](docs/ListDayResponseMeta.md) + - [ListDependentHostedNumberOrderResponse](docs/ListDependentHostedNumberOrderResponse.md) + - [ListDeploymentResponse](docs/ListDeploymentResponse.md) + - [ListDeviceResponse](docs/ListDeviceResponse.md) + - [ListDocumentPermissionResponse](docs/ListDocumentPermissionResponse.md) + - [ListDocumentResponse](docs/ListDocumentResponse.md) + - [ListExportCustomJobResponse](docs/ListExportCustomJobResponse.md) + - [ListFieldResponse](docs/ListFieldResponse.md) + - [ListFieldTypeResponse](docs/ListFieldTypeResponse.md) + - [ListFieldValueResponse](docs/ListFieldValueResponse.md) + - [ListFleetResponse](docs/ListFleetResponse.md) + - [ListHostedNumberOrderResponse](docs/ListHostedNumberOrderResponse.md) + - [ListInstalledAddOnExtensionResponse](docs/ListInstalledAddOnExtensionResponse.md) + - [ListInstalledAddOnResponse](docs/ListInstalledAddOnResponse.md) + - [ListKeyResponse](docs/ListKeyResponse.md) + - [ListModelBuildResponse](docs/ListModelBuildResponse.md) + - [ListQueryResponse](docs/ListQueryResponse.md) + - [ListRatePlanResponse](docs/ListRatePlanResponse.md) + - [ListSampleResponse](docs/ListSampleResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListSimResponse](docs/ListSimResponse.md) + - [ListSyncListItemResponse](docs/ListSyncListItemResponse.md) + - [ListSyncListPermissionResponse](docs/ListSyncListPermissionResponse.md) + - [ListSyncListResponse](docs/ListSyncListResponse.md) + - [ListSyncMapItemResponse](docs/ListSyncMapItemResponse.md) + - [ListSyncMapPermissionResponse](docs/ListSyncMapPermissionResponse.md) + - [ListSyncMapResponse](docs/ListSyncMapResponse.md) + - [ListTaskResponse](docs/ListTaskResponse.md) + - [PreviewBulkExportsExport](docs/PreviewBulkExportsExport.md) + - [PreviewBulkExportsExportConfiguration](docs/PreviewBulkExportsExportConfiguration.md) + - [PreviewBulkExportsExportDay](docs/PreviewBulkExportsExportDay.md) + - [PreviewBulkExportsExportDayInstance](docs/PreviewBulkExportsExportDayInstance.md) + - [PreviewBulkExportsExportExportCustomJob](docs/PreviewBulkExportsExportExportCustomJob.md) + - [PreviewBulkExportsExportJob](docs/PreviewBulkExportsExportJob.md) + - [PreviewDeployedDevicesFleet](docs/PreviewDeployedDevicesFleet.md) + - [PreviewDeployedDevicesFleetCertificate](docs/PreviewDeployedDevicesFleetCertificate.md) + - [PreviewDeployedDevicesFleetDeployment](docs/PreviewDeployedDevicesFleetDeployment.md) + - [PreviewDeployedDevicesFleetDevice](docs/PreviewDeployedDevicesFleetDevice.md) + - [PreviewDeployedDevicesFleetKey](docs/PreviewDeployedDevicesFleetKey.md) + - [PreviewHostedNumbersAuthorizationDocument](docs/PreviewHostedNumbersAuthorizationDocument.md) + - [PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder](docs/PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder.md) + - [PreviewHostedNumbersHostedNumberOrder](docs/PreviewHostedNumbersHostedNumberOrder.md) + - [PreviewMarketplaceAvailableAddOn](docs/PreviewMarketplaceAvailableAddOn.md) + - [PreviewMarketplaceAvailableAddOnAvailableAddOnExtension](docs/PreviewMarketplaceAvailableAddOnAvailableAddOnExtension.md) + - [PreviewMarketplaceInstalledAddOn](docs/PreviewMarketplaceInstalledAddOn.md) + - [PreviewMarketplaceInstalledAddOnInstalledAddOnExtension](docs/PreviewMarketplaceInstalledAddOnInstalledAddOnExtension.md) + - [PreviewSyncService](docs/PreviewSyncService.md) + - [PreviewSyncServiceDocument](docs/PreviewSyncServiceDocument.md) + - [PreviewSyncServiceDocumentDocumentPermission](docs/PreviewSyncServiceDocumentDocumentPermission.md) + - [PreviewSyncServiceSyncList](docs/PreviewSyncServiceSyncList.md) + - [PreviewSyncServiceSyncListSyncListItem](docs/PreviewSyncServiceSyncListSyncListItem.md) + - [PreviewSyncServiceSyncListSyncListPermission](docs/PreviewSyncServiceSyncListSyncListPermission.md) + - [PreviewSyncServiceSyncMap](docs/PreviewSyncServiceSyncMap.md) + - [PreviewSyncServiceSyncMapSyncMapItem](docs/PreviewSyncServiceSyncMapSyncMapItem.md) + - [PreviewSyncServiceSyncMapSyncMapPermission](docs/PreviewSyncServiceSyncMapSyncMapPermission.md) + - [PreviewTrustedCommsBrandedChannel](docs/PreviewTrustedCommsBrandedChannel.md) + - [PreviewTrustedCommsBrandedChannelChannel](docs/PreviewTrustedCommsBrandedChannelChannel.md) + - [PreviewTrustedCommsBrandsInformation](docs/PreviewTrustedCommsBrandsInformation.md) + - [PreviewTrustedCommsCps](docs/PreviewTrustedCommsCps.md) + - [PreviewTrustedCommsCurrentCall](docs/PreviewTrustedCommsCurrentCall.md) + - [PreviewUnderstandAssistant](docs/PreviewUnderstandAssistant.md) + - [PreviewUnderstandAssistantAssistantFallbackActions](docs/PreviewUnderstandAssistantAssistantFallbackActions.md) + - [PreviewUnderstandAssistantAssistantInitiationActions](docs/PreviewUnderstandAssistantAssistantInitiationActions.md) + - [PreviewUnderstandAssistantDialogue](docs/PreviewUnderstandAssistantDialogue.md) + - [PreviewUnderstandAssistantFieldType](docs/PreviewUnderstandAssistantFieldType.md) + - [PreviewUnderstandAssistantFieldTypeFieldValue](docs/PreviewUnderstandAssistantFieldTypeFieldValue.md) + - [PreviewUnderstandAssistantModelBuild](docs/PreviewUnderstandAssistantModelBuild.md) + - [PreviewUnderstandAssistantQuery](docs/PreviewUnderstandAssistantQuery.md) + - [PreviewUnderstandAssistantStyleSheet](docs/PreviewUnderstandAssistantStyleSheet.md) + - [PreviewUnderstandAssistantTask](docs/PreviewUnderstandAssistantTask.md) + - [PreviewUnderstandAssistantTaskField](docs/PreviewUnderstandAssistantTaskField.md) + - [PreviewUnderstandAssistantTaskSample](docs/PreviewUnderstandAssistantTaskSample.md) + - [PreviewUnderstandAssistantTaskTaskActions](docs/PreviewUnderstandAssistantTaskTaskActions.md) + - [PreviewUnderstandAssistantTaskTaskStatistics](docs/PreviewUnderstandAssistantTaskTaskStatistics.md) + - [PreviewWirelessCommand](docs/PreviewWirelessCommand.md) + - [PreviewWirelessRatePlan](docs/PreviewWirelessRatePlan.md) + - [PreviewWirelessSim](docs/PreviewWirelessSim.md) + - [PreviewWirelessSimUsage](docs/PreviewWirelessSimUsage.md) + - [UpdateAssistantFallbackActionsRequest](docs/UpdateAssistantFallbackActionsRequest.md) + - [UpdateAssistantInitiationActionsRequest](docs/UpdateAssistantInitiationActionsRequest.md) + - [UpdateAssistantRequest](docs/UpdateAssistantRequest.md) + - [UpdateAuthorizationDocumentRequest](docs/UpdateAuthorizationDocumentRequest.md) + - [UpdateCertificateRequest](docs/UpdateCertificateRequest.md) + - [UpdateDeploymentRequest](docs/UpdateDeploymentRequest.md) + - [UpdateDeviceRequest](docs/UpdateDeviceRequest.md) + - [UpdateDocumentPermissionRequest](docs/UpdateDocumentPermissionRequest.md) + - [UpdateDocumentRequest](docs/UpdateDocumentRequest.md) + - [UpdateExportConfigurationRequest](docs/UpdateExportConfigurationRequest.md) + - [UpdateFieldTypeRequest](docs/UpdateFieldTypeRequest.md) + - [UpdateFleetRequest](docs/UpdateFleetRequest.md) + - [UpdateHostedNumberOrderRequest](docs/UpdateHostedNumberOrderRequest.md) + - [UpdateInstalledAddOnExtensionRequest](docs/UpdateInstalledAddOnExtensionRequest.md) + - [UpdateInstalledAddOnRequest](docs/UpdateInstalledAddOnRequest.md) + - [UpdateKeyRequest](docs/UpdateKeyRequest.md) + - [UpdateModelBuildRequest](docs/UpdateModelBuildRequest.md) + - [UpdateQueryRequest](docs/UpdateQueryRequest.md) + - [UpdateRatePlanRequest](docs/UpdateRatePlanRequest.md) + - [UpdateSampleRequest](docs/UpdateSampleRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateSimRequest](docs/UpdateSimRequest.md) + - [UpdateStyleSheetRequest](docs/UpdateStyleSheetRequest.md) + - [UpdateSyncListItemRequest](docs/UpdateSyncListItemRequest.md) + - [UpdateSyncListPermissionRequest](docs/UpdateSyncListPermissionRequest.md) + - [UpdateSyncMapItemRequest](docs/UpdateSyncMapItemRequest.md) + - [UpdateSyncMapPermissionRequest](docs/UpdateSyncMapPermissionRequest.md) + - [UpdateTaskActionsRequest](docs/UpdateTaskActionsRequest.md) + - [UpdateTaskRequest](docs/UpdateTaskRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/preview/api_default.go b/rest/preview/api_default.go new file mode 100644 index 000000000..e88ec552c --- /dev/null +++ b/rest/preview/api_default.go @@ -0,0 +1,6816 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://preview.twilio.com"), + } +} +// CreateAssistantParams Optional parameters for the method 'CreateAssistant' +type CreateAssistantParams struct { + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FallbackActions *map[string]interface{} `json:"FallbackActions,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InitiationActions *map[string]interface{} `json:"InitiationActions,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateAssistant Method for CreateAssistant + * @param optional nil or *CreateAssistantOpts - Optional Parameters: + * @param "CallbackEvents" (string) - Space-separated list of callback events that will trigger callbacks. + * @param "CallbackUrl" (string) - A user-provided URL to send event callbacks to. + * @param "FallbackActions" (map[string]interface{}) - The JSON actions to be executed when the user's input is not recognized as matching any Task. + * @param "FriendlyName" (string) - A text description for the Assistant. It is non-unique and can up to 255 characters long. + * @param "InitiationActions" (map[string]interface{}) - The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. + * @param "LogQueries" (bool) - A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. + * @param "StyleSheet" (map[string]interface{}) - The JSON object that holds the style sheet for the assistant + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistant +*/ +func (c *DefaultApiService) CreateAssistant(params *CreateAssistantParams) (*PreviewUnderstandAssistant, error) { + path := "/understand/Assistants" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FallbackActions != nil { + v, err := json.Marshal(params.FallbackActions) + + if err != nil { + return nil, err + } + + data.Set("FallbackActions", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InitiationActions != nil { + v, err := json.Marshal(params.InitiationActions) + + if err != nil { + return nil, err + } + + data.Set("InitiationActions", fmt.Sprint(v)) + } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateAuthorizationDocumentParams Optional parameters for the method 'CreateAuthorizationDocument' +type CreateAuthorizationDocumentParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + CcEmails *[]string `json:"CcEmails,omitempty"` + ContactPhoneNumber *string `json:"ContactPhoneNumber,omitempty"` + ContactTitle *string `json:"ContactTitle,omitempty"` + Email *string `json:"Email,omitempty"` + HostedNumberOrderSids *[]string `json:"HostedNumberOrderSids,omitempty"` +} + +/* +CreateAuthorizationDocument Method for CreateAuthorizationDocument +Create an AuthorizationDocument for authorizing the hosting of phone number capabilities on Twilio's platform. + * @param optional nil or *CreateAuthorizationDocumentOpts - Optional Parameters: + * @param "AddressSid" (string) - A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. + * @param "CcEmails" ([]string) - Email recipients who will be informed when an Authorization Document has been sent and signed. + * @param "ContactPhoneNumber" (string) - The contact phone number of the person authorized to sign the Authorization Document. + * @param "ContactTitle" (string) - The title of the person authorized to sign the Authorization Document for this phone number. + * @param "Email" (string) - Email that this AuthorizationDocument will be sent to for signing. + * @param "HostedNumberOrderSids" ([]string) - A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. +@return PreviewHostedNumbersAuthorizationDocument +*/ +func (c *DefaultApiService) CreateAuthorizationDocument(params *CreateAuthorizationDocumentParams) (*PreviewHostedNumbersAuthorizationDocument, error) { + path := "/HostedNumbers/AuthorizationDocuments" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.CcEmails != nil { + data.Set("CcEmails", strings.Join(*params.CcEmails, ",")) + } + if params != nil && params.ContactPhoneNumber != nil { + data.Set("ContactPhoneNumber", *params.ContactPhoneNumber) + } + if params != nil && params.ContactTitle != nil { + data.Set("ContactTitle", *params.ContactTitle) + } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.HostedNumberOrderSids != nil { + data.Set("HostedNumberOrderSids", strings.Join(*params.HostedNumberOrderSids, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersAuthorizationDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCertificateParams Optional parameters for the method 'CreateCertificate' +type CreateCertificateParams struct { + CertificateData *string `json:"CertificateData,omitempty"` + DeviceSid *string `json:"DeviceSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateCertificate Method for CreateCertificate +Enroll a new Certificate credential to the Fleet, optionally giving it a friendly name and assigning to a Device. + * @param FleetSid + * @param optional nil or *CreateCertificateOpts - Optional Parameters: + * @param "CertificateData" (string) - Provides a URL encoded representation of the public certificate in PEM format. + * @param "DeviceSid" (string) - Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. +@return PreviewDeployedDevicesFleetCertificate +*/ +func (c *DefaultApiService) CreateCertificate(FleetSid string, params *CreateCertificateParams) (*PreviewDeployedDevicesFleetCertificate, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Certificates" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CertificateData != nil { + data.Set("CertificateData", *params.CertificateData) + } + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetCertificate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateChannelParams Optional parameters for the method 'CreateChannel' +type CreateChannelParams struct { + PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` +} + +/* +CreateChannel Method for CreateChannel +Associate a channel to a branded channel + * @param BrandedChannelSid The unique SID identifier of the Branded Channel. The given phone number is going to be assigned to this Branded Channel + * @param optional nil or *CreateChannelOpts - Optional Parameters: + * @param "PhoneNumberSid" (string) - The unique SID identifier of the Phone Number of the Phone number to be assigned to the Branded Channel. +@return PreviewTrustedCommsBrandedChannelChannel +*/ +func (c *DefaultApiService) CreateChannel(BrandedChannelSid string, params *CreateChannelParams) (*PreviewTrustedCommsBrandedChannelChannel, error) { + path := "/TrustedComms/BrandedChannels/{BrandedChannelSid}/Channels" + path = strings.Replace(path, "{"+"BrandedChannelSid"+"}", BrandedChannelSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewTrustedCommsBrandedChannelChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCommandParams Optional parameters for the method 'CreateCommand' +type CreateCommandParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + CommandMode *string `json:"CommandMode,omitempty"` + Device *string `json:"Device,omitempty"` + IncludeSid *string `json:"IncludeSid,omitempty"` + Sim *string `json:"Sim,omitempty"` +} + +/* +CreateCommand Method for CreateCommand + * @param optional nil or *CreateCommandOpts - Optional Parameters: + * @param "CallbackMethod" (string) - + * @param "CallbackUrl" (string) - + * @param "Command" (string) - + * @param "CommandMode" (string) - + * @param "Device" (string) - + * @param "IncludeSid" (string) - + * @param "Sim" (string) - +@return PreviewWirelessCommand +*/ +func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*PreviewWirelessCommand, error) { + path := "/wireless/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) + } + if params != nil && params.CommandMode != nil { + data.Set("CommandMode", *params.CommandMode) + } + if params != nil && params.Device != nil { + data.Set("Device", *params.Device) + } + if params != nil && params.IncludeSid != nil { + data.Set("IncludeSid", *params.IncludeSid) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessCommand{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateDeploymentParams Optional parameters for the method 'CreateDeployment' +type CreateDeploymentParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + SyncServiceSid *string `json:"SyncServiceSid,omitempty"` +} + +/* +CreateDeployment Method for CreateDeployment +Create a new Deployment in the Fleet, optionally giving it a friendly name and linking to a specific Twilio Sync service instance. + * @param FleetSid + * @param optional nil or *CreateDeploymentOpts - Optional Parameters: + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Deployment, up to 256 characters long. + * @param "SyncServiceSid" (string) - Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. +@return PreviewDeployedDevicesFleetDeployment +*/ +func (c *DefaultApiService) CreateDeployment(FleetSid string, params *CreateDeploymentParams) (*PreviewDeployedDevicesFleetDeployment, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Deployments" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.SyncServiceSid != nil { + data.Set("SyncServiceSid", *params.SyncServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateDeviceParams Optional parameters for the method 'CreateDevice' +type CreateDeviceParams struct { + DeploymentSid *string `json:"DeploymentSid,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateDevice Method for CreateDevice +Create a new Device in the Fleet, optionally giving it a unique name, friendly name, and assigning to a Deployment and/or human identity. + * @param FleetSid + * @param optional nil or *CreateDeviceOpts - Optional Parameters: + * @param "DeploymentSid" (string) - Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. + * @param "Enabled" (bool) - + * @param "FriendlyName" (string) - Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. + * @param "Identity" (string) - Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. + * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. +@return PreviewDeployedDevicesFleetDevice +*/ +func (c *DefaultApiService) CreateDevice(FleetSid string, params *CreateDeviceParams) (*PreviewDeployedDevicesFleetDevice, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Devices" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeploymentSid != nil { + data.Set("DeploymentSid", *params.DeploymentSid) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDevice{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateDocumentParams Optional parameters for the method 'CreateDocument' +type CreateDocumentParams struct { + Data *map[string]interface{} `json:"Data,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateDocument Method for CreateDocument + * @param ServiceSid + * @param optional nil or *CreateDocumentOpts - Optional Parameters: + * @param "Data" (map[string]interface{}) - + * @param "UniqueName" (string) - +@return PreviewSyncServiceDocument +*/ +func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocumentParams) (*PreviewSyncServiceDocument, error) { + path := "/Sync/Services/{ServiceSid}/Documents" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateExportCustomJobParams Optional parameters for the method 'CreateExportCustomJob' +type CreateExportCustomJobParams struct { + Email *string `json:"Email,omitempty"` + EndDay *string `json:"EndDay,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + StartDay *string `json:"StartDay,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +CreateExportCustomJob Method for CreateExportCustomJob + * @param ResourceType The type of communication – Messages or Calls, Conferences, and Participants + * @param optional nil or *CreateExportCustomJobOpts - Optional Parameters: + * @param "Email" (string) - The optional email to send the completion notification to + * @param "EndDay" (string) - The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. + * @param "FriendlyName" (string) - The friendly name specified when creating the job + * @param "StartDay" (string) - The start day for the custom export specified as a string in the format of yyyy-mm-dd + * @param "WebhookMethod" (string) - This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. + * @param "WebhookUrl" (string) - The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. +@return PreviewBulkExportsExportExportCustomJob +*/ +func (c *DefaultApiService) CreateExportCustomJob(ResourceType string, params *CreateExportCustomJobParams) (*PreviewBulkExportsExportExportCustomJob, error) { + path := "/BulkExports/Exports/{ResourceType}/Jobs" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.EndDay != nil { + data.Set("EndDay", *params.EndDay) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.StartDay != nil { + data.Set("StartDay", *params.StartDay) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewBulkExportsExportExportCustomJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldParams Optional parameters for the method 'CreateField' +type CreateFieldParams struct { + FieldType *string `json:"FieldType,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateField Method for CreateField + * @param AssistantSid The unique ID of the parent Assistant. + * @param TaskSid The unique ID of the Task associated with this Field. + * @param optional nil or *CreateFieldOpts - Optional Parameters: + * @param "FieldType" (string) - The unique name or sid of the FieldType. It can be any [Built-in Field Type](https://www.twilio.com/docs/assistant/api/built-in-field-types) or the unique_name or the Field Type sid of a custom Field Type. + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantTaskField +*/ +func (c *DefaultApiService) CreateField(AssistantSid string, TaskSid string, params *CreateFieldParams) (*PreviewUnderstandAssistantTaskField, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FieldType != nil { + data.Set("FieldType", *params.FieldType) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldTypeParams Optional parameters for the method 'CreateFieldType' +type CreateFieldTypeParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateFieldType Method for CreateFieldType + * @param AssistantSid + * @param optional nil or *CreateFieldTypeOpts - Optional Parameters: + * @param "FriendlyName" (string) - A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantFieldType +*/ +func (c *DefaultApiService) CreateFieldType(AssistantSid string, params *CreateFieldTypeParams) (*PreviewUnderstandAssistantFieldType, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFieldValueParams Optional parameters for the method 'CreateFieldValue' +type CreateFieldValueParams struct { + Language *string `json:"Language,omitempty"` + SynonymOf *string `json:"SynonymOf,omitempty"` + Value *string `json:"Value,omitempty"` +} + +/* +CreateFieldValue Method for CreateFieldValue + * @param AssistantSid + * @param FieldTypeSid + * @param optional nil or *CreateFieldValueOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the value. + * @param "SynonymOf" (string) - A value that indicates this field value is a synonym of. Empty if the value is not a synonym. + * @param "Value" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantFieldTypeFieldValue +*/ +func (c *DefaultApiService) CreateFieldValue(AssistantSid string, FieldTypeSid string, params *CreateFieldValueParams) (*PreviewUnderstandAssistantFieldTypeFieldValue, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SynonymOf != nil { + data.Set("SynonymOf", *params.SynonymOf) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFleetParams Optional parameters for the method 'CreateFleet' +type CreateFleetParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateFleet Method for CreateFleet +Create a new Fleet for scoping of deployed devices within your account. + * @param optional nil or *CreateFleetOpts - Optional Parameters: + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Fleet, up to 256 characters long. +@return PreviewDeployedDevicesFleet +*/ +func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*PreviewDeployedDevicesFleet, error) { + path := "/DeployedDevices/Fleets" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateHostedNumberOrderParams Optional parameters for the method 'CreateHostedNumberOrder' +type CreateHostedNumberOrderParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + AddressSid *string `json:"AddressSid,omitempty"` + CcEmails *[]string `json:"CcEmails,omitempty"` + Email *string `json:"Email,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + SmsApplicationSid *string `json:"SmsApplicationSid,omitempty"` + SmsCapability *bool `json:"SmsCapability,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VerificationDocumentSid *string `json:"VerificationDocumentSid,omitempty"` + VerificationType *string `json:"VerificationType,omitempty"` +} + +/* +CreateHostedNumberOrder Method for CreateHostedNumberOrder +Host a phone number's capability on Twilio's platform. + * @param optional nil or *CreateHostedNumberOrderOpts - Optional Parameters: + * @param "AccountSid" (string) - This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. + * @param "AddressSid" (string) - Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. + * @param "CcEmails" ([]string) - Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. + * @param "Email" (string) - Optional. Email of the owner of this phone number that is being hosted. + * @param "FriendlyName" (string) - A 64 character string that is a human readable text that describes this resource. + * @param "PhoneNumber" (string) - The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format + * @param "SmsApplicationSid" (string) - Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. + * @param "SmsCapability" (bool) - Used to specify that the SMS capability will be hosted on Twilio's platform. + * @param "SmsFallbackMethod" (string) - The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. + * @param "SmsFallbackUrl" (string) - A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. + * @param "SmsMethod" (string) - The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. + * @param "SmsUrl" (string) - The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. + * @param "StatusCallbackMethod" (string) - Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. + * @param "StatusCallbackUrl" (string) - Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. + * @param "UniqueName" (string) - Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * @param "VerificationDocumentSid" (string) - Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. + * @param "VerificationType" (string) - Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. +@return PreviewHostedNumbersHostedNumberOrder +*/ +func (c *DefaultApiService) CreateHostedNumberOrder(params *CreateHostedNumberOrderParams) (*PreviewHostedNumbersHostedNumberOrder, error) { + path := "/HostedNumbers/HostedNumberOrders" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.CcEmails != nil { + data.Set("CcEmails", strings.Join(*params.CcEmails, ",")) + } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.SmsApplicationSid != nil { + data.Set("SmsApplicationSid", *params.SmsApplicationSid) + } + if params != nil && params.SmsCapability != nil { + data.Set("SmsCapability", fmt.Sprint(*params.SmsCapability)) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VerificationDocumentSid != nil { + data.Set("VerificationDocumentSid", *params.VerificationDocumentSid) + } + if params != nil && params.VerificationType != nil { + data.Set("VerificationType", *params.VerificationType) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersHostedNumberOrder{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateInstalledAddOnParams Optional parameters for the method 'CreateInstalledAddOn' +type CreateInstalledAddOnParams struct { + AcceptTermsOfService *bool `json:"AcceptTermsOfService,omitempty"` + AvailableAddOnSid *string `json:"AvailableAddOnSid,omitempty"` + Configuration *map[string]interface{} `json:"Configuration,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateInstalledAddOn Method for CreateInstalledAddOn +Install an Add-on for the Account specified. + * @param optional nil or *CreateInstalledAddOnOpts - Optional Parameters: + * @param "AcceptTermsOfService" (bool) - Whether the Terms of Service were accepted. + * @param "AvailableAddOnSid" (string) - The SID of the AvaliableAddOn to install. + * @param "Configuration" (map[string]interface{}) - The JSON object that represents the configuration of the new Add-on being installed. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within the Account. +@return PreviewMarketplaceInstalledAddOn +*/ +func (c *DefaultApiService) CreateInstalledAddOn(params *CreateInstalledAddOnParams) (*PreviewMarketplaceInstalledAddOn, error) { + path := "/marketplace/InstalledAddOns" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AcceptTermsOfService != nil { + data.Set("AcceptTermsOfService", fmt.Sprint(*params.AcceptTermsOfService)) + } + if params != nil && params.AvailableAddOnSid != nil { + data.Set("AvailableAddOnSid", *params.AvailableAddOnSid) + } + if params != nil && params.Configuration != nil { + v, err := json.Marshal(params.Configuration) + + if err != nil { + return nil, err + } + + data.Set("Configuration", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceInstalledAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateKeyParams Optional parameters for the method 'CreateKey' +type CreateKeyParams struct { + DeviceSid *string `json:"DeviceSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateKey Method for CreateKey +Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. + * @param FleetSid + * @param optional nil or *CreateKeyOpts - Optional Parameters: + * @param "DeviceSid" (string) - Provides the unique string identifier of an existing Device to become authenticated with this Key credential. + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Key credential, up to 256 characters long. +@return PreviewDeployedDevicesFleetKey +*/ +func (c *DefaultApiService) CreateKey(FleetSid string, params *CreateKeyParams) (*PreviewDeployedDevicesFleetKey, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Keys" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateModelBuildParams Optional parameters for the method 'CreateModelBuild' +type CreateModelBuildParams struct { + StatusCallback *string `json:"StatusCallback,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateModelBuild Method for CreateModelBuild + * @param AssistantSid + * @param optional nil or *CreateModelBuildOpts - Optional Parameters: + * @param "StatusCallback" (string) - + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 +@return PreviewUnderstandAssistantModelBuild +*/ +func (c *DefaultApiService) CreateModelBuild(AssistantSid string, params *CreateModelBuildParams) (*PreviewUnderstandAssistantModelBuild, error) { + path := "/understand/Assistants/{AssistantSid}/ModelBuilds" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateQueryParams Optional parameters for the method 'CreateQuery' +type CreateQueryParams struct { + Field *string `json:"Field,omitempty"` + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Query *string `json:"Query,omitempty"` + Tasks *string `json:"Tasks,omitempty"` +} + +/* +CreateQuery Method for CreateQuery + * @param AssistantSid The unique ID of the parent Assistant. + * @param optional nil or *CreateQueryOpts - Optional Parameters: + * @param "Field" (string) - Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name* + * @param "Language" (string) - An ISO language-country string of the sample. + * @param "ModelBuild" (string) - The Model Build Sid or unique name of the Model Build to be queried. + * @param "Query" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. + * @param "Tasks" (string) - Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2* +@return PreviewUnderstandAssistantQuery +*/ +func (c *DefaultApiService) CreateQuery(AssistantSid string, params *CreateQueryParams) (*PreviewUnderstandAssistantQuery, error) { + path := "/understand/Assistants/{AssistantSid}/Queries" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Field != nil { + data.Set("Field", *params.Field) + } + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Query != nil { + data.Set("Query", *params.Query) + } + if params != nil && params.Tasks != nil { + data.Set("Tasks", *params.Tasks) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRatePlanParams Optional parameters for the method 'CreateRatePlan' +type CreateRatePlanParams struct { + CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` + DataMetering *string `json:"DataMetering,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` + MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` + NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` +} + +/* +CreateRatePlan Method for CreateRatePlan + * @param optional nil or *CreateRatePlanOpts - Optional Parameters: + * @param "CommandsEnabled" (bool) - + * @param "DataEnabled" (bool) - + * @param "DataLimit" (int32) - + * @param "DataMetering" (string) - + * @param "FriendlyName" (string) - + * @param "InternationalRoaming" ([]string) - + * @param "MessagingEnabled" (bool) - + * @param "NationalRoamingEnabled" (bool) - + * @param "UniqueName" (string) - + * @param "VoiceEnabled" (bool) - +@return PreviewWirelessRatePlan +*/ +func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*PreviewWirelessRatePlan, error) { + path := "/wireless/RatePlans" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommandsEnabled != nil { + data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) + } + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) + } + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) + } + if params != nil && params.DataMetering != nil { + data.Set("DataMetering", *params.DataMetering) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InternationalRoaming != nil { + data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) + } + if params != nil && params.MessagingEnabled != nil { + data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) + } + if params != nil && params.NationalRoamingEnabled != nil { + data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessRatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSampleParams Optional parameters for the method 'CreateSample' +type CreateSampleParams struct { + Language *string `json:"Language,omitempty"` + SourceChannel *string `json:"SourceChannel,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` +} + +/* +CreateSample Method for CreateSample + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Sample. + * @param optional nil or *CreateSampleOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the sample. + * @param "SourceChannel" (string) - The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null + * @param "TaggedText" (string) - The text example of how end-users may express this task. The sample may contain Field tag blocks. +@return PreviewUnderstandAssistantTaskSample +*/ +func (c *DefaultApiService) CreateSample(AssistantSid string, TaskSid string, params *CreateSampleParams) (*PreviewUnderstandAssistantTaskSample, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "AclEnabled" (bool) - + * @param "FriendlyName" (string) - + * @param "ReachabilityWebhooksEnabled" (bool) - + * @param "WebhookUrl" (string) - +@return PreviewSyncService +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*PreviewSyncService, error) { + path := "/Sync/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncService{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncListParams Optional parameters for the method 'CreateSyncList' +type CreateSyncListParams struct { + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSyncList Method for CreateSyncList + * @param ServiceSid + * @param optional nil or *CreateSyncListOpts - Optional Parameters: + * @param "UniqueName" (string) - +@return PreviewSyncServiceSyncList +*/ +func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSyncListParams) (*PreviewSyncServiceSyncList, error) { + path := "/Sync/Services/{ServiceSid}/Lists" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncListItemParams Optional parameters for the method 'CreateSyncListItem' +type CreateSyncListItemParams struct { + Data *map[string]interface{} `json:"Data,omitempty"` +} + +/* +CreateSyncListItem Method for CreateSyncListItem + * @param ServiceSid + * @param ListSid + * @param optional nil or *CreateSyncListItemOpts - Optional Parameters: + * @param "Data" (map[string]interface{}) - +@return PreviewSyncServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string, params *CreateSyncListItemParams) (*PreviewSyncServiceSyncListSyncListItem, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncMapParams Optional parameters for the method 'CreateSyncMap' +type CreateSyncMapParams struct { + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSyncMap Method for CreateSyncMap + * @param ServiceSid + * @param optional nil or *CreateSyncMapOpts - Optional Parameters: + * @param "UniqueName" (string) - +@return PreviewSyncServiceSyncMap +*/ +func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncMapParams) (*PreviewSyncServiceSyncMap, error) { + path := "/Sync/Services/{ServiceSid}/Maps" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncMapItemParams Optional parameters for the method 'CreateSyncMapItem' +type CreateSyncMapItemParams struct { + Data *map[string]interface{} `json:"Data,omitempty"` + Key *string `json:"Key,omitempty"` +} + +/* +CreateSyncMapItem Method for CreateSyncMapItem + * @param ServiceSid + * @param MapSid + * @param optional nil or *CreateSyncMapItemOpts - Optional Parameters: + * @param "Data" (map[string]interface{}) - + * @param "Key" (string) - +@return PreviewSyncServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, params *CreateSyncMapItemParams) (*PreviewSyncServiceSyncMapSyncMapItem, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTaskParams Optional parameters for the method 'CreateTask' +type CreateTaskParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateTask Method for CreateTask + * @param AssistantSid The unique ID of the Assistant. + * @param optional nil or *CreateTaskOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. + * @param "ActionsUrl" (string) - User-provided HTTP endpoint where from the assistant fetches actions + * @param "FriendlyName" (string) - A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantTask +*/ +func (c *DefaultApiService) CreateTask(AssistantSid string, params *CreateTaskParams) (*PreviewUnderstandAssistantTask, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteAssistant Method for DeleteAssistant + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteAssistant(Sid string) (error) { + path := "/understand/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCertificate Method for DeleteCertificate +Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Certificate credential resource. +*/ +func (c *DefaultApiService) DeleteCertificate(FleetSid string, Sid string) (error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteDeployment Method for DeleteDeployment +Delete a specific Deployment from the Fleet, leaving associated devices effectively undeployed. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Deployment resource. +*/ +func (c *DefaultApiService) DeleteDeployment(FleetSid string, Sid string) (error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteDevice Method for DeleteDevice +Delete a specific Device from the Fleet, also removing it from associated Deployments. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Device resource. +*/ +func (c *DefaultApiService) DeleteDevice(FleetSid string, Sid string) (error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Devices/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteDocumentParams Optional parameters for the method 'DeleteDocument' +type DeleteDocumentParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteDocument Method for DeleteDocument + * @param ServiceSid + * @param Sid + * @param optional nil or *DeleteDocumentOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string, params *DeleteDocumentParams) (error) { + path := "/Sync/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteDocumentPermission Method for DeleteDocumentPermission +Delete a specific Sync Document Permission. + * @param ServiceSid + * @param DocumentSid Identifier of the Sync Document. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +*/ +func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (error) { + path := "/Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteField Method for DeleteField + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Field. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteField(AssistantSid string, TaskSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFieldType Method for DeleteFieldType + * @param AssistantSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteFieldType(AssistantSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFieldValue Method for DeleteFieldValue + * @param AssistantSid + * @param FieldTypeSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFleet Method for DeleteFleet +Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates, Keys. + * @param Sid Provides a 34 character string that uniquely identifies the requested Fleet resource. +*/ +func (c *DefaultApiService) DeleteFleet(Sid string) (error) { + path := "/DeployedDevices/Fleets/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteHostedNumberOrder Method for DeleteHostedNumberOrder +Cancel the HostedNumberOrder (only available when the status is in `received`). + * @param Sid A 34 character string that uniquely identifies this HostedNumberOrder. +*/ +func (c *DefaultApiService) DeleteHostedNumberOrder(Sid string) (error) { + path := "/HostedNumbers/HostedNumberOrders/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteInstalledAddOn Method for DeleteInstalledAddOn +Remove an Add-on installation from your account + * @param Sid The SID of the InstalledAddOn resource to delete. +*/ +func (c *DefaultApiService) DeleteInstalledAddOn(Sid string) (error) { + path := "/marketplace/InstalledAddOns/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteJob Method for DeleteJob + * @param JobSid The unique string that that we created to identify the Bulk Export job +*/ +func (c *DefaultApiService) DeleteJob(JobSid string) (error) { + path := "/BulkExports/Exports/Jobs/{JobSid}" + path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteKey Method for DeleteKey +Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Key credential resource. +*/ +func (c *DefaultApiService) DeleteKey(FleetSid string, Sid string) (error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteModelBuild Method for DeleteModelBuild + * @param AssistantSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteModelBuild(AssistantSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteQuery Method for DeleteQuery + * @param AssistantSid The unique ID of the Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteQuery(AssistantSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRatePlan Method for DeleteRatePlan + * @param Sid +*/ +func (c *DefaultApiService) DeleteRatePlan(Sid string) (error) { + path := "/wireless/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSample Method for DeleteSample + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Sample. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteSample(AssistantSid string, TaskSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/Sync/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncList Method for DeleteSyncList + * @param ServiceSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string) (error) { + path := "/Sync/Services/{ServiceSid}/Lists/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteSyncListItemParams Optional parameters for the method 'DeleteSyncListItem' +type DeleteSyncListItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteSyncListItem Method for DeleteSyncListItem + * @param ServiceSid + * @param ListSid + * @param Index + * @param optional nil or *DeleteSyncListItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) (error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncListPermission Method for DeleteSyncListPermission +Delete a specific Sync List Permission. + * @param ServiceSid + * @param ListSid Identifier of the Sync List. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +*/ +func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string) (error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncMap Method for DeleteSyncMap + * @param ServiceSid + * @param Sid +*/ +func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string) (error) { + path := "/Sync/Services/{ServiceSid}/Maps/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteSyncMapItemParams Optional parameters for the method 'DeleteSyncMapItem' +type DeleteSyncMapItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteSyncMapItem Method for DeleteSyncMapItem + * @param ServiceSid + * @param MapSid + * @param Key + * @param optional nil or *DeleteSyncMapItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) (error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncMapPermission Method for DeleteSyncMapPermission +Delete a specific Sync Map Permission. + * @param ServiceSid + * @param MapSid Identifier of the Sync Map. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +*/ +func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string) (error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTask Method for DeleteTask + * @param AssistantSid The unique ID of the Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. +*/ +func (c *DefaultApiService) DeleteTask(AssistantSid string, Sid string) (error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchAssistant Method for FetchAssistant + * @param Sid A 34 character string that uniquely identifies this resource. +@return PreviewUnderstandAssistant +*/ +func (c *DefaultApiService) FetchAssistant(Sid string) (*PreviewUnderstandAssistant, error) { + path := "/understand/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAssistantFallbackActions Method for FetchAssistantFallbackActions + * @param AssistantSid +@return PreviewUnderstandAssistantAssistantFallbackActions +*/ +func (c *DefaultApiService) FetchAssistantFallbackActions(AssistantSid string) (*PreviewUnderstandAssistantAssistantFallbackActions, error) { + path := "/understand/Assistants/{AssistantSid}/FallbackActions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantAssistantFallbackActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAssistantInitiationActions Method for FetchAssistantInitiationActions + * @param AssistantSid +@return PreviewUnderstandAssistantAssistantInitiationActions +*/ +func (c *DefaultApiService) FetchAssistantInitiationActions(AssistantSid string) (*PreviewUnderstandAssistantAssistantInitiationActions, error) { + path := "/understand/Assistants/{AssistantSid}/InitiationActions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantAssistantInitiationActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAuthorizationDocument Method for FetchAuthorizationDocument +Fetch a specific AuthorizationDocument. + * @param Sid A 34 character string that uniquely identifies this AuthorizationDocument. +@return PreviewHostedNumbersAuthorizationDocument +*/ +func (c *DefaultApiService) FetchAuthorizationDocument(Sid string) (*PreviewHostedNumbersAuthorizationDocument, error) { + path := "/HostedNumbers/AuthorizationDocuments/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersAuthorizationDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAvailableAddOn Method for FetchAvailableAddOn +Fetch an instance of an Add-on currently available to be installed. + * @param Sid The SID of the AvailableAddOn resource to fetch. +@return PreviewMarketplaceAvailableAddOn +*/ +func (c *DefaultApiService) FetchAvailableAddOn(Sid string) (*PreviewMarketplaceAvailableAddOn, error) { + path := "/marketplace/AvailableAddOns/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceAvailableAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAvailableAddOnExtension Method for FetchAvailableAddOnExtension +Fetch an instance of an Extension for the Available Add-on. + * @param AvailableAddOnSid The SID of the AvailableAddOn resource with the extension to fetch. + * @param Sid The SID of the AvailableAddOn Extension resource to fetch. +@return PreviewMarketplaceAvailableAddOnAvailableAddOnExtension +*/ +func (c *DefaultApiService) FetchAvailableAddOnExtension(AvailableAddOnSid string, Sid string) (*PreviewMarketplaceAvailableAddOnAvailableAddOnExtension, error) { + path := "/marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid}" + path = strings.Replace(path, "{"+"AvailableAddOnSid"+"}", AvailableAddOnSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceAvailableAddOnAvailableAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchBrandedChannel Method for FetchBrandedChannel +Fetch a specific Branded Channel. + * @param Sid The unique SID identifier of the Branded Channel. +@return PreviewTrustedCommsBrandedChannel +*/ +func (c *DefaultApiService) FetchBrandedChannel(Sid string) (*PreviewTrustedCommsBrandedChannel, error) { + path := "/TrustedComms/BrandedChannels/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewTrustedCommsBrandedChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchBrandsInformationParams Optional parameters for the method 'FetchBrandsInformation' +type FetchBrandsInformationParams struct { + IfNoneMatch *string `json:"If-None-Match,omitempty"` +} + +/* +FetchBrandsInformation Method for FetchBrandsInformation +Retrieve the newest available BrandInformation + * @param optional nil or *FetchBrandsInformationOpts - Optional Parameters: + * @param "IfNoneMatch" (string) - The If-None-Match HTTP request header +@return PreviewTrustedCommsBrandsInformation +*/ +func (c *DefaultApiService) FetchBrandsInformation(params *FetchBrandsInformationParams) (*PreviewTrustedCommsBrandsInformation, error) { + path := "/TrustedComms/BrandsInformation" + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfNoneMatch != nil { + headers["IfNoneMatch"] = *params.IfNoneMatch + } + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewTrustedCommsBrandsInformation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCertificate Method for FetchCertificate +Fetch information about a specific Certificate credential in the Fleet. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Certificate credential resource. +@return PreviewDeployedDevicesFleetCertificate +*/ +func (c *DefaultApiService) FetchCertificate(FleetSid string, Sid string) (*PreviewDeployedDevicesFleetCertificate, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetCertificate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCommand Method for FetchCommand + * @param Sid +@return PreviewWirelessCommand +*/ +func (c *DefaultApiService) FetchCommand(Sid string) (*PreviewWirelessCommand, error) { + path := "/wireless/Commands/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessCommand{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchCpsParams Optional parameters for the method 'FetchCps' +type FetchCpsParams struct { + XXcnamSensitivePhoneNumber *string `json:"X-Xcnam-Sensitive-Phone-Number,omitempty"` +} + +/* +FetchCps Method for FetchCps +Fetch a specific Call Placement Service (CPS) given a phone number via `X-XCNAM-Sensitive-Phone-Number` header. + * @param optional nil or *FetchCpsOpts - Optional Parameters: + * @param "XXcnamSensitivePhoneNumber" (string) - The X-Xcnam-Sensitive-Phone-Number HTTP request header +@return PreviewTrustedCommsCps +*/ +func (c *DefaultApiService) FetchCps(params *FetchCpsParams) (*PreviewTrustedCommsCps, error) { + path := "/TrustedComms/CPS" + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XXcnamSensitivePhoneNumber != nil { + headers["XXcnamSensitivePhoneNumber"] = *params.XXcnamSensitivePhoneNumber + } + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewTrustedCommsCps{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchCurrentCallParams Optional parameters for the method 'FetchCurrentCall' +type FetchCurrentCallParams struct { + XXcnamSensitivePhoneNumberFrom *string `json:"X-Xcnam-Sensitive-Phone-Number-From,omitempty"` + XXcnamSensitivePhoneNumberTo *string `json:"X-Xcnam-Sensitive-Phone-Number-To,omitempty"` +} + +/* +FetchCurrentCall Method for FetchCurrentCall +Retrieve a current call given the originating and terminating number via `X-XCNAM-Sensitive-Phone-Number-From` and `X-XCNAM-Sensitive-Phone-Number-To` headers. + * @param optional nil or *FetchCurrentCallOpts - Optional Parameters: + * @param "XXcnamSensitivePhoneNumberFrom" (string) - The X-Xcnam-Sensitive-Phone-Number-From HTTP request header + * @param "XXcnamSensitivePhoneNumberTo" (string) - The X-Xcnam-Sensitive-Phone-Number-To HTTP request header +@return PreviewTrustedCommsCurrentCall +*/ +func (c *DefaultApiService) FetchCurrentCall(params *FetchCurrentCallParams) (*PreviewTrustedCommsCurrentCall, error) { + path := "/TrustedComms/CurrentCall" + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.XXcnamSensitivePhoneNumberFrom != nil { + headers["XXcnamSensitivePhoneNumberFrom"] = *params.XXcnamSensitivePhoneNumberFrom + } + if params != nil && params.XXcnamSensitivePhoneNumberTo != nil { + headers["XXcnamSensitivePhoneNumberTo"] = *params.XXcnamSensitivePhoneNumberTo + } + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewTrustedCommsCurrentCall{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDay Method for FetchDay +Fetch a specific Day. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param Day The ISO 8601 format date of the resources in the file, for a UTC day +*/ +func (c *DefaultApiService) FetchDay(ResourceType string, Day string) (error) { + path := "/BulkExports/Exports/{ResourceType}/Days/{Day}" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + path = strings.Replace(path, "{"+"Day"+"}", Day, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchDeployment Method for FetchDeployment +Fetch information about a specific Deployment in the Fleet. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Deployment resource. +@return PreviewDeployedDevicesFleetDeployment +*/ +func (c *DefaultApiService) FetchDeployment(FleetSid string, Sid string) (*PreviewDeployedDevicesFleetDeployment, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDevice Method for FetchDevice +Fetch information about a specific Device in the Fleet. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Device resource. +@return PreviewDeployedDevicesFleetDevice +*/ +func (c *DefaultApiService) FetchDevice(FleetSid string, Sid string) (*PreviewDeployedDevicesFleetDevice, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Devices/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDevice{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDialogue Method for FetchDialogue + * @param AssistantSid + * @param Sid +@return PreviewUnderstandAssistantDialogue +*/ +func (c *DefaultApiService) FetchDialogue(AssistantSid string, Sid string) (*PreviewUnderstandAssistantDialogue, error) { + path := "/understand/Assistants/{AssistantSid}/Dialogues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantDialogue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDocument Method for FetchDocument + * @param ServiceSid + * @param Sid +@return PreviewSyncServiceDocument +*/ +func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string) (*PreviewSyncServiceDocument, error) { + path := "/Sync/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDocumentPermission Method for FetchDocumentPermission +Fetch a specific Sync Document Permission. + * @param ServiceSid + * @param DocumentSid Identifier of the Sync Document. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +@return PreviewSyncServiceDocumentDocumentPermission +*/ +func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (*PreviewSyncServiceDocumentDocumentPermission, error) { + path := "/Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExport Method for FetchExport +Fetch a specific Export. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants +@return PreviewBulkExportsExport +*/ +func (c *DefaultApiService) FetchExport(ResourceType string) (*PreviewBulkExportsExport, error) { + path := "/BulkExports/Exports/{ResourceType}" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewBulkExportsExport{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExportConfiguration Method for FetchExportConfiguration +Fetch a specific Export Configuration. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants +@return PreviewBulkExportsExportConfiguration +*/ +func (c *DefaultApiService) FetchExportConfiguration(ResourceType string) (*PreviewBulkExportsExportConfiguration, error) { + path := "/BulkExports/Exports/{ResourceType}/Configuration" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewBulkExportsExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchField Method for FetchField + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Field. + * @param Sid A 34 character string that uniquely identifies this resource. +@return PreviewUnderstandAssistantTaskField +*/ +func (c *DefaultApiService) FetchField(AssistantSid string, TaskSid string, Sid string) (*PreviewUnderstandAssistantTaskField, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskField{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFieldType Method for FetchFieldType + * @param AssistantSid + * @param Sid +@return PreviewUnderstandAssistantFieldType +*/ +func (c *DefaultApiService) FetchFieldType(AssistantSid string, Sid string) (*PreviewUnderstandAssistantFieldType, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFieldValue Method for FetchFieldValue + * @param AssistantSid + * @param FieldTypeSid + * @param Sid +@return PreviewUnderstandAssistantFieldTypeFieldValue +*/ +func (c *DefaultApiService) FetchFieldValue(AssistantSid string, FieldTypeSid string, Sid string) (*PreviewUnderstandAssistantFieldTypeFieldValue, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantFieldTypeFieldValue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFleet Method for FetchFleet +Fetch information about a specific Fleet in your account. + * @param Sid Provides a 34 character string that uniquely identifies the requested Fleet resource. +@return PreviewDeployedDevicesFleet +*/ +func (c *DefaultApiService) FetchFleet(Sid string) (*PreviewDeployedDevicesFleet, error) { + path := "/DeployedDevices/Fleets/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchHostedNumberOrder Method for FetchHostedNumberOrder +Fetch a specific HostedNumberOrder. + * @param Sid A 34 character string that uniquely identifies this HostedNumberOrder. +@return PreviewHostedNumbersHostedNumberOrder +*/ +func (c *DefaultApiService) FetchHostedNumberOrder(Sid string) (*PreviewHostedNumbersHostedNumberOrder, error) { + path := "/HostedNumbers/HostedNumberOrders/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersHostedNumberOrder{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchInstalledAddOn Method for FetchInstalledAddOn +Fetch an instance of an Add-on currently installed on this Account. + * @param Sid The SID of the InstalledAddOn resource to fetch. +@return PreviewMarketplaceInstalledAddOn +*/ +func (c *DefaultApiService) FetchInstalledAddOn(Sid string) (*PreviewMarketplaceInstalledAddOn, error) { + path := "/marketplace/InstalledAddOns/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceInstalledAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchInstalledAddOnExtension Method for FetchInstalledAddOnExtension +Fetch an instance of an Extension for the Installed Add-on. + * @param InstalledAddOnSid The SID of the InstalledAddOn resource with the extension to fetch. + * @param Sid The SID of the InstalledAddOn Extension resource to fetch. +@return PreviewMarketplaceInstalledAddOnInstalledAddOnExtension +*/ +func (c *DefaultApiService) FetchInstalledAddOnExtension(InstalledAddOnSid string, Sid string) (*PreviewMarketplaceInstalledAddOnInstalledAddOnExtension, error) { + path := "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}" + path = strings.Replace(path, "{"+"InstalledAddOnSid"+"}", InstalledAddOnSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceInstalledAddOnInstalledAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchJob Method for FetchJob + * @param JobSid The unique string that that we created to identify the Bulk Export job +@return PreviewBulkExportsExportJob +*/ +func (c *DefaultApiService) FetchJob(JobSid string) (*PreviewBulkExportsExportJob, error) { + path := "/BulkExports/Exports/Jobs/{JobSid}" + path = strings.Replace(path, "{"+"JobSid"+"}", JobSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewBulkExportsExportJob{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchKey Method for FetchKey +Fetch information about a specific Key credential in the Fleet. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Key credential resource. +@return PreviewDeployedDevicesFleetKey +*/ +func (c *DefaultApiService) FetchKey(FleetSid string, Sid string) (*PreviewDeployedDevicesFleetKey, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchModelBuild Method for FetchModelBuild + * @param AssistantSid + * @param Sid +@return PreviewUnderstandAssistantModelBuild +*/ +func (c *DefaultApiService) FetchModelBuild(AssistantSid string, Sid string) (*PreviewUnderstandAssistantModelBuild, error) { + path := "/understand/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchQuery Method for FetchQuery + * @param AssistantSid The unique ID of the Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. +@return PreviewUnderstandAssistantQuery +*/ +func (c *DefaultApiService) FetchQuery(AssistantSid string, Sid string) (*PreviewUnderstandAssistantQuery, error) { + path := "/understand/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRatePlan Method for FetchRatePlan + * @param Sid +@return PreviewWirelessRatePlan +*/ +func (c *DefaultApiService) FetchRatePlan(Sid string) (*PreviewWirelessRatePlan, error) { + path := "/wireless/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessRatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSample Method for FetchSample + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Sample. + * @param Sid A 34 character string that uniquely identifies this resource. +@return PreviewUnderstandAssistantTaskSample +*/ +func (c *DefaultApiService) FetchSample(AssistantSid string, TaskSid string, Sid string) (*PreviewUnderstandAssistantTaskSample, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid +@return PreviewSyncService +*/ +func (c *DefaultApiService) FetchService(Sid string) (*PreviewSyncService, error) { + path := "/Sync/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncService{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSim Method for FetchSim + * @param Sid +@return PreviewWirelessSim +*/ +func (c *DefaultApiService) FetchSim(Sid string) (*PreviewWirelessSim, error) { + path := "/wireless/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessSim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchStyleSheet Method for FetchStyleSheet +Returns Style sheet JSON object for this Assistant + * @param AssistantSid The unique ID of the Assistant +@return PreviewUnderstandAssistantStyleSheet +*/ +func (c *DefaultApiService) FetchStyleSheet(AssistantSid string) (*PreviewUnderstandAssistantStyleSheet, error) { + path := "/understand/Assistants/{AssistantSid}/StyleSheet" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncList Method for FetchSyncList + * @param ServiceSid + * @param Sid +@return PreviewSyncServiceSyncList +*/ +func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string) (*PreviewSyncServiceSyncList, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncListItem Method for FetchSyncListItem + * @param ServiceSid + * @param ListSid + * @param Index +@return PreviewSyncServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32) (*PreviewSyncServiceSyncListSyncListItem, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncListPermission Method for FetchSyncListPermission +Fetch a specific Sync List Permission. + * @param ServiceSid + * @param ListSid Identifier of the Sync List. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +@return PreviewSyncServiceSyncListSyncListPermission +*/ +func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string) (*PreviewSyncServiceSyncListSyncListPermission, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMap Method for FetchSyncMap + * @param ServiceSid + * @param Sid +@return PreviewSyncServiceSyncMap +*/ +func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string) (*PreviewSyncServiceSyncMap, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMapItem Method for FetchSyncMapItem + * @param ServiceSid + * @param MapSid + * @param Key +@return PreviewSyncServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string) (*PreviewSyncServiceSyncMapSyncMapItem, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMapPermission Method for FetchSyncMapPermission +Fetch a specific Sync Map Permission. + * @param ServiceSid + * @param MapSid Identifier of the Sync Map. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. +@return PreviewSyncServiceSyncMapSyncMapPermission +*/ +func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string) (*PreviewSyncServiceSyncMapSyncMapPermission, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTask Method for FetchTask + * @param AssistantSid The unique ID of the Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. +@return PreviewUnderstandAssistantTask +*/ +func (c *DefaultApiService) FetchTask(AssistantSid string, Sid string) (*PreviewUnderstandAssistantTask, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskActions Method for FetchTaskActions +Returns JSON actions for this Task. + * @param AssistantSid The unique ID of the parent Assistant. + * @param TaskSid The unique ID of the Task. +@return PreviewUnderstandAssistantTaskTaskActions +*/ +func (c *DefaultApiService) FetchTaskActions(AssistantSid string, TaskSid string) (*PreviewUnderstandAssistantTaskTaskActions, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskStatistics Method for FetchTaskStatistics + * @param AssistantSid The unique ID of the parent Assistant. + * @param TaskSid The unique ID of the Task associated with this Field. +@return PreviewUnderstandAssistantTaskTaskStatistics +*/ +func (c *DefaultApiService) FetchTaskStatistics(AssistantSid string, TaskSid string) (*PreviewUnderstandAssistantTaskTaskStatistics, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskTaskStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchUsageParams Optional parameters for the method 'FetchUsage' +type FetchUsageParams struct { + End *string `json:"End,omitempty"` + Start *string `json:"Start,omitempty"` +} + +/* +FetchUsage Method for FetchUsage + * @param SimSid + * @param optional nil or *FetchUsageOpts - Optional Parameters: + * @param "End" (string) - + * @param "Start" (string) - +@return PreviewWirelessSimUsage +*/ +func (c *DefaultApiService) FetchUsage(SimSid string, params *FetchUsageParams) (*PreviewWirelessSimUsage, error) { + path := "/wireless/Sims/{SimSid}/Usage" + path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.End != nil { + data.Set("End", *params.End) + } + if params != nil && params.Start != nil { + data.Set("Start", *params.Start) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessSimUsage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAssistantParams Optional parameters for the method 'ListAssistant' +type ListAssistantParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAssistant Method for ListAssistant + * @param optional nil or *ListAssistantOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAssistantResponse +*/ +func (c *DefaultApiService) ListAssistant(params *ListAssistantParams) (*ListAssistantResponse, error) { + path := "/understand/Assistants" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAssistantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAuthorizationDocumentParams Optional parameters for the method 'ListAuthorizationDocument' +type ListAuthorizationDocumentParams struct { + Email *string `json:"Email,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAuthorizationDocument Method for ListAuthorizationDocument +Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. + * @param optional nil or *ListAuthorizationDocumentOpts - Optional Parameters: + * @param "Email" (string) - Email that this AuthorizationDocument will be sent to for signing. + * @param "Status" (string) - Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAuthorizationDocumentResponse +*/ +func (c *DefaultApiService) ListAuthorizationDocument(params *ListAuthorizationDocumentParams) (*ListAuthorizationDocumentResponse, error) { + path := "/HostedNumbers/AuthorizationDocuments" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAuthorizationDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailableAddOnParams Optional parameters for the method 'ListAvailableAddOn' +type ListAvailableAddOnParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailableAddOn Method for ListAvailableAddOn +Retrieve a list of Add-ons currently available to be installed. + * @param optional nil or *ListAvailableAddOnOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailableAddOnResponse +*/ +func (c *DefaultApiService) ListAvailableAddOn(params *ListAvailableAddOnParams) (*ListAvailableAddOnResponse, error) { + path := "/marketplace/AvailableAddOns" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailableAddOnResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAvailableAddOnExtensionParams Optional parameters for the method 'ListAvailableAddOnExtension' +type ListAvailableAddOnExtensionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAvailableAddOnExtension Method for ListAvailableAddOnExtension +Retrieve a list of Extensions for the Available Add-on. + * @param AvailableAddOnSid The SID of the AvailableAddOn resource with the extensions to read. + * @param optional nil or *ListAvailableAddOnExtensionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAvailableAddOnExtensionResponse +*/ +func (c *DefaultApiService) ListAvailableAddOnExtension(AvailableAddOnSid string, params *ListAvailableAddOnExtensionParams) (*ListAvailableAddOnExtensionResponse, error) { + path := "/marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions" + path = strings.Replace(path, "{"+"AvailableAddOnSid"+"}", AvailableAddOnSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAvailableAddOnExtensionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCertificateParams Optional parameters for the method 'ListCertificate' +type ListCertificateParams struct { + DeviceSid *string `json:"DeviceSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCertificate Method for ListCertificate +Retrieve a list of all Certificate credentials belonging to the Fleet. + * @param FleetSid + * @param optional nil or *ListCertificateOpts - Optional Parameters: + * @param "DeviceSid" (string) - Filters the resulting list of Certificates by a unique string identifier of an authenticated Device. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCertificateResponse +*/ +func (c *DefaultApiService) ListCertificate(FleetSid string, params *ListCertificateParams) (*ListCertificateResponse, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Certificates" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCertificateResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCommandParams Optional parameters for the method 'ListCommand' +type ListCommandParams struct { + Device *string `json:"Device,omitempty"` + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` + Direction *string `json:"Direction,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCommand Method for ListCommand + * @param optional nil or *ListCommandOpts - Optional Parameters: + * @param "Device" (string) - + * @param "Sim" (string) - + * @param "Status" (string) - + * @param "Direction" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCommandResponse +*/ +func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { + path := "/wireless/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Device != nil { + data.Set("Device", *params.Device) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDayParams Optional parameters for the method 'ListDay' +type ListDayParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDay Method for ListDay +Retrieve a list of all Days for a resource. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *ListDayOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDayResponse +*/ +func (c *DefaultApiService) ListDay(ResourceType string, params *ListDayParams) (*ListDayResponse, error) { + path := "/BulkExports/Exports/{ResourceType}/Days" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDayResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDependentHostedNumberOrderParams Optional parameters for the method 'ListDependentHostedNumberOrder' +type ListDependentHostedNumberOrderParams struct { + Status *string `json:"Status,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + IncomingPhoneNumberSid *string `json:"IncomingPhoneNumberSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDependentHostedNumberOrder Method for ListDependentHostedNumberOrder +Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. + * @param SigningDocumentSid + * @param optional nil or *ListDependentHostedNumberOrderOpts - Optional Parameters: + * @param "Status" (string) - Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + * @param "PhoneNumber" (string) - An E164 formatted phone number hosted by this HostedNumberOrder. + * @param "IncomingPhoneNumberSid" (string) - A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. + * @param "FriendlyName" (string) - A human readable description of this resource, up to 64 characters. + * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDependentHostedNumberOrderResponse +*/ +func (c *DefaultApiService) ListDependentHostedNumberOrder(SigningDocumentSid string, params *ListDependentHostedNumberOrderParams) (*ListDependentHostedNumberOrderResponse, error) { + path := "/HostedNumbers/AuthorizationDocuments/{SigningDocumentSid}/DependentHostedNumberOrders" + path = strings.Replace(path, "{"+"SigningDocumentSid"+"}", SigningDocumentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.IncomingPhoneNumberSid != nil { + data.Set("IncomingPhoneNumberSid", *params.IncomingPhoneNumberSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDependentHostedNumberOrderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDeploymentParams Optional parameters for the method 'ListDeployment' +type ListDeploymentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDeployment Method for ListDeployment +Retrieve a list of all Deployments belonging to the Fleet. + * @param FleetSid + * @param optional nil or *ListDeploymentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDeploymentResponse +*/ +func (c *DefaultApiService) ListDeployment(FleetSid string, params *ListDeploymentParams) (*ListDeploymentResponse, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Deployments" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDeploymentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDeviceParams Optional parameters for the method 'ListDevice' +type ListDeviceParams struct { + DeploymentSid *string `json:"DeploymentSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDevice Method for ListDevice +Retrieve a list of all Devices belonging to the Fleet. + * @param FleetSid + * @param optional nil or *ListDeviceOpts - Optional Parameters: + * @param "DeploymentSid" (string) - Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDeviceResponse +*/ +func (c *DefaultApiService) ListDevice(FleetSid string, params *ListDeviceParams) (*ListDeviceResponse, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Devices" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeploymentSid != nil { + data.Set("DeploymentSid", *params.DeploymentSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDeviceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDocumentParams Optional parameters for the method 'ListDocument' +type ListDocumentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDocument Method for ListDocument + * @param ServiceSid + * @param optional nil or *ListDocumentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDocumentResponse +*/ +func (c *DefaultApiService) ListDocument(ServiceSid string, params *ListDocumentParams) (*ListDocumentResponse, error) { + path := "/Sync/Services/{ServiceSid}/Documents" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDocumentPermissionParams Optional parameters for the method 'ListDocumentPermission' +type ListDocumentPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDocumentPermission Method for ListDocumentPermission +Retrieve a list of all Permissions applying to a Sync Document. + * @param ServiceSid + * @param DocumentSid Identifier of the Sync Document. Either a SID or a unique name. + * @param optional nil or *ListDocumentPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDocumentPermissionResponse +*/ +func (c *DefaultApiService) ListDocumentPermission(ServiceSid string, DocumentSid string, params *ListDocumentPermissionParams) (*ListDocumentPermissionResponse, error) { + path := "/Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDocumentPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExportCustomJobParams Optional parameters for the method 'ListExportCustomJob' +type ListExportCustomJobParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExportCustomJob Method for ListExportCustomJob + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *ListExportCustomJobOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExportCustomJobResponse +*/ +func (c *DefaultApiService) ListExportCustomJob(ResourceType string, params *ListExportCustomJobParams) (*ListExportCustomJobResponse, error) { + path := "/BulkExports/Exports/{ResourceType}/Jobs" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExportCustomJobResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldParams Optional parameters for the method 'ListField' +type ListFieldParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListField Method for ListField + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Field. + * @param optional nil or *ListFieldOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldResponse +*/ +func (c *DefaultApiService) ListField(AssistantSid string, TaskSid string, params *ListFieldParams) (*ListFieldResponse, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldTypeParams Optional parameters for the method 'ListFieldType' +type ListFieldTypeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFieldType Method for ListFieldType + * @param AssistantSid + * @param optional nil or *ListFieldTypeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldTypeResponse +*/ +func (c *DefaultApiService) ListFieldType(AssistantSid string, params *ListFieldTypeParams) (*ListFieldTypeResponse, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldTypeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFieldValueParams Optional parameters for the method 'ListFieldValue' +type ListFieldValueParams struct { + Language *string `json:"Language,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFieldValue Method for ListFieldValue + * @param AssistantSid + * @param FieldTypeSid + * @param optional nil or *ListFieldValueOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the value. For example: *en-US* + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFieldValueResponse +*/ +func (c *DefaultApiService) ListFieldValue(AssistantSid string, FieldTypeSid string, params *ListFieldValueParams) (*ListFieldValueResponse, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"FieldTypeSid"+"}", FieldTypeSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFieldValueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFleetParams Optional parameters for the method 'ListFleet' +type ListFleetParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFleet Method for ListFleet +Retrieve a list of all Fleets belonging to your account. + * @param optional nil or *ListFleetOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFleetResponse +*/ +func (c *DefaultApiService) ListFleet(params *ListFleetParams) (*ListFleetResponse, error) { + path := "/DeployedDevices/Fleets" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFleetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListHostedNumberOrderParams Optional parameters for the method 'ListHostedNumberOrder' +type ListHostedNumberOrderParams struct { + Status *string `json:"Status,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + IncomingPhoneNumberSid *string `json:"IncomingPhoneNumberSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListHostedNumberOrder Method for ListHostedNumberOrder +Retrieve a list of HostedNumberOrders belonging to the account initiating the request. + * @param optional nil or *ListHostedNumberOrderOpts - Optional Parameters: + * @param "Status" (string) - The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`. + * @param "PhoneNumber" (string) - An E164 formatted phone number hosted by this HostedNumberOrder. + * @param "IncomingPhoneNumberSid" (string) - A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. + * @param "FriendlyName" (string) - A human readable description of this resource, up to 64 characters. + * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListHostedNumberOrderResponse +*/ +func (c *DefaultApiService) ListHostedNumberOrder(params *ListHostedNumberOrderParams) (*ListHostedNumberOrderResponse, error) { + path := "/HostedNumbers/HostedNumberOrders" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.IncomingPhoneNumberSid != nil { + data.Set("IncomingPhoneNumberSid", *params.IncomingPhoneNumberSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListHostedNumberOrderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInstalledAddOnParams Optional parameters for the method 'ListInstalledAddOn' +type ListInstalledAddOnParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInstalledAddOn Method for ListInstalledAddOn +Retrieve a list of Add-ons currently installed on this Account. + * @param optional nil or *ListInstalledAddOnOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInstalledAddOnResponse +*/ +func (c *DefaultApiService) ListInstalledAddOn(params *ListInstalledAddOnParams) (*ListInstalledAddOnResponse, error) { + path := "/marketplace/InstalledAddOns" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInstalledAddOnResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInstalledAddOnExtensionParams Optional parameters for the method 'ListInstalledAddOnExtension' +type ListInstalledAddOnExtensionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInstalledAddOnExtension Method for ListInstalledAddOnExtension +Retrieve a list of Extensions for the Installed Add-on. + * @param InstalledAddOnSid The SID of the InstalledAddOn resource with the extensions to read. + * @param optional nil or *ListInstalledAddOnExtensionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInstalledAddOnExtensionResponse +*/ +func (c *DefaultApiService) ListInstalledAddOnExtension(InstalledAddOnSid string, params *ListInstalledAddOnExtensionParams) (*ListInstalledAddOnExtensionResponse, error) { + path := "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions" + path = strings.Replace(path, "{"+"InstalledAddOnSid"+"}", InstalledAddOnSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInstalledAddOnExtensionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListKeyParams Optional parameters for the method 'ListKey' +type ListKeyParams struct { + DeviceSid *string `json:"DeviceSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListKey Method for ListKey +Retrieve a list of all Keys credentials belonging to the Fleet. + * @param FleetSid + * @param optional nil or *ListKeyOpts - Optional Parameters: + * @param "DeviceSid" (string) - Filters the resulting list of Keys by a unique string identifier of an authenticated Device. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListKeyResponse +*/ +func (c *DefaultApiService) ListKey(FleetSid string, params *ListKeyParams) (*ListKeyResponse, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Keys" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListModelBuildParams Optional parameters for the method 'ListModelBuild' +type ListModelBuildParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListModelBuild Method for ListModelBuild + * @param AssistantSid + * @param optional nil or *ListModelBuildOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListModelBuildResponse +*/ +func (c *DefaultApiService) ListModelBuild(AssistantSid string, params *ListModelBuildParams) (*ListModelBuildResponse, error) { + path := "/understand/Assistants/{AssistantSid}/ModelBuilds" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListModelBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListQueryParams Optional parameters for the method 'ListQuery' +type ListQueryParams struct { + Language *string `json:"Language,omitempty"` + ModelBuild *string `json:"ModelBuild,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListQuery Method for ListQuery + * @param AssistantSid The unique ID of the parent Assistant. + * @param optional nil or *ListQueryOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the sample. + * @param "ModelBuild" (string) - The Model Build Sid or unique name of the Model Build to be queried. + * @param "Status" (string) - A string that described the query status. The values can be: pending_review, reviewed, discarded + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListQueryResponse +*/ +func (c *DefaultApiService) ListQuery(AssistantSid string, params *ListQueryParams) (*ListQueryResponse, error) { + path := "/understand/Assistants/{AssistantSid}/Queries" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.ModelBuild != nil { + data.Set("ModelBuild", *params.ModelBuild) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListQueryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRatePlanParams Optional parameters for the method 'ListRatePlan' +type ListRatePlanParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRatePlan Method for ListRatePlan + * @param optional nil or *ListRatePlanOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRatePlanResponse +*/ +func (c *DefaultApiService) ListRatePlan(params *ListRatePlanParams) (*ListRatePlanResponse, error) { + path := "/wireless/RatePlans" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRatePlanResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSampleParams Optional parameters for the method 'ListSample' +type ListSampleParams struct { + Language *string `json:"Language,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSample Method for ListSample + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Sample. + * @param optional nil or *ListSampleOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the sample. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSampleResponse +*/ +func (c *DefaultApiService) ListSample(AssistantSid string, TaskSid string, params *ListSampleParams) (*ListSampleResponse, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSampleResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/Sync/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSimParams Optional parameters for the method 'ListSim' +type ListSimParams struct { + Status *string `json:"Status,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + EId *string `json:"EId,omitempty"` + SimRegistrationCode *string `json:"SimRegistrationCode,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSim Method for ListSim + * @param optional nil or *ListSimOpts - Optional Parameters: + * @param "Status" (string) - + * @param "Iccid" (string) - + * @param "RatePlan" (string) - + * @param "EId" (string) - + * @param "SimRegistrationCode" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSimResponse +*/ +func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { + path := "/wireless/Sims" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.EId != nil { + data.Set("EId", *params.EId) + } + if params != nil && params.SimRegistrationCode != nil { + data.Set("SimRegistrationCode", *params.SimRegistrationCode) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListParams Optional parameters for the method 'ListSyncList' +type ListSyncListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncList Method for ListSyncList + * @param ServiceSid + * @param optional nil or *ListSyncListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListResponse +*/ +func (c *DefaultApiService) ListSyncList(ServiceSid string, params *ListSyncListParams) (*ListSyncListResponse, error) { + path := "/Sync/Services/{ServiceSid}/Lists" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListItemParams Optional parameters for the method 'ListSyncListItem' +type ListSyncListItemParams struct { + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncListItem Method for ListSyncListItem + * @param ServiceSid + * @param ListSid + * @param optional nil or *ListSyncListItemOpts - Optional Parameters: + * @param "Order" (string) - + * @param "From" (string) - + * @param "Bounds" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListItemResponse +*/ +func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, params *ListSyncListItemParams) (*ListSyncListItemResponse, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListPermissionParams Optional parameters for the method 'ListSyncListPermission' +type ListSyncListPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncListPermission Method for ListSyncListPermission +Retrieve a list of all Permissions applying to a Sync List. + * @param ServiceSid + * @param ListSid Identifier of the Sync List. Either a SID or a unique name. + * @param optional nil or *ListSyncListPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListPermissionResponse +*/ +func (c *DefaultApiService) ListSyncListPermission(ServiceSid string, ListSid string, params *ListSyncListPermissionParams) (*ListSyncListPermissionResponse, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapParams Optional parameters for the method 'ListSyncMap' +type ListSyncMapParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMap Method for ListSyncMap + * @param ServiceSid + * @param optional nil or *ListSyncMapOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapResponse +*/ +func (c *DefaultApiService) ListSyncMap(ServiceSid string, params *ListSyncMapParams) (*ListSyncMapResponse, error) { + path := "/Sync/Services/{ServiceSid}/Maps" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapItemParams Optional parameters for the method 'ListSyncMapItem' +type ListSyncMapItemParams struct { + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMapItem Method for ListSyncMapItem + * @param ServiceSid + * @param MapSid + * @param optional nil or *ListSyncMapItemOpts - Optional Parameters: + * @param "Order" (string) - + * @param "From" (string) - + * @param "Bounds" (string) - + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapItemResponse +*/ +func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, params *ListSyncMapItemParams) (*ListSyncMapItemResponse, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapPermissionParams Optional parameters for the method 'ListSyncMapPermission' +type ListSyncMapPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMapPermission Method for ListSyncMapPermission +Retrieve a list of all Permissions applying to a Sync Map. + * @param ServiceSid + * @param MapSid Identifier of the Sync Map. Either a SID or a unique name. + * @param optional nil or *ListSyncMapPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapPermissionResponse +*/ +func (c *DefaultApiService) ListSyncMapPermission(ServiceSid string, MapSid string, params *ListSyncMapPermissionParams) (*ListSyncMapPermissionResponse, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskParams Optional parameters for the method 'ListTask' +type ListTaskParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTask Method for ListTask + * @param AssistantSid The unique ID of the Assistant. + * @param optional nil or *ListTaskOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskResponse +*/ +func (c *DefaultApiService) ListTask(AssistantSid string, params *ListTaskParams) (*ListTaskResponse, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAssistantParams Optional parameters for the method 'UpdateAssistant' +type UpdateAssistantParams struct { + CallbackEvents *string `json:"CallbackEvents,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + FallbackActions *map[string]interface{} `json:"FallbackActions,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InitiationActions *map[string]interface{} `json:"InitiationActions,omitempty"` + LogQueries *bool `json:"LogQueries,omitempty"` + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateAssistant Method for UpdateAssistant + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateAssistantOpts - Optional Parameters: + * @param "CallbackEvents" (string) - Space-separated list of callback events that will trigger callbacks. + * @param "CallbackUrl" (string) - A user-provided URL to send event callbacks to. + * @param "FallbackActions" (map[string]interface{}) - The JSON actions to be executed when the user's input is not recognized as matching any Task. + * @param "FriendlyName" (string) - A text description for the Assistant. It is non-unique and can up to 255 characters long. + * @param "InitiationActions" (map[string]interface{}) - The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. + * @param "LogQueries" (bool) - A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. + * @param "StyleSheet" (map[string]interface{}) - The JSON object that holds the style sheet for the assistant + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistant +*/ +func (c *DefaultApiService) UpdateAssistant(Sid string, params *UpdateAssistantParams) (*PreviewUnderstandAssistant, error) { + path := "/understand/Assistants/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackEvents != nil { + data.Set("CallbackEvents", *params.CallbackEvents) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.FallbackActions != nil { + v, err := json.Marshal(params.FallbackActions) + + if err != nil { + return nil, err + } + + data.Set("FallbackActions", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InitiationActions != nil { + v, err := json.Marshal(params.InitiationActions) + + if err != nil { + return nil, err + } + + data.Set("InitiationActions", fmt.Sprint(v)) + } + if params != nil && params.LogQueries != nil { + data.Set("LogQueries", fmt.Sprint(*params.LogQueries)) + } + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAssistantFallbackActionsParams Optional parameters for the method 'UpdateAssistantFallbackActions' +type UpdateAssistantFallbackActionsParams struct { + FallbackActions *map[string]interface{} `json:"FallbackActions,omitempty"` +} + +/* +UpdateAssistantFallbackActions Method for UpdateAssistantFallbackActions + * @param AssistantSid + * @param optional nil or *UpdateAssistantFallbackActionsOpts - Optional Parameters: + * @param "FallbackActions" (map[string]interface{}) - +@return PreviewUnderstandAssistantAssistantFallbackActions +*/ +func (c *DefaultApiService) UpdateAssistantFallbackActions(AssistantSid string, params *UpdateAssistantFallbackActionsParams) (*PreviewUnderstandAssistantAssistantFallbackActions, error) { + path := "/understand/Assistants/{AssistantSid}/FallbackActions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FallbackActions != nil { + v, err := json.Marshal(params.FallbackActions) + + if err != nil { + return nil, err + } + + data.Set("FallbackActions", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantAssistantFallbackActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAssistantInitiationActionsParams Optional parameters for the method 'UpdateAssistantInitiationActions' +type UpdateAssistantInitiationActionsParams struct { + InitiationActions *map[string]interface{} `json:"InitiationActions,omitempty"` +} + +/* +UpdateAssistantInitiationActions Method for UpdateAssistantInitiationActions + * @param AssistantSid + * @param optional nil or *UpdateAssistantInitiationActionsOpts - Optional Parameters: + * @param "InitiationActions" (map[string]interface{}) - +@return PreviewUnderstandAssistantAssistantInitiationActions +*/ +func (c *DefaultApiService) UpdateAssistantInitiationActions(AssistantSid string, params *UpdateAssistantInitiationActionsParams) (*PreviewUnderstandAssistantAssistantInitiationActions, error) { + path := "/understand/Assistants/{AssistantSid}/InitiationActions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.InitiationActions != nil { + v, err := json.Marshal(params.InitiationActions) + + if err != nil { + return nil, err + } + + data.Set("InitiationActions", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantAssistantInitiationActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAuthorizationDocumentParams Optional parameters for the method 'UpdateAuthorizationDocument' +type UpdateAuthorizationDocumentParams struct { + AddressSid *string `json:"AddressSid,omitempty"` + CcEmails *[]string `json:"CcEmails,omitempty"` + ContactPhoneNumber *string `json:"ContactPhoneNumber,omitempty"` + ContactTitle *string `json:"ContactTitle,omitempty"` + Email *string `json:"Email,omitempty"` + HostedNumberOrderSids *[]string `json:"HostedNumberOrderSids,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateAuthorizationDocument Method for UpdateAuthorizationDocument +Updates a specific AuthorizationDocument. + * @param Sid + * @param optional nil or *UpdateAuthorizationDocumentOpts - Optional Parameters: + * @param "AddressSid" (string) - A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. + * @param "CcEmails" ([]string) - Email recipients who will be informed when an Authorization Document has been sent and signed + * @param "ContactPhoneNumber" (string) - The contact phone number of the person authorized to sign the Authorization Document. + * @param "ContactTitle" (string) - The title of the person authorized to sign the Authorization Document for this phone number. + * @param "Email" (string) - Email that this AuthorizationDocument will be sent to for signing. + * @param "HostedNumberOrderSids" ([]string) - A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. + * @param "Status" (string) - Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. +@return PreviewHostedNumbersAuthorizationDocument +*/ +func (c *DefaultApiService) UpdateAuthorizationDocument(Sid string, params *UpdateAuthorizationDocumentParams) (*PreviewHostedNumbersAuthorizationDocument, error) { + path := "/HostedNumbers/AuthorizationDocuments/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AddressSid != nil { + data.Set("AddressSid", *params.AddressSid) + } + if params != nil && params.CcEmails != nil { + data.Set("CcEmails", strings.Join(*params.CcEmails, ",")) + } + if params != nil && params.ContactPhoneNumber != nil { + data.Set("ContactPhoneNumber", *params.ContactPhoneNumber) + } + if params != nil && params.ContactTitle != nil { + data.Set("ContactTitle", *params.ContactTitle) + } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.HostedNumberOrderSids != nil { + data.Set("HostedNumberOrderSids", strings.Join(*params.HostedNumberOrderSids, ",")) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersAuthorizationDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCertificateParams Optional parameters for the method 'UpdateCertificate' +type UpdateCertificateParams struct { + DeviceSid *string `json:"DeviceSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateCertificate Method for UpdateCertificate +Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or assigning to a Device. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Certificate credential resource. + * @param optional nil or *UpdateCertificateOpts - Optional Parameters: + * @param "DeviceSid" (string) - Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. +@return PreviewDeployedDevicesFleetCertificate +*/ +func (c *DefaultApiService) UpdateCertificate(FleetSid string, Sid string, params *UpdateCertificateParams) (*PreviewDeployedDevicesFleetCertificate, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetCertificate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDeploymentParams Optional parameters for the method 'UpdateDeployment' +type UpdateDeploymentParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + SyncServiceSid *string `json:"SyncServiceSid,omitempty"` +} + +/* +UpdateDeployment Method for UpdateDeployment +Update the given properties of a specific Deployment credential in the Fleet, giving it a friendly name or linking to a specific Twilio Sync service instance. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Deployment resource. + * @param optional nil or *UpdateDeploymentOpts - Optional Parameters: + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Deployment, up to 64 characters long + * @param "SyncServiceSid" (string) - Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. +@return PreviewDeployedDevicesFleetDeployment +*/ +func (c *DefaultApiService) UpdateDeployment(FleetSid string, Sid string, params *UpdateDeploymentParams) (*PreviewDeployedDevicesFleetDeployment, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.SyncServiceSid != nil { + data.Set("SyncServiceSid", *params.SyncServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDeviceParams Optional parameters for the method 'UpdateDevice' +type UpdateDeviceParams struct { + DeploymentSid *string `json:"DeploymentSid,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identity *string `json:"Identity,omitempty"` +} + +/* +UpdateDevice Method for UpdateDevice +Update the given properties of a specific Device in the Fleet, giving it a friendly name, assigning to a Deployment, or a human identity. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Device resource. + * @param optional nil or *UpdateDeviceOpts - Optional Parameters: + * @param "DeploymentSid" (string) - Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. + * @param "Enabled" (bool) - + * @param "FriendlyName" (string) - Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. + * @param "Identity" (string) - Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. +@return PreviewDeployedDevicesFleetDevice +*/ +func (c *DefaultApiService) UpdateDevice(FleetSid string, Sid string, params *UpdateDeviceParams) (*PreviewDeployedDevicesFleetDevice, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Devices/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeploymentSid != nil { + data.Set("DeploymentSid", *params.DeploymentSid) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetDevice{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDocumentParams Optional parameters for the method 'UpdateDocument' +type UpdateDocumentParams struct { + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` +} + +/* +UpdateDocument Method for UpdateDocument + * @param ServiceSid + * @param Sid + * @param optional nil or *UpdateDocumentOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "Data" (map[string]interface{}) - +@return PreviewSyncServiceDocument +*/ +func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params *UpdateDocumentParams) (*PreviewSyncServiceDocument, error) { + path := "/Sync/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDocumentPermissionParams Optional parameters for the method 'UpdateDocumentPermission' +type UpdateDocumentPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateDocumentPermission Method for UpdateDocumentPermission +Update an identity's access to a specific Sync Document. + * @param ServiceSid The unique SID identifier of the Sync Service Instance. + * @param DocumentSid Identifier of the Sync Document. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. + * @param optional nil or *UpdateDocumentPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Boolean flag specifying whether the identity can delete the Sync Document. + * @param "Read" (bool) - Boolean flag specifying whether the identity can read the Sync Document. + * @param "Write" (bool) - Boolean flag specifying whether the identity can update the Sync Document. +@return PreviewSyncServiceDocumentDocumentPermission +*/ +func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, DocumentSid string, Identity string, params *UpdateDocumentPermissionParams) (*PreviewSyncServiceDocumentDocumentPermission, error) { + path := "/Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateExportConfigurationParams Optional parameters for the method 'UpdateExportConfiguration' +type UpdateExportConfigurationParams struct { + Enabled *bool `json:"Enabled,omitempty"` + WebhookMethod *string `json:"WebhookMethod,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +UpdateExportConfiguration Method for UpdateExportConfiguration +Update a specific Export Configuration. + * @param ResourceType The type of communication – Messages, Calls, Conferences, and Participants + * @param optional nil or *UpdateExportConfigurationOpts - Optional Parameters: + * @param "Enabled" (bool) - If true, Twilio will automatically generate every day's file when the day is over. + * @param "WebhookMethod" (string) - Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url + * @param "WebhookUrl" (string) - Stores the URL destination for the method specified in webhook_method. +@return PreviewBulkExportsExportConfiguration +*/ +func (c *DefaultApiService) UpdateExportConfiguration(ResourceType string, params *UpdateExportConfigurationParams) (*PreviewBulkExportsExportConfiguration, error) { + path := "/BulkExports/Exports/{ResourceType}/Configuration" + path = strings.Replace(path, "{"+"ResourceType"+"}", ResourceType, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.WebhookMethod != nil { + data.Set("WebhookMethod", *params.WebhookMethod) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewBulkExportsExportConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFieldTypeParams Optional parameters for the method 'UpdateFieldType' +type UpdateFieldTypeParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateFieldType Method for UpdateFieldType + * @param AssistantSid + * @param Sid + * @param optional nil or *UpdateFieldTypeOpts - Optional Parameters: + * @param "FriendlyName" (string) - A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantFieldType +*/ +func (c *DefaultApiService) UpdateFieldType(AssistantSid string, Sid string, params *UpdateFieldTypeParams) (*PreviewUnderstandAssistantFieldType, error) { + path := "/understand/Assistants/{AssistantSid}/FieldTypes/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantFieldType{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFleetParams Optional parameters for the method 'UpdateFleet' +type UpdateFleetParams struct { + DefaultDeploymentSid *string `json:"DefaultDeploymentSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateFleet Method for UpdateFleet +Update the friendly name property of a specific Fleet in your account. + * @param Sid Provides a 34 character string that uniquely identifies the requested Fleet resource. + * @param optional nil or *UpdateFleetOpts - Optional Parameters: + * @param "DefaultDeploymentSid" (string) - Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet. + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Fleet, up to 256 characters long. +@return PreviewDeployedDevicesFleet +*/ +func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) (*PreviewDeployedDevicesFleet, error) { + path := "/DeployedDevices/Fleets/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DefaultDeploymentSid != nil { + data.Set("DefaultDeploymentSid", *params.DefaultDeploymentSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateHostedNumberOrderParams Optional parameters for the method 'UpdateHostedNumberOrder' +type UpdateHostedNumberOrderParams struct { + CallDelay *int32 `json:"CallDelay,omitempty"` + CcEmails *[]string `json:"CcEmails,omitempty"` + Email *string `json:"Email,omitempty"` + Extension *string `json:"Extension,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VerificationCode *string `json:"VerificationCode,omitempty"` + VerificationDocumentSid *string `json:"VerificationDocumentSid,omitempty"` + VerificationType *string `json:"VerificationType,omitempty"` +} + +/* +UpdateHostedNumberOrder Method for UpdateHostedNumberOrder +Updates a specific HostedNumberOrder. + * @param Sid + * @param optional nil or *UpdateHostedNumberOrderOpts - Optional Parameters: + * @param "CallDelay" (int32) - The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. + * @param "CcEmails" ([]string) - Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. + * @param "Email" (string) - Email of the owner of this phone number that is being hosted. + * @param "Extension" (string) - Digits to dial after connecting the verification call. + * @param "FriendlyName" (string) - A 64 character string that is a human readable text that describes this resource. + * @param "Status" (string) - User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. + * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + * @param "VerificationCode" (string) - A verification code that is given to the user via a phone call to the phone number that is being hosted. + * @param "VerificationDocumentSid" (string) - Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. + * @param "VerificationType" (string) - Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. +@return PreviewHostedNumbersHostedNumberOrder +*/ +func (c *DefaultApiService) UpdateHostedNumberOrder(Sid string, params *UpdateHostedNumberOrderParams) (*PreviewHostedNumbersHostedNumberOrder, error) { + path := "/HostedNumbers/HostedNumberOrders/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallDelay != nil { + data.Set("CallDelay", fmt.Sprint(*params.CallDelay)) + } + if params != nil && params.CcEmails != nil { + data.Set("CcEmails", strings.Join(*params.CcEmails, ",")) + } + if params != nil && params.Email != nil { + data.Set("Email", *params.Email) + } + if params != nil && params.Extension != nil { + data.Set("Extension", *params.Extension) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VerificationCode != nil { + data.Set("VerificationCode", *params.VerificationCode) + } + if params != nil && params.VerificationDocumentSid != nil { + data.Set("VerificationDocumentSid", *params.VerificationDocumentSid) + } + if params != nil && params.VerificationType != nil { + data.Set("VerificationType", *params.VerificationType) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewHostedNumbersHostedNumberOrder{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateInstalledAddOnParams Optional parameters for the method 'UpdateInstalledAddOn' +type UpdateInstalledAddOnParams struct { + Configuration *map[string]interface{} `json:"Configuration,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateInstalledAddOn Method for UpdateInstalledAddOn +Update an Add-on installation for the Account specified. + * @param Sid The SID of the InstalledAddOn resource to update. + * @param optional nil or *UpdateInstalledAddOnOpts - Optional Parameters: + * @param "Configuration" (map[string]interface{}) - Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within the Account. +@return PreviewMarketplaceInstalledAddOn +*/ +func (c *DefaultApiService) UpdateInstalledAddOn(Sid string, params *UpdateInstalledAddOnParams) (*PreviewMarketplaceInstalledAddOn, error) { + path := "/marketplace/InstalledAddOns/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Configuration != nil { + v, err := json.Marshal(params.Configuration) + + if err != nil { + return nil, err + } + + data.Set("Configuration", fmt.Sprint(v)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceInstalledAddOn{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateInstalledAddOnExtensionParams Optional parameters for the method 'UpdateInstalledAddOnExtension' +type UpdateInstalledAddOnExtensionParams struct { + Enabled *bool `json:"Enabled,omitempty"` +} + +/* +UpdateInstalledAddOnExtension Method for UpdateInstalledAddOnExtension +Update an Extension for an Add-on installation. + * @param InstalledAddOnSid The SID of the InstalledAddOn resource with the extension to update. + * @param Sid The SID of the InstalledAddOn Extension resource to update. + * @param optional nil or *UpdateInstalledAddOnExtensionOpts - Optional Parameters: + * @param "Enabled" (bool) - Whether the Extension should be invoked. +@return PreviewMarketplaceInstalledAddOnInstalledAddOnExtension +*/ +func (c *DefaultApiService) UpdateInstalledAddOnExtension(InstalledAddOnSid string, Sid string, params *UpdateInstalledAddOnExtensionParams) (*PreviewMarketplaceInstalledAddOnInstalledAddOnExtension, error) { + path := "/marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid}" + path = strings.Replace(path, "{"+"InstalledAddOnSid"+"}", InstalledAddOnSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewMarketplaceInstalledAddOnInstalledAddOnExtension{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateKeyParams Optional parameters for the method 'UpdateKey' +type UpdateKeyParams struct { + DeviceSid *string `json:"DeviceSid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateKey Method for UpdateKey +Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. + * @param FleetSid + * @param Sid Provides a 34 character string that uniquely identifies the requested Key credential resource. + * @param optional nil or *UpdateKeyOpts - Optional Parameters: + * @param "DeviceSid" (string) - Provides the unique string identifier of an existing Device to become authenticated with this Key credential. + * @param "FriendlyName" (string) - Provides a human readable descriptive text for this Key credential, up to 256 characters long. +@return PreviewDeployedDevicesFleetKey +*/ +func (c *DefaultApiService) UpdateKey(FleetSid string, Sid string, params *UpdateKeyParams) (*PreviewDeployedDevicesFleetKey, error) { + path := "/DeployedDevices/Fleets/{FleetSid}/Keys/{Sid}" + path = strings.Replace(path, "{"+"FleetSid"+"}", FleetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DeviceSid != nil { + data.Set("DeviceSid", *params.DeviceSid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewDeployedDevicesFleetKey{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateModelBuildParams Optional parameters for the method 'UpdateModelBuild' +type UpdateModelBuildParams struct { + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateModelBuild Method for UpdateModelBuild + * @param AssistantSid + * @param Sid + * @param optional nil or *UpdateModelBuildOpts - Optional Parameters: + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 +@return PreviewUnderstandAssistantModelBuild +*/ +func (c *DefaultApiService) UpdateModelBuild(AssistantSid string, Sid string, params *UpdateModelBuildParams) (*PreviewUnderstandAssistantModelBuild, error) { + path := "/understand/Assistants/{AssistantSid}/ModelBuilds/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantModelBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateQueryParams Optional parameters for the method 'UpdateQuery' +type UpdateQueryParams struct { + SampleSid *string `json:"SampleSid,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateQuery Method for UpdateQuery + * @param AssistantSid The unique ID of the parent Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateQueryOpts - Optional Parameters: + * @param "SampleSid" (string) - An optional reference to the Sample created from this query. + * @param "Status" (string) - A string that described the query status. The values can be: pending_review, reviewed, discarded +@return PreviewUnderstandAssistantQuery +*/ +func (c *DefaultApiService) UpdateQuery(AssistantSid string, Sid string, params *UpdateQueryParams) (*PreviewUnderstandAssistantQuery, error) { + path := "/understand/Assistants/{AssistantSid}/Queries/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.SampleSid != nil { + data.Set("SampleSid", *params.SampleSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantQuery{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRatePlanParams Optional parameters for the method 'UpdateRatePlan' +type UpdateRatePlanParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateRatePlan Method for UpdateRatePlan + * @param Sid + * @param optional nil or *UpdateRatePlanOpts - Optional Parameters: + * @param "FriendlyName" (string) - + * @param "UniqueName" (string) - +@return PreviewWirelessRatePlan +*/ +func (c *DefaultApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanParams) (*PreviewWirelessRatePlan, error) { + path := "/wireless/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessRatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSampleParams Optional parameters for the method 'UpdateSample' +type UpdateSampleParams struct { + Language *string `json:"Language,omitempty"` + SourceChannel *string `json:"SourceChannel,omitempty"` + TaggedText *string `json:"TaggedText,omitempty"` +} + +/* +UpdateSample Method for UpdateSample + * @param AssistantSid The unique ID of the Assistant. + * @param TaskSid The unique ID of the Task associated with this Sample. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateSampleOpts - Optional Parameters: + * @param "Language" (string) - An ISO language-country string of the sample. + * @param "SourceChannel" (string) - The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null + * @param "TaggedText" (string) - The text example of how end-users may express this task. The sample may contain Field tag blocks. +@return PreviewUnderstandAssistantTaskSample +*/ +func (c *DefaultApiService) UpdateSample(AssistantSid string, TaskSid string, Sid string, params *UpdateSampleParams) (*PreviewUnderstandAssistantTaskSample, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Language != nil { + data.Set("Language", *params.Language) + } + if params != nil && params.SourceChannel != nil { + data.Set("SourceChannel", *params.SourceChannel) + } + if params != nil && params.TaggedText != nil { + data.Set("TaggedText", *params.TaggedText) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskSample{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "AclEnabled" (bool) - + * @param "FriendlyName" (string) - + * @param "ReachabilityWebhooksEnabled" (bool) - + * @param "WebhookUrl" (string) - +@return PreviewSyncService +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*PreviewSyncService, error) { + path := "/Sync/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncService{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSimParams Optional parameters for the method 'UpdateSim' +type UpdateSimParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + CommandsCallbackMethod *string `json:"CommandsCallbackMethod,omitempty"` + CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateSim Method for UpdateSim + * @param Sid + * @param optional nil or *UpdateSimOpts - Optional Parameters: + * @param "CallbackMethod" (string) - + * @param "CallbackUrl" (string) - + * @param "CommandsCallbackMethod" (string) - + * @param "CommandsCallbackUrl" (string) - + * @param "FriendlyName" (string) - + * @param "RatePlan" (string) - + * @param "SmsFallbackMethod" (string) - + * @param "SmsFallbackUrl" (string) - + * @param "SmsMethod" (string) - + * @param "SmsUrl" (string) - + * @param "Status" (string) - + * @param "UniqueName" (string) - + * @param "VoiceFallbackMethod" (string) - + * @param "VoiceFallbackUrl" (string) - + * @param "VoiceMethod" (string) - + * @param "VoiceUrl" (string) - +@return PreviewWirelessSim +*/ +func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*PreviewWirelessSim, error) { + path := "/wireless/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.CommandsCallbackMethod != nil { + data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) + } + if params != nil && params.CommandsCallbackUrl != nil { + data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewWirelessSim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateStyleSheetParams Optional parameters for the method 'UpdateStyleSheet' +type UpdateStyleSheetParams struct { + StyleSheet *map[string]interface{} `json:"StyleSheet,omitempty"` +} + +/* +UpdateStyleSheet Method for UpdateStyleSheet +Updates the style sheet for an assistant identified by {AssistantSid} or {AssistantUniqueName}. + * @param AssistantSid The unique ID of the Assistant + * @param optional nil or *UpdateStyleSheetOpts - Optional Parameters: + * @param "StyleSheet" (map[string]interface{}) - The JSON Style sheet string +@return PreviewUnderstandAssistantStyleSheet +*/ +func (c *DefaultApiService) UpdateStyleSheet(AssistantSid string, params *UpdateStyleSheetParams) (*PreviewUnderstandAssistantStyleSheet, error) { + path := "/understand/Assistants/{AssistantSid}/StyleSheet" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.StyleSheet != nil { + v, err := json.Marshal(params.StyleSheet) + + if err != nil { + return nil, err + } + + data.Set("StyleSheet", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantStyleSheet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncListItemParams Optional parameters for the method 'UpdateSyncListItem' +type UpdateSyncListItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` +} + +/* +UpdateSyncListItem Method for UpdateSyncListItem + * @param ServiceSid + * @param ListSid + * @param Index + * @param optional nil or *UpdateSyncListItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "Data" (map[string]interface{}) - +@return PreviewSyncServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string, Index int32, params *UpdateSyncListItemParams) (*PreviewSyncServiceSyncListSyncListItem, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncListPermissionParams Optional parameters for the method 'UpdateSyncListPermission' +type UpdateSyncListPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateSyncListPermission Method for UpdateSyncListPermission +Update an identity's access to a specific Sync List. + * @param ServiceSid The unique SID identifier of the Sync Service Instance. + * @param ListSid Identifier of the Sync List. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. + * @param optional nil or *UpdateSyncListPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Boolean flag specifying whether the identity can delete the Sync List. + * @param "Read" (bool) - Boolean flag specifying whether the identity can read the Sync List. + * @param "Write" (bool) - Boolean flag specifying whether the identity can create, update and delete Items of the Sync List. +@return PreviewSyncServiceSyncListSyncListPermission +*/ +func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid string, Identity string, params *UpdateSyncListPermissionParams) (*PreviewSyncServiceSyncListSyncListPermission, error) { + path := "/Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncMapItemParams Optional parameters for the method 'UpdateSyncMapItem' +type UpdateSyncMapItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` +} + +/* +UpdateSyncMapItem Method for UpdateSyncMapItem + * @param ServiceSid + * @param MapSid + * @param Key + * @param optional nil or *UpdateSyncMapItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "Data" (map[string]interface{}) - +@return PreviewSyncServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, Key string, params *UpdateSyncMapItemParams) (*PreviewSyncServiceSyncMapSyncMapItem, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncMapPermissionParams Optional parameters for the method 'UpdateSyncMapPermission' +type UpdateSyncMapPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateSyncMapPermission Method for UpdateSyncMapPermission +Update an identity's access to a specific Sync Map. + * @param ServiceSid The unique SID identifier of the Sync Service Instance. + * @param MapSid Identifier of the Sync Map. Either a SID or a unique name. + * @param Identity Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. + * @param optional nil or *UpdateSyncMapPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Boolean flag specifying whether the identity can delete the Sync Map. + * @param "Read" (bool) - Boolean flag specifying whether the identity can read the Sync Map. + * @param "Write" (bool) - Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map. +@return PreviewSyncServiceSyncMapSyncMapPermission +*/ +func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid string, Identity string, params *UpdateSyncMapPermissionParams) (*PreviewSyncServiceSyncMapSyncMapPermission, error) { + path := "/Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewSyncServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskParams Optional parameters for the method 'UpdateTask' +type UpdateTaskParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` + ActionsUrl *string `json:"ActionsUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateTask Method for UpdateTask + * @param AssistantSid The unique ID of the Assistant. + * @param Sid A 34 character string that uniquely identifies this resource. + * @param optional nil or *UpdateTaskOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. + * @param "ActionsUrl" (string) - User-provided HTTP endpoint where from the assistant fetches actions + * @param "FriendlyName" (string) - A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + * @param "UniqueName" (string) - A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. +@return PreviewUnderstandAssistantTask +*/ +func (c *DefaultApiService) UpdateTask(AssistantSid string, Sid string, params *UpdateTaskParams) (*PreviewUnderstandAssistantTask, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + if params != nil && params.ActionsUrl != nil { + data.Set("ActionsUrl", *params.ActionsUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskActionsParams Optional parameters for the method 'UpdateTaskActions' +type UpdateTaskActionsParams struct { + Actions *map[string]interface{} `json:"Actions,omitempty"` +} + +/* +UpdateTaskActions Method for UpdateTaskActions +Updates the actions of an Task identified by {TaskSid} or {TaskUniqueName}. + * @param AssistantSid The unique ID of the parent Assistant. + * @param TaskSid The unique ID of the Task. + * @param optional nil or *UpdateTaskActionsOpts - Optional Parameters: + * @param "Actions" (map[string]interface{}) - The JSON actions that instruct the Assistant how to perform this task. +@return PreviewUnderstandAssistantTaskTaskActions +*/ +func (c *DefaultApiService) UpdateTaskActions(AssistantSid string, TaskSid string, params *UpdateTaskActionsParams) (*PreviewUnderstandAssistantTaskTaskActions, error) { + path := "/understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions" + path = strings.Replace(path, "{"+"AssistantSid"+"}", AssistantSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Actions != nil { + v, err := json.Marshal(params.Actions) + + if err != nil { + return nil, err + } + + data.Set("Actions", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PreviewUnderstandAssistantTaskTaskActions{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/preview/docs/CreateAssistantRequest.md b/rest/preview/docs/CreateAssistantRequest.md new file mode 100644 index 000000000..f5cb08fa5 --- /dev/null +++ b/rest/preview/docs/CreateAssistantRequest.md @@ -0,0 +1,18 @@ +# CreateAssistantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackEvents** | **string** | Space-separated list of callback events that will trigger callbacks. | [optional] +**CallbackUrl** | **string** | A user-provided URL to send event callbacks to. | [optional] +**FallbackActions** | [**map[string]interface{}**](.md) | The JSON actions to be executed when the user's input is not recognized as matching any Task. | [optional] +**FriendlyName** | **string** | A text description for the Assistant. It is non-unique and can up to 255 characters long. | [optional] +**InitiationActions** | [**map[string]interface{}**](.md) | The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. | [optional] +**LogQueries** | **bool** | A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. | [optional] +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON object that holds the style sheet for the assistant | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateAuthorizationDocumentRequest.md b/rest/preview/docs/CreateAuthorizationDocumentRequest.md new file mode 100644 index 000000000..d8f0b38c4 --- /dev/null +++ b/rest/preview/docs/CreateAuthorizationDocumentRequest.md @@ -0,0 +1,16 @@ +# CreateAuthorizationDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. | +**CcEmails** | **[]string** | Email recipients who will be informed when an Authorization Document has been sent and signed. | [optional] +**ContactPhoneNumber** | **string** | The contact phone number of the person authorized to sign the Authorization Document. | +**ContactTitle** | **string** | The title of the person authorized to sign the Authorization Document for this phone number. | +**Email** | **string** | Email that this AuthorizationDocument will be sent to for signing. | +**HostedNumberOrderSids** | **[]string** | A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateCertificateRequest.md b/rest/preview/docs/CreateCertificateRequest.md new file mode 100644 index 000000000..6cb39a502 --- /dev/null +++ b/rest/preview/docs/CreateCertificateRequest.md @@ -0,0 +1,13 @@ +# CreateCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CertificateData** | **string** | Provides a URL encoded representation of the public certificate in PEM format. | +**DeviceSid** | **string** | Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateChannelRequest.md b/rest/preview/docs/CreateChannelRequest.md new file mode 100644 index 000000000..c27609e70 --- /dev/null +++ b/rest/preview/docs/CreateChannelRequest.md @@ -0,0 +1,11 @@ +# CreateChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumberSid** | **string** | The unique SID identifier of the Phone Number of the Phone number to be assigned to the Branded Channel. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateCommandRequest.md b/rest/preview/docs/CreateCommandRequest.md new file mode 100644 index 000000000..f95a46028 --- /dev/null +++ b/rest/preview/docs/CreateCommandRequest.md @@ -0,0 +1,17 @@ +# CreateCommandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**Command** | **string** | | +**CommandMode** | **string** | | [optional] +**Device** | **string** | | [optional] +**IncludeSid** | **string** | | [optional] +**Sim** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateDeploymentRequest.md b/rest/preview/docs/CreateDeploymentRequest.md new file mode 100644 index 000000000..bd56a9a30 --- /dev/null +++ b/rest/preview/docs/CreateDeploymentRequest.md @@ -0,0 +1,12 @@ +# CreateDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | Provides a human readable descriptive text for this Deployment, up to 256 characters long. | [optional] +**SyncServiceSid** | **string** | Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateDeviceRequest.md b/rest/preview/docs/CreateDeviceRequest.md new file mode 100644 index 000000000..991f3bf40 --- /dev/null +++ b/rest/preview/docs/CreateDeviceRequest.md @@ -0,0 +1,15 @@ +# CreateDeviceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeploymentSid** | **string** | Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. | [optional] +**Identity** | **string** | Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. | [optional] +**UniqueName** | **string** | Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateDocumentRequest.md b/rest/preview/docs/CreateDocumentRequest.md new file mode 100644 index 000000000..5f566e59b --- /dev/null +++ b/rest/preview/docs/CreateDocumentRequest.md @@ -0,0 +1,12 @@ +# CreateDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | [optional] +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateExportCustomJobRequest.md b/rest/preview/docs/CreateExportCustomJobRequest.md new file mode 100644 index 000000000..09c329eca --- /dev/null +++ b/rest/preview/docs/CreateExportCustomJobRequest.md @@ -0,0 +1,16 @@ +# CreateExportCustomJobRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The optional email to send the completion notification to | [optional] +**EndDay** | **string** | The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. | +**FriendlyName** | **string** | The friendly name specified when creating the job | +**StartDay** | **string** | The start day for the custom export specified as a string in the format of yyyy-mm-dd | +**WebhookMethod** | **string** | This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. | [optional] +**WebhookUrl** | **string** | The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateFieldRequest.md b/rest/preview/docs/CreateFieldRequest.md new file mode 100644 index 000000000..7ae93562f --- /dev/null +++ b/rest/preview/docs/CreateFieldRequest.md @@ -0,0 +1,12 @@ +# CreateFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The unique name or sid of the FieldType. It can be any [Built-in Field Type](https://www.twilio.com/docs/assistant/api/built-in-field-types) or the unique_name or the Field Type sid of a custom Field Type. | +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateFieldTypeRequest.md b/rest/preview/docs/CreateFieldTypeRequest.md new file mode 100644 index 000000000..3e951eeb3 --- /dev/null +++ b/rest/preview/docs/CreateFieldTypeRequest.md @@ -0,0 +1,12 @@ +# CreateFieldTypeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateFieldValueRequest.md b/rest/preview/docs/CreateFieldValueRequest.md new file mode 100644 index 000000000..d9ac890d3 --- /dev/null +++ b/rest/preview/docs/CreateFieldValueRequest.md @@ -0,0 +1,13 @@ +# CreateFieldValueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | An ISO language-country string of the value. | +**SynonymOf** | **string** | A value that indicates this field value is a synonym of. Empty if the value is not a synonym. | [optional] +**Value** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateFleetRequest.md b/rest/preview/docs/CreateFleetRequest.md new file mode 100644 index 000000000..226e4776a --- /dev/null +++ b/rest/preview/docs/CreateFleetRequest.md @@ -0,0 +1,11 @@ +# CreateFleetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | Provides a human readable descriptive text for this Fleet, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateHostedNumberOrderRequest.md b/rest/preview/docs/CreateHostedNumberOrderRequest.md new file mode 100644 index 000000000..dcf9c9233 --- /dev/null +++ b/rest/preview/docs/CreateHostedNumberOrderRequest.md @@ -0,0 +1,27 @@ +# CreateHostedNumberOrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. | [optional] +**AddressSid** | **string** | Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. | [optional] +**CcEmails** | **[]string** | Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. | [optional] +**Email** | **string** | Optional. Email of the owner of this phone number that is being hosted. | [optional] +**FriendlyName** | **string** | A 64 character string that is a human readable text that describes this resource. | [optional] +**PhoneNumber** | **string** | The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format | +**SmsApplicationSid** | **string** | Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. | [optional] +**SmsCapability** | **bool** | Used to specify that the SMS capability will be hosted on Twilio's platform. | +**SmsFallbackMethod** | **string** | The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. | [optional] +**SmsFallbackUrl** | **string** | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. | [optional] +**SmsMethod** | **string** | The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. | [optional] +**SmsUrl** | **string** | The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. | [optional] +**StatusCallbackMethod** | **string** | Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. | [optional] +**StatusCallbackUrl** | **string** | Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. | [optional] +**UniqueName** | **string** | Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | [optional] +**VerificationDocumentSid** | **string** | Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. | [optional] +**VerificationType** | **string** | Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateInstalledAddOnRequest.md b/rest/preview/docs/CreateInstalledAddOnRequest.md new file mode 100644 index 000000000..857d12aa3 --- /dev/null +++ b/rest/preview/docs/CreateInstalledAddOnRequest.md @@ -0,0 +1,14 @@ +# CreateInstalledAddOnRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AcceptTermsOfService** | **bool** | Whether the Terms of Service were accepted. | +**AvailableAddOnSid** | **string** | The SID of the AvaliableAddOn to install. | +**Configuration** | [**map[string]interface{}**](.md) | The JSON object that represents the configuration of the new Add-on being installed. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be unique within the Account. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateKeyRequest.md b/rest/preview/docs/CreateKeyRequest.md new file mode 100644 index 000000000..f5b4859ce --- /dev/null +++ b/rest/preview/docs/CreateKeyRequest.md @@ -0,0 +1,12 @@ +# CreateKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceSid** | **string** | Provides the unique string identifier of an existing Device to become authenticated with this Key credential. | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text for this Key credential, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateModelBuildRequest.md b/rest/preview/docs/CreateModelBuildRequest.md new file mode 100644 index 000000000..da6ef5bad --- /dev/null +++ b/rest/preview/docs/CreateModelBuildRequest.md @@ -0,0 +1,12 @@ +# CreateModelBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCallback** | **string** | | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateQueryRequest.md b/rest/preview/docs/CreateQueryRequest.md new file mode 100644 index 000000000..7cfcb5066 --- /dev/null +++ b/rest/preview/docs/CreateQueryRequest.md @@ -0,0 +1,15 @@ +# CreateQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name* | [optional] +**Language** | **string** | An ISO language-country string of the sample. | +**ModelBuild** | **string** | The Model Build Sid or unique name of the Model Build to be queried. | [optional] +**Query** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. | +**Tasks** | **string** | Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2* | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateRatePlanRequest.md b/rest/preview/docs/CreateRatePlanRequest.md new file mode 100644 index 000000000..76f6a086e --- /dev/null +++ b/rest/preview/docs/CreateRatePlanRequest.md @@ -0,0 +1,20 @@ +# CreateRatePlanRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommandsEnabled** | **bool** | | [optional] +**DataEnabled** | **bool** | | [optional] +**DataLimit** | **int32** | | [optional] +**DataMetering** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**InternationalRoaming** | **[]string** | | [optional] +**MessagingEnabled** | **bool** | | [optional] +**NationalRoamingEnabled** | **bool** | | [optional] +**UniqueName** | **string** | | [optional] +**VoiceEnabled** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateSampleRequest.md b/rest/preview/docs/CreateSampleRequest.md new file mode 100644 index 000000000..0ed804cf3 --- /dev/null +++ b/rest/preview/docs/CreateSampleRequest.md @@ -0,0 +1,13 @@ +# CreateSampleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | An ISO language-country string of the sample. | +**SourceChannel** | **string** | The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null | [optional] +**TaggedText** | **string** | The text example of how end-users may express this task. The sample may contain Field tag blocks. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateServiceRequest.md b/rest/preview/docs/CreateServiceRequest.md new file mode 100644 index 000000000..bf13f7fae --- /dev/null +++ b/rest/preview/docs/CreateServiceRequest.md @@ -0,0 +1,14 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclEnabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**ReachabilityWebhooksEnabled** | **bool** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateSyncListItemRequest.md b/rest/preview/docs/CreateSyncListItemRequest.md new file mode 100644 index 000000000..03e2d37b2 --- /dev/null +++ b/rest/preview/docs/CreateSyncListItemRequest.md @@ -0,0 +1,11 @@ +# CreateSyncListItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateSyncListRequest.md b/rest/preview/docs/CreateSyncListRequest.md new file mode 100644 index 000000000..610427137 --- /dev/null +++ b/rest/preview/docs/CreateSyncListRequest.md @@ -0,0 +1,11 @@ +# CreateSyncListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateSyncMapItemRequest.md b/rest/preview/docs/CreateSyncMapItemRequest.md new file mode 100644 index 000000000..b0369f5a7 --- /dev/null +++ b/rest/preview/docs/CreateSyncMapItemRequest.md @@ -0,0 +1,12 @@ +# CreateSyncMapItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | +**Key** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateSyncMapRequest.md b/rest/preview/docs/CreateSyncMapRequest.md new file mode 100644 index 000000000..644601d61 --- /dev/null +++ b/rest/preview/docs/CreateSyncMapRequest.md @@ -0,0 +1,11 @@ +# CreateSyncMapRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/CreateTaskRequest.md b/rest/preview/docs/CreateTaskRequest.md new file mode 100644 index 000000000..96e3931bf --- /dev/null +++ b/rest/preview/docs/CreateTaskRequest.md @@ -0,0 +1,14 @@ +# CreateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. | [optional] +**ActionsUrl** | **string** | User-provided HTTP endpoint where from the assistant fetches actions | [optional] +**FriendlyName** | **string** | A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/DefaultApi.md b/rest/preview/docs/DefaultApi.md new file mode 100644 index 000000000..d99a2e930 --- /dev/null +++ b/rest/preview/docs/DefaultApi.md @@ -0,0 +1,6800 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAssistant**](DefaultApi.md#CreateAssistant) | **Post** /understand/Assistants | +[**CreateAuthorizationDocument**](DefaultApi.md#CreateAuthorizationDocument) | **Post** /HostedNumbers/AuthorizationDocuments | +[**CreateCertificate**](DefaultApi.md#CreateCertificate) | **Post** /DeployedDevices/Fleets/{FleetSid}/Certificates | +[**CreateChannel**](DefaultApi.md#CreateChannel) | **Post** /TrustedComms/BrandedChannels/{BrandedChannelSid}/Channels | +[**CreateCommand**](DefaultApi.md#CreateCommand) | **Post** /wireless/Commands | +[**CreateDeployment**](DefaultApi.md#CreateDeployment) | **Post** /DeployedDevices/Fleets/{FleetSid}/Deployments | +[**CreateDevice**](DefaultApi.md#CreateDevice) | **Post** /DeployedDevices/Fleets/{FleetSid}/Devices | +[**CreateDocument**](DefaultApi.md#CreateDocument) | **Post** /Sync/Services/{ServiceSid}/Documents | +[**CreateExportCustomJob**](DefaultApi.md#CreateExportCustomJob) | **Post** /BulkExports/Exports/{ResourceType}/Jobs | +[**CreateField**](DefaultApi.md#CreateField) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +[**CreateFieldType**](DefaultApi.md#CreateFieldType) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes | +[**CreateFieldValue**](DefaultApi.md#CreateFieldValue) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +[**CreateFleet**](DefaultApi.md#CreateFleet) | **Post** /DeployedDevices/Fleets | +[**CreateHostedNumberOrder**](DefaultApi.md#CreateHostedNumberOrder) | **Post** /HostedNumbers/HostedNumberOrders | +[**CreateInstalledAddOn**](DefaultApi.md#CreateInstalledAddOn) | **Post** /marketplace/InstalledAddOns | +[**CreateKey**](DefaultApi.md#CreateKey) | **Post** /DeployedDevices/Fleets/{FleetSid}/Keys | +[**CreateModelBuild**](DefaultApi.md#CreateModelBuild) | **Post** /understand/Assistants/{AssistantSid}/ModelBuilds | +[**CreateQuery**](DefaultApi.md#CreateQuery) | **Post** /understand/Assistants/{AssistantSid}/Queries | +[**CreateRatePlan**](DefaultApi.md#CreateRatePlan) | **Post** /wireless/RatePlans | +[**CreateSample**](DefaultApi.md#CreateSample) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /Sync/Services | +[**CreateSyncList**](DefaultApi.md#CreateSyncList) | **Post** /Sync/Services/{ServiceSid}/Lists | +[**CreateSyncListItem**](DefaultApi.md#CreateSyncListItem) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items | +[**CreateSyncMap**](DefaultApi.md#CreateSyncMap) | **Post** /Sync/Services/{ServiceSid}/Maps | +[**CreateSyncMapItem**](DefaultApi.md#CreateSyncMapItem) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items | +[**CreateTask**](DefaultApi.md#CreateTask) | **Post** /understand/Assistants/{AssistantSid}/Tasks | +[**DeleteAssistant**](DefaultApi.md#DeleteAssistant) | **Delete** /understand/Assistants/{Sid} | +[**DeleteCertificate**](DefaultApi.md#DeleteCertificate) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +[**DeleteDeployment**](DefaultApi.md#DeleteDeployment) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +[**DeleteDevice**](DefaultApi.md#DeleteDevice) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +[**DeleteDocument**](DefaultApi.md#DeleteDocument) | **Delete** /Sync/Services/{ServiceSid}/Documents/{Sid} | +[**DeleteDocumentPermission**](DefaultApi.md#DeleteDocumentPermission) | **Delete** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**DeleteField**](DefaultApi.md#DeleteField) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +[**DeleteFieldType**](DefaultApi.md#DeleteFieldType) | **Delete** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**DeleteFieldValue**](DefaultApi.md#DeleteFieldValue) | **Delete** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +[**DeleteFleet**](DefaultApi.md#DeleteFleet) | **Delete** /DeployedDevices/Fleets/{Sid} | +[**DeleteHostedNumberOrder**](DefaultApi.md#DeleteHostedNumberOrder) | **Delete** /HostedNumbers/HostedNumberOrders/{Sid} | +[**DeleteInstalledAddOn**](DefaultApi.md#DeleteInstalledAddOn) | **Delete** /marketplace/InstalledAddOns/{Sid} | +[**DeleteJob**](DefaultApi.md#DeleteJob) | **Delete** /BulkExports/Exports/Jobs/{JobSid} | +[**DeleteKey**](DefaultApi.md#DeleteKey) | **Delete** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +[**DeleteModelBuild**](DefaultApi.md#DeleteModelBuild) | **Delete** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**DeleteQuery**](DefaultApi.md#DeleteQuery) | **Delete** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +[**DeleteRatePlan**](DefaultApi.md#DeleteRatePlan) | **Delete** /wireless/RatePlans/{Sid} | +[**DeleteSample**](DefaultApi.md#DeleteSample) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /Sync/Services/{Sid} | +[**DeleteSyncList**](DefaultApi.md#DeleteSyncList) | **Delete** /Sync/Services/{ServiceSid}/Lists/{Sid} | +[**DeleteSyncListItem**](DefaultApi.md#DeleteSyncListItem) | **Delete** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**DeleteSyncListPermission**](DefaultApi.md#DeleteSyncListPermission) | **Delete** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**DeleteSyncMap**](DefaultApi.md#DeleteSyncMap) | **Delete** /Sync/Services/{ServiceSid}/Maps/{Sid} | +[**DeleteSyncMapItem**](DefaultApi.md#DeleteSyncMapItem) | **Delete** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**DeleteSyncMapPermission**](DefaultApi.md#DeleteSyncMapPermission) | **Delete** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**DeleteTask**](DefaultApi.md#DeleteTask) | **Delete** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +[**FetchAssistant**](DefaultApi.md#FetchAssistant) | **Get** /understand/Assistants/{Sid} | +[**FetchAssistantFallbackActions**](DefaultApi.md#FetchAssistantFallbackActions) | **Get** /understand/Assistants/{AssistantSid}/FallbackActions | +[**FetchAssistantInitiationActions**](DefaultApi.md#FetchAssistantInitiationActions) | **Get** /understand/Assistants/{AssistantSid}/InitiationActions | +[**FetchAuthorizationDocument**](DefaultApi.md#FetchAuthorizationDocument) | **Get** /HostedNumbers/AuthorizationDocuments/{Sid} | +[**FetchAvailableAddOn**](DefaultApi.md#FetchAvailableAddOn) | **Get** /marketplace/AvailableAddOns/{Sid} | +[**FetchAvailableAddOnExtension**](DefaultApi.md#FetchAvailableAddOnExtension) | **Get** /marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions/{Sid} | +[**FetchBrandedChannel**](DefaultApi.md#FetchBrandedChannel) | **Get** /TrustedComms/BrandedChannels/{Sid} | +[**FetchBrandsInformation**](DefaultApi.md#FetchBrandsInformation) | **Get** /TrustedComms/BrandsInformation | +[**FetchCertificate**](DefaultApi.md#FetchCertificate) | **Get** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +[**FetchCommand**](DefaultApi.md#FetchCommand) | **Get** /wireless/Commands/{Sid} | +[**FetchCps**](DefaultApi.md#FetchCps) | **Get** /TrustedComms/CPS | +[**FetchCurrentCall**](DefaultApi.md#FetchCurrentCall) | **Get** /TrustedComms/CurrentCall | +[**FetchDay**](DefaultApi.md#FetchDay) | **Get** /BulkExports/Exports/{ResourceType}/Days/{Day} | +[**FetchDeployment**](DefaultApi.md#FetchDeployment) | **Get** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +[**FetchDevice**](DefaultApi.md#FetchDevice) | **Get** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +[**FetchDialogue**](DefaultApi.md#FetchDialogue) | **Get** /understand/Assistants/{AssistantSid}/Dialogues/{Sid} | +[**FetchDocument**](DefaultApi.md#FetchDocument) | **Get** /Sync/Services/{ServiceSid}/Documents/{Sid} | +[**FetchDocumentPermission**](DefaultApi.md#FetchDocumentPermission) | **Get** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**FetchExport**](DefaultApi.md#FetchExport) | **Get** /BulkExports/Exports/{ResourceType} | +[**FetchExportConfiguration**](DefaultApi.md#FetchExportConfiguration) | **Get** /BulkExports/Exports/{ResourceType}/Configuration | +[**FetchField**](DefaultApi.md#FetchField) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid} | +[**FetchFieldType**](DefaultApi.md#FetchFieldType) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**FetchFieldValue**](DefaultApi.md#FetchFieldValue) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid} | +[**FetchFleet**](DefaultApi.md#FetchFleet) | **Get** /DeployedDevices/Fleets/{Sid} | +[**FetchHostedNumberOrder**](DefaultApi.md#FetchHostedNumberOrder) | **Get** /HostedNumbers/HostedNumberOrders/{Sid} | +[**FetchInstalledAddOn**](DefaultApi.md#FetchInstalledAddOn) | **Get** /marketplace/InstalledAddOns/{Sid} | +[**FetchInstalledAddOnExtension**](DefaultApi.md#FetchInstalledAddOnExtension) | **Get** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid} | +[**FetchJob**](DefaultApi.md#FetchJob) | **Get** /BulkExports/Exports/Jobs/{JobSid} | +[**FetchKey**](DefaultApi.md#FetchKey) | **Get** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +[**FetchModelBuild**](DefaultApi.md#FetchModelBuild) | **Get** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**FetchQuery**](DefaultApi.md#FetchQuery) | **Get** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +[**FetchRatePlan**](DefaultApi.md#FetchRatePlan) | **Get** /wireless/RatePlans/{Sid} | +[**FetchSample**](DefaultApi.md#FetchSample) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /Sync/Services/{Sid} | +[**FetchSim**](DefaultApi.md#FetchSim) | **Get** /wireless/Sims/{Sid} | +[**FetchStyleSheet**](DefaultApi.md#FetchStyleSheet) | **Get** /understand/Assistants/{AssistantSid}/StyleSheet | +[**FetchSyncList**](DefaultApi.md#FetchSyncList) | **Get** /Sync/Services/{ServiceSid}/Lists/{Sid} | +[**FetchSyncListItem**](DefaultApi.md#FetchSyncListItem) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**FetchSyncListPermission**](DefaultApi.md#FetchSyncListPermission) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**FetchSyncMap**](DefaultApi.md#FetchSyncMap) | **Get** /Sync/Services/{ServiceSid}/Maps/{Sid} | +[**FetchSyncMapItem**](DefaultApi.md#FetchSyncMapItem) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**FetchSyncMapPermission**](DefaultApi.md#FetchSyncMapPermission) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**FetchTask**](DefaultApi.md#FetchTask) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +[**FetchTaskActions**](DefaultApi.md#FetchTaskActions) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | +[**FetchTaskStatistics**](DefaultApi.md#FetchTaskStatistics) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Statistics | +[**FetchUsage**](DefaultApi.md#FetchUsage) | **Get** /wireless/Sims/{SimSid}/Usage | +[**ListAssistant**](DefaultApi.md#ListAssistant) | **Get** /understand/Assistants | +[**ListAuthorizationDocument**](DefaultApi.md#ListAuthorizationDocument) | **Get** /HostedNumbers/AuthorizationDocuments | +[**ListAvailableAddOn**](DefaultApi.md#ListAvailableAddOn) | **Get** /marketplace/AvailableAddOns | +[**ListAvailableAddOnExtension**](DefaultApi.md#ListAvailableAddOnExtension) | **Get** /marketplace/AvailableAddOns/{AvailableAddOnSid}/Extensions | +[**ListCertificate**](DefaultApi.md#ListCertificate) | **Get** /DeployedDevices/Fleets/{FleetSid}/Certificates | +[**ListCommand**](DefaultApi.md#ListCommand) | **Get** /wireless/Commands | +[**ListDay**](DefaultApi.md#ListDay) | **Get** /BulkExports/Exports/{ResourceType}/Days | +[**ListDependentHostedNumberOrder**](DefaultApi.md#ListDependentHostedNumberOrder) | **Get** /HostedNumbers/AuthorizationDocuments/{SigningDocumentSid}/DependentHostedNumberOrders | +[**ListDeployment**](DefaultApi.md#ListDeployment) | **Get** /DeployedDevices/Fleets/{FleetSid}/Deployments | +[**ListDevice**](DefaultApi.md#ListDevice) | **Get** /DeployedDevices/Fleets/{FleetSid}/Devices | +[**ListDocument**](DefaultApi.md#ListDocument) | **Get** /Sync/Services/{ServiceSid}/Documents | +[**ListDocumentPermission**](DefaultApi.md#ListDocumentPermission) | **Get** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions | +[**ListExportCustomJob**](DefaultApi.md#ListExportCustomJob) | **Get** /BulkExports/Exports/{ResourceType}/Jobs | +[**ListField**](DefaultApi.md#ListField) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields | +[**ListFieldType**](DefaultApi.md#ListFieldType) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes | +[**ListFieldValue**](DefaultApi.md#ListFieldValue) | **Get** /understand/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues | +[**ListFleet**](DefaultApi.md#ListFleet) | **Get** /DeployedDevices/Fleets | +[**ListHostedNumberOrder**](DefaultApi.md#ListHostedNumberOrder) | **Get** /HostedNumbers/HostedNumberOrders | +[**ListInstalledAddOn**](DefaultApi.md#ListInstalledAddOn) | **Get** /marketplace/InstalledAddOns | +[**ListInstalledAddOnExtension**](DefaultApi.md#ListInstalledAddOnExtension) | **Get** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions | +[**ListKey**](DefaultApi.md#ListKey) | **Get** /DeployedDevices/Fleets/{FleetSid}/Keys | +[**ListModelBuild**](DefaultApi.md#ListModelBuild) | **Get** /understand/Assistants/{AssistantSid}/ModelBuilds | +[**ListQuery**](DefaultApi.md#ListQuery) | **Get** /understand/Assistants/{AssistantSid}/Queries | +[**ListRatePlan**](DefaultApi.md#ListRatePlan) | **Get** /wireless/RatePlans | +[**ListSample**](DefaultApi.md#ListSample) | **Get** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples | +[**ListService**](DefaultApi.md#ListService) | **Get** /Sync/Services | +[**ListSim**](DefaultApi.md#ListSim) | **Get** /wireless/Sims | +[**ListSyncList**](DefaultApi.md#ListSyncList) | **Get** /Sync/Services/{ServiceSid}/Lists | +[**ListSyncListItem**](DefaultApi.md#ListSyncListItem) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items | +[**ListSyncListPermission**](DefaultApi.md#ListSyncListPermission) | **Get** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions | +[**ListSyncMap**](DefaultApi.md#ListSyncMap) | **Get** /Sync/Services/{ServiceSid}/Maps | +[**ListSyncMapItem**](DefaultApi.md#ListSyncMapItem) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items | +[**ListSyncMapPermission**](DefaultApi.md#ListSyncMapPermission) | **Get** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions | +[**ListTask**](DefaultApi.md#ListTask) | **Get** /understand/Assistants/{AssistantSid}/Tasks | +[**UpdateAssistant**](DefaultApi.md#UpdateAssistant) | **Post** /understand/Assistants/{Sid} | +[**UpdateAssistantFallbackActions**](DefaultApi.md#UpdateAssistantFallbackActions) | **Post** /understand/Assistants/{AssistantSid}/FallbackActions | +[**UpdateAssistantInitiationActions**](DefaultApi.md#UpdateAssistantInitiationActions) | **Post** /understand/Assistants/{AssistantSid}/InitiationActions | +[**UpdateAuthorizationDocument**](DefaultApi.md#UpdateAuthorizationDocument) | **Post** /HostedNumbers/AuthorizationDocuments/{Sid} | +[**UpdateCertificate**](DefaultApi.md#UpdateCertificate) | **Post** /DeployedDevices/Fleets/{FleetSid}/Certificates/{Sid} | +[**UpdateDeployment**](DefaultApi.md#UpdateDeployment) | **Post** /DeployedDevices/Fleets/{FleetSid}/Deployments/{Sid} | +[**UpdateDevice**](DefaultApi.md#UpdateDevice) | **Post** /DeployedDevices/Fleets/{FleetSid}/Devices/{Sid} | +[**UpdateDocument**](DefaultApi.md#UpdateDocument) | **Post** /Sync/Services/{ServiceSid}/Documents/{Sid} | +[**UpdateDocumentPermission**](DefaultApi.md#UpdateDocumentPermission) | **Post** /Sync/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**UpdateExportConfiguration**](DefaultApi.md#UpdateExportConfiguration) | **Post** /BulkExports/Exports/{ResourceType}/Configuration | +[**UpdateFieldType**](DefaultApi.md#UpdateFieldType) | **Post** /understand/Assistants/{AssistantSid}/FieldTypes/{Sid} | +[**UpdateFleet**](DefaultApi.md#UpdateFleet) | **Post** /DeployedDevices/Fleets/{Sid} | +[**UpdateHostedNumberOrder**](DefaultApi.md#UpdateHostedNumberOrder) | **Post** /HostedNumbers/HostedNumberOrders/{Sid} | +[**UpdateInstalledAddOn**](DefaultApi.md#UpdateInstalledAddOn) | **Post** /marketplace/InstalledAddOns/{Sid} | +[**UpdateInstalledAddOnExtension**](DefaultApi.md#UpdateInstalledAddOnExtension) | **Post** /marketplace/InstalledAddOns/{InstalledAddOnSid}/Extensions/{Sid} | +[**UpdateKey**](DefaultApi.md#UpdateKey) | **Post** /DeployedDevices/Fleets/{FleetSid}/Keys/{Sid} | +[**UpdateModelBuild**](DefaultApi.md#UpdateModelBuild) | **Post** /understand/Assistants/{AssistantSid}/ModelBuilds/{Sid} | +[**UpdateQuery**](DefaultApi.md#UpdateQuery) | **Post** /understand/Assistants/{AssistantSid}/Queries/{Sid} | +[**UpdateRatePlan**](DefaultApi.md#UpdateRatePlan) | **Post** /wireless/RatePlans/{Sid} | +[**UpdateSample**](DefaultApi.md#UpdateSample) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Samples/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /Sync/Services/{Sid} | +[**UpdateSim**](DefaultApi.md#UpdateSim) | **Post** /wireless/Sims/{Sid} | +[**UpdateStyleSheet**](DefaultApi.md#UpdateStyleSheet) | **Post** /understand/Assistants/{AssistantSid}/StyleSheet | +[**UpdateSyncListItem**](DefaultApi.md#UpdateSyncListItem) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**UpdateSyncListPermission**](DefaultApi.md#UpdateSyncListPermission) | **Post** /Sync/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**UpdateSyncMapItem**](DefaultApi.md#UpdateSyncMapItem) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**UpdateSyncMapPermission**](DefaultApi.md#UpdateSyncMapPermission) | **Post** /Sync/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**UpdateTask**](DefaultApi.md#UpdateTask) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{Sid} | +[**UpdateTaskActions**](DefaultApi.md#UpdateTaskActions) | **Post** /understand/Assistants/{AssistantSid}/Tasks/{TaskSid}/Actions | + + + +## CreateAssistant + +> PreviewUnderstandAssistant CreateAssistant(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackEvents** | **optional.String**| Space-separated list of callback events that will trigger callbacks. | + **CallbackUrl** | **optional.String**| A user-provided URL to send event callbacks to. | + **FallbackActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON actions to be executed when the user's input is not recognized as matching any Task. | + **FriendlyName** | **optional.String**| A text description for the Assistant. It is non-unique and can up to 255 characters long. | + **InitiationActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. | + **LogQueries** | **optional.Bool**| A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. | + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON object that holds the style sheet for the assistant | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistant**](preview.understand.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAuthorizationDocument + +> PreviewHostedNumbersAuthorizationDocument CreateAuthorizationDocument(ctx, optional) + + + +Create an AuthorizationDocument for authorizing the hosting of phone number capabilities on Twilio's platform. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateAuthorizationDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAuthorizationDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AddressSid** | **optional.String**| A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. | + **CcEmails** | [**optional.Interface of []string**](string.md)| Email recipients who will be informed when an Authorization Document has been sent and signed. | + **ContactPhoneNumber** | **optional.String**| The contact phone number of the person authorized to sign the Authorization Document. | + **ContactTitle** | **optional.String**| The title of the person authorized to sign the Authorization Document for this phone number. | + **Email** | **optional.String**| Email that this AuthorizationDocument will be sent to for signing. | + **HostedNumberOrderSids** | [**optional.Interface of []string**](string.md)| A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. | + +### Return type + +[**PreviewHostedNumbersAuthorizationDocument**](preview.hosted_numbers.authorization_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCertificate + +> PreviewDeployedDevicesFleetCertificate CreateCertificate(ctx, FleetSid, optional) + + + +Enroll a new Certificate credential to the Fleet, optionally giving it a friendly name and assigning to a Device. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***CreateCertificateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCertificateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CertificateData** | **optional.String**| Provides a URL encoded representation of the public certificate in PEM format. | + **DeviceSid** | **optional.String**| Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetCertificate**](preview.deployed_devices.fleet.certificate.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateChannel + +> PreviewTrustedCommsBrandedChannelChannel CreateChannel(ctx, BrandedChannelSid, optional) + + + +Associate a channel to a branded channel + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BrandedChannelSid** | **string**| The unique SID identifier of the Branded Channel. The given phone number is going to be assigned to this Branded Channel | + **optional** | ***CreateChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PhoneNumberSid** | **optional.String**| The unique SID identifier of the Phone Number of the Phone number to be assigned to the Branded Channel. | + +### Return type + +[**PreviewTrustedCommsBrandedChannelChannel**](preview.trusted_comms.branded_channel.channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCommand + +> PreviewWirelessCommand CreateCommand(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackMethod** | **optional.String**| | + **CallbackUrl** | **optional.String**| | + **Command** | **optional.String**| | + **CommandMode** | **optional.String**| | + **Device** | **optional.String**| | + **IncludeSid** | **optional.String**| | + **Sim** | **optional.String**| | + +### Return type + +[**PreviewWirelessCommand**](preview.wireless.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDeployment + +> PreviewDeployedDevicesFleetDeployment CreateDeployment(ctx, FleetSid, optional) + + + +Create a new Deployment in the Fleet, optionally giving it a friendly name and linking to a specific Twilio Sync service instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***CreateDeploymentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDeploymentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Deployment, up to 256 characters long. | + **SyncServiceSid** | **optional.String**| Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. | + +### Return type + +[**PreviewDeployedDevicesFleetDeployment**](preview.deployed_devices.fleet.deployment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDevice + +> PreviewDeployedDevicesFleetDevice CreateDevice(ctx, FleetSid, optional) + + + +Create a new Device in the Fleet, optionally giving it a unique name, friendly name, and assigning to a Deployment and/or human identity. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***CreateDeviceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDeviceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DeploymentSid** | **optional.String**| Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. | + **Enabled** | **optional.Bool**| | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. | + **Identity** | **optional.String**| Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. | + **UniqueName** | **optional.String**| Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetDevice**](preview.deployed_devices.fleet.device.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDocument + +> PreviewSyncServiceDocument CreateDocument(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + **UniqueName** | **optional.String**| | + +### Return type + +[**PreviewSyncServiceDocument**](preview.sync.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateExportCustomJob + +> PreviewBulkExportsExportExportCustomJob CreateExportCustomJob(ctx, ResourceType, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages or Calls, Conferences, and Participants | + **optional** | ***CreateExportCustomJobOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateExportCustomJobOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Email** | **optional.String**| The optional email to send the completion notification to | + **EndDay** | **optional.String**| The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. | + **FriendlyName** | **optional.String**| The friendly name specified when creating the job | + **StartDay** | **optional.String**| The start day for the custom export specified as a string in the format of yyyy-mm-dd | + **WebhookMethod** | **optional.String**| This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. | + **WebhookUrl** | **optional.String**| The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. | + +### Return type + +[**PreviewBulkExportsExportExportCustomJob**](preview.bulk_exports.export.export_custom_job.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateField + +> PreviewUnderstandAssistantTaskField CreateField(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Field. | + **optional** | ***CreateFieldOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FieldType** | **optional.String**| The unique name or sid of the FieldType. It can be any [Built-in Field Type](https://www.twilio.com/docs/assistant/api/built-in-field-types) or the unique_name or the Field Type sid of a custom Field Type. | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantTaskField**](preview.understand.assistant.task.field.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFieldType + +> PreviewUnderstandAssistantFieldType CreateFieldType(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***CreateFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantFieldType**](preview.understand.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFieldValue + +> PreviewUnderstandAssistantFieldTypeFieldValue CreateFieldValue(ctx, AssistantSid, FieldTypeSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**FieldTypeSid** | **string**| | + **optional** | ***CreateFieldValueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFieldValueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| An ISO language-country string of the value. | + **SynonymOf** | **optional.String**| A value that indicates this field value is a synonym of. Empty if the value is not a synonym. | + **Value** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantFieldTypeFieldValue**](preview.understand.assistant.field_type.field_value.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFleet + +> PreviewDeployedDevicesFleet CreateFleet(ctx, optional) + + + +Create a new Fleet for scoping of deployed devices within your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Fleet, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleet**](preview.deployed_devices.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateHostedNumberOrder + +> PreviewHostedNumbersHostedNumberOrder CreateHostedNumberOrder(ctx, optional) + + + +Host a phone number's capability on Twilio's platform. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateHostedNumberOrderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateHostedNumberOrderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AccountSid** | **optional.String**| This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. | + **AddressSid** | **optional.String**| Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. | + **CcEmails** | [**optional.Interface of []string**](string.md)| Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. | + **Email** | **optional.String**| Optional. Email of the owner of this phone number that is being hosted. | + **FriendlyName** | **optional.String**| A 64 character string that is a human readable text that describes this resource. | + **PhoneNumber** | **optional.String**| The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format | + **SmsApplicationSid** | **optional.String**| Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. | + **SmsCapability** | **optional.Bool**| Used to specify that the SMS capability will be hosted on Twilio's platform. | + **SmsFallbackMethod** | **optional.String**| The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. | + **SmsFallbackUrl** | **optional.String**| A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. | + **SmsMethod** | **optional.String**| The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. | + **SmsUrl** | **optional.String**| The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. | + **StatusCallbackMethod** | **optional.String**| Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. | + **StatusCallbackUrl** | **optional.String**| Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. | + **UniqueName** | **optional.String**| Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | + **VerificationDocumentSid** | **optional.String**| Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. | + **VerificationType** | **optional.String**| Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. | + +### Return type + +[**PreviewHostedNumbersHostedNumberOrder**](preview.hosted_numbers.hosted_number_order.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateInstalledAddOn + +> PreviewMarketplaceInstalledAddOn CreateInstalledAddOn(ctx, optional) + + + +Install an Add-on for the Account specified. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateInstalledAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateInstalledAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AcceptTermsOfService** | **optional.Bool**| Whether the Terms of Service were accepted. | + **AvailableAddOnSid** | **optional.String**| The SID of the AvaliableAddOn to install. | + **Configuration** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON object that represents the configuration of the new Add-on being installed. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be unique within the Account. | + +### Return type + +[**PreviewMarketplaceInstalledAddOn**](preview.marketplace.installed_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateKey + +> PreviewDeployedDevicesFleetKey CreateKey(ctx, FleetSid, optional) + + + +Create a new Key credential in the Fleet, optionally giving it a friendly name and assigning to a Device. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***CreateKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DeviceSid** | **optional.String**| Provides the unique string identifier of an existing Device to become authenticated with this Key credential. | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Key credential, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetKey**](preview.deployed_devices.fleet.key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateModelBuild + +> PreviewUnderstandAssistantModelBuild CreateModelBuild(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***CreateModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **StatusCallback** | **optional.String**| | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 | + +### Return type + +[**PreviewUnderstandAssistantModelBuild**](preview.understand.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateQuery + +> PreviewUnderstandAssistantQuery CreateQuery(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | + **optional** | ***CreateQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Field** | **optional.String**| Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name* | + **Language** | **optional.String**| An ISO language-country string of the sample. | + **ModelBuild** | **optional.String**| The Model Build Sid or unique name of the Model Build to be queried. | + **Query** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. | + **Tasks** | **optional.String**| Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2* | + +### Return type + +[**PreviewUnderstandAssistantQuery**](preview.understand.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRatePlan + +> PreviewWirelessRatePlan CreateRatePlan(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CommandsEnabled** | **optional.Bool**| | + **DataEnabled** | **optional.Bool**| | + **DataLimit** | **optional.Int32**| | + **DataMetering** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **InternationalRoaming** | [**optional.Interface of []string**](string.md)| | + **MessagingEnabled** | **optional.Bool**| | + **NationalRoamingEnabled** | **optional.Bool**| | + **UniqueName** | **optional.String**| | + **VoiceEnabled** | **optional.Bool**| | + +### Return type + +[**PreviewWirelessRatePlan**](preview.wireless.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSample + +> PreviewUnderstandAssistantTaskSample CreateSample(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Sample. | + **optional** | ***CreateSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| An ISO language-country string of the sample. | + **SourceChannel** | **optional.String**| The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null | + **TaggedText** | **optional.String**| The text example of how end-users may express this task. The sample may contain Field tag blocks. | + +### Return type + +[**PreviewUnderstandAssistantTaskSample**](preview.understand.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> PreviewSyncService CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AclEnabled** | **optional.Bool**| | + **FriendlyName** | **optional.String**| | + **ReachabilityWebhooksEnabled** | **optional.Bool**| | + **WebhookUrl** | **optional.String**| | + +### Return type + +[**PreviewSyncService**](preview.sync.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncList + +> PreviewSyncServiceSyncList CreateSyncList(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateSyncListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **UniqueName** | **optional.String**| | + +### Return type + +[**PreviewSyncServiceSyncList**](preview.sync.service.sync_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncListItem + +> PreviewSyncServiceSyncListSyncListItem CreateSyncListItem(ctx, ServiceSid, ListSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| | + **optional** | ***CreateSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewSyncServiceSyncListSyncListItem**](preview.sync.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncMap + +> PreviewSyncServiceSyncMap CreateSyncMap(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***CreateSyncMapOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncMapOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **UniqueName** | **optional.String**| | + +### Return type + +[**PreviewSyncServiceSyncMap**](preview.sync.service.sync_map.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncMapItem + +> PreviewSyncServiceSyncMapSyncMapItem CreateSyncMapItem(ctx, ServiceSid, MapSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| | + **optional** | ***CreateSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + **Key** | **optional.String**| | + +### Return type + +[**PreviewSyncServiceSyncMapSyncMapItem**](preview.sync.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTask + +> PreviewUnderstandAssistantTask CreateTask(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | + **optional** | ***CreateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. | + **ActionsUrl** | **optional.String**| User-provided HTTP endpoint where from the assistant fetches actions | + **FriendlyName** | **optional.String**| A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantTask**](preview.understand.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAssistant + +> DeleteAssistant(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCertificate + +> DeleteCertificate(ctx, FleetSid, Sid) + + + +Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Certificate credential resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDeployment + +> DeleteDeployment(ctx, FleetSid, Sid) + + + +Delete a specific Deployment from the Fleet, leaving associated devices effectively undeployed. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Deployment resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDevice + +> DeleteDevice(ctx, FleetSid, Sid) + + + +Delete a specific Device from the Fleet, also removing it from associated Deployments. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Device resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDocument + +> DeleteDocument(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***DeleteDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDocumentPermission + +> DeleteDocumentPermission(ctx, ServiceSid, DocumentSid, Identity) + + + +Delete a specific Sync Document Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**DocumentSid** | **string**| Identifier of the Sync Document. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteField + +> DeleteField(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Field. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFieldType + +> DeleteFieldType(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFieldValue + +> DeleteFieldValue(ctx, AssistantSid, FieldTypeSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**FieldTypeSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFleet + +> DeleteFleet(ctx, Sid) + + + +Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates, Keys. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Fleet resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteHostedNumberOrder + +> DeleteHostedNumberOrder(ctx, Sid) + + + +Cancel the HostedNumberOrder (only available when the status is in `received`). + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this HostedNumberOrder. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInstalledAddOn + +> DeleteInstalledAddOn(ctx, Sid) + + + +Remove an Add-on installation from your account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the InstalledAddOn resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteJob + +> DeleteJob(ctx, JobSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobSid** | **string**| The unique string that that we created to identify the Bulk Export job | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteKey + +> DeleteKey(ctx, FleetSid, Sid) + + + +Delete a specific Key credential from the Fleet, effectively disallowing any inbound client connections that are presenting it. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Key credential resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteModelBuild + +> DeleteModelBuild(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteQuery + +> DeleteQuery(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRatePlan + +> DeleteRatePlan(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSample + +> DeleteSample(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Sample. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncList + +> DeleteSyncList(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncListItem + +> DeleteSyncListItem(ctx, ServiceSid, ListSid, Index, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| | +**Index** | **int32**| | + **optional** | ***DeleteSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncListPermission + +> DeleteSyncListPermission(ctx, ServiceSid, ListSid, Identity) + + + +Delete a specific Sync List Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| Identifier of the Sync List. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMap + +> DeleteSyncMap(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMapItem + +> DeleteSyncMapItem(ctx, ServiceSid, MapSid, Key, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| | +**Key** | **string**| | + **optional** | ***DeleteSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMapPermission + +> DeleteSyncMapPermission(ctx, ServiceSid, MapSid, Identity) + + + +Delete a specific Sync Map Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| Identifier of the Sync Map. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTask + +> DeleteTask(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAssistant + +> PreviewUnderstandAssistant FetchAssistant(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**PreviewUnderstandAssistant**](preview.understand.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAssistantFallbackActions + +> PreviewUnderstandAssistantAssistantFallbackActions FetchAssistantFallbackActions(ctx, AssistantSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantAssistantFallbackActions**](preview.understand.assistant.assistant_fallback_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAssistantInitiationActions + +> PreviewUnderstandAssistantAssistantInitiationActions FetchAssistantInitiationActions(ctx, AssistantSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantAssistantInitiationActions**](preview.understand.assistant.assistant_initiation_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAuthorizationDocument + +> PreviewHostedNumbersAuthorizationDocument FetchAuthorizationDocument(ctx, Sid) + + + +Fetch a specific AuthorizationDocument. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this AuthorizationDocument. | + +### Return type + +[**PreviewHostedNumbersAuthorizationDocument**](preview.hosted_numbers.authorization_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAvailableAddOn + +> PreviewMarketplaceAvailableAddOn FetchAvailableAddOn(ctx, Sid) + + + +Fetch an instance of an Add-on currently available to be installed. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the AvailableAddOn resource to fetch. | + +### Return type + +[**PreviewMarketplaceAvailableAddOn**](preview.marketplace.available_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAvailableAddOnExtension + +> PreviewMarketplaceAvailableAddOnAvailableAddOnExtension FetchAvailableAddOnExtension(ctx, AvailableAddOnSid, Sid) + + + +Fetch an instance of an Extension for the Available Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AvailableAddOnSid** | **string**| The SID of the AvailableAddOn resource with the extension to fetch. | +**Sid** | **string**| The SID of the AvailableAddOn Extension resource to fetch. | + +### Return type + +[**PreviewMarketplaceAvailableAddOnAvailableAddOnExtension**](preview.marketplace.available_add_on.available_add_on_extension.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBrandedChannel + +> PreviewTrustedCommsBrandedChannel FetchBrandedChannel(ctx, Sid) + + + +Fetch a specific Branded Channel. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique SID identifier of the Branded Channel. | + +### Return type + +[**PreviewTrustedCommsBrandedChannel**](preview.trusted_comms.branded_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBrandsInformation + +> PreviewTrustedCommsBrandsInformation FetchBrandsInformation(ctx, optional) + + + +Retrieve the newest available BrandInformation + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FetchBrandsInformationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchBrandsInformationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **IfNoneMatch** | **optional.String**| The If-None-Match HTTP request header | + +### Return type + +[**PreviewTrustedCommsBrandsInformation**](preview.trusted_comms.brands_information.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCertificate + +> PreviewDeployedDevicesFleetCertificate FetchCertificate(ctx, FleetSid, Sid) + + + +Fetch information about a specific Certificate credential in the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Certificate credential resource. | + +### Return type + +[**PreviewDeployedDevicesFleetCertificate**](preview.deployed_devices.fleet.certificate.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCommand + +> PreviewWirelessCommand FetchCommand(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**PreviewWirelessCommand**](preview.wireless.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCps + +> PreviewTrustedCommsCps FetchCps(ctx, optional) + + + +Fetch a specific Call Placement Service (CPS) given a phone number via `X-XCNAM-Sensitive-Phone-Number` header. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FetchCpsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchCpsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **XXcnamSensitivePhoneNumber** | **optional.String**| The X-Xcnam-Sensitive-Phone-Number HTTP request header | + +### Return type + +[**PreviewTrustedCommsCps**](preview.trusted_comms.cps.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCurrentCall + +> PreviewTrustedCommsCurrentCall FetchCurrentCall(ctx, optional) + + + +Retrieve a current call given the originating and terminating number via `X-XCNAM-Sensitive-Phone-Number-From` and `X-XCNAM-Sensitive-Phone-Number-To` headers. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***FetchCurrentCallOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchCurrentCallOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **XXcnamSensitivePhoneNumberFrom** | **optional.String**| The X-Xcnam-Sensitive-Phone-Number-From HTTP request header | + **XXcnamSensitivePhoneNumberTo** | **optional.String**| The X-Xcnam-Sensitive-Phone-Number-To HTTP request header | + +### Return type + +[**PreviewTrustedCommsCurrentCall**](preview.trusted_comms.current_call.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDay + +> FetchDay(ctx, ResourceType, Day) + + + +Fetch a specific Day. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | +**Day** | **string**| The ISO 8601 format date of the resources in the file, for a UTC day | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDeployment + +> PreviewDeployedDevicesFleetDeployment FetchDeployment(ctx, FleetSid, Sid) + + + +Fetch information about a specific Deployment in the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Deployment resource. | + +### Return type + +[**PreviewDeployedDevicesFleetDeployment**](preview.deployed_devices.fleet.deployment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDevice + +> PreviewDeployedDevicesFleetDevice FetchDevice(ctx, FleetSid, Sid) + + + +Fetch information about a specific Device in the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Device resource. | + +### Return type + +[**PreviewDeployedDevicesFleetDevice**](preview.deployed_devices.fleet.device.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDialogue + +> PreviewUnderstandAssistantDialogue FetchDialogue(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantDialogue**](preview.understand.assistant.dialogue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDocument + +> PreviewSyncServiceDocument FetchDocument(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewSyncServiceDocument**](preview.sync.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDocumentPermission + +> PreviewSyncServiceDocumentDocumentPermission FetchDocumentPermission(ctx, ServiceSid, DocumentSid, Identity) + + + +Fetch a specific Sync Document Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**DocumentSid** | **string**| Identifier of the Sync Document. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + +[**PreviewSyncServiceDocumentDocumentPermission**](preview.sync.service.document.document_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExport + +> PreviewBulkExportsExport FetchExport(ctx, ResourceType) + + + +Fetch a specific Export. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + +### Return type + +[**PreviewBulkExportsExport**](preview.bulk_exports.export.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExportConfiguration + +> PreviewBulkExportsExportConfiguration FetchExportConfiguration(ctx, ResourceType) + + + +Fetch a specific Export Configuration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + +### Return type + +[**PreviewBulkExportsExportConfiguration**](preview.bulk_exports.export_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchField + +> PreviewUnderstandAssistantTaskField FetchField(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Field. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**PreviewUnderstandAssistantTaskField**](preview.understand.assistant.task.field.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFieldType + +> PreviewUnderstandAssistantFieldType FetchFieldType(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantFieldType**](preview.understand.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFieldValue + +> PreviewUnderstandAssistantFieldTypeFieldValue FetchFieldValue(ctx, AssistantSid, FieldTypeSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**FieldTypeSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantFieldTypeFieldValue**](preview.understand.assistant.field_type.field_value.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFleet + +> PreviewDeployedDevicesFleet FetchFleet(ctx, Sid) + + + +Fetch information about a specific Fleet in your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Fleet resource. | + +### Return type + +[**PreviewDeployedDevicesFleet**](preview.deployed_devices.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchHostedNumberOrder + +> PreviewHostedNumbersHostedNumberOrder FetchHostedNumberOrder(ctx, Sid) + + + +Fetch a specific HostedNumberOrder. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this HostedNumberOrder. | + +### Return type + +[**PreviewHostedNumbersHostedNumberOrder**](preview.hosted_numbers.hosted_number_order.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInstalledAddOn + +> PreviewMarketplaceInstalledAddOn FetchInstalledAddOn(ctx, Sid) + + + +Fetch an instance of an Add-on currently installed on this Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the InstalledAddOn resource to fetch. | + +### Return type + +[**PreviewMarketplaceInstalledAddOn**](preview.marketplace.installed_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInstalledAddOnExtension + +> PreviewMarketplaceInstalledAddOnInstalledAddOnExtension FetchInstalledAddOnExtension(ctx, InstalledAddOnSid, Sid) + + + +Fetch an instance of an Extension for the Installed Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**InstalledAddOnSid** | **string**| The SID of the InstalledAddOn resource with the extension to fetch. | +**Sid** | **string**| The SID of the InstalledAddOn Extension resource to fetch. | + +### Return type + +[**PreviewMarketplaceInstalledAddOnInstalledAddOnExtension**](preview.marketplace.installed_add_on.installed_add_on_extension.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchJob + +> PreviewBulkExportsExportJob FetchJob(ctx, JobSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobSid** | **string**| The unique string that that we created to identify the Bulk Export job | + +### Return type + +[**PreviewBulkExportsExportJob**](preview.bulk_exports.export.job.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchKey + +> PreviewDeployedDevicesFleetKey FetchKey(ctx, FleetSid, Sid) + + + +Fetch information about a specific Key credential in the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Key credential resource. | + +### Return type + +[**PreviewDeployedDevicesFleetKey**](preview.deployed_devices.fleet.key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchModelBuild + +> PreviewUnderstandAssistantModelBuild FetchModelBuild(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewUnderstandAssistantModelBuild**](preview.understand.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchQuery + +> PreviewUnderstandAssistantQuery FetchQuery(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**PreviewUnderstandAssistantQuery**](preview.understand.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRatePlan + +> PreviewWirelessRatePlan FetchRatePlan(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**PreviewWirelessRatePlan**](preview.wireless.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSample + +> PreviewUnderstandAssistantTaskSample FetchSample(ctx, AssistantSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Sample. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**PreviewUnderstandAssistantTaskSample**](preview.understand.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> PreviewSyncService FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**PreviewSyncService**](preview.sync.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSim + +> PreviewWirelessSim FetchSim(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + +### Return type + +[**PreviewWirelessSim**](preview.wireless.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchStyleSheet + +> PreviewUnderstandAssistantStyleSheet FetchStyleSheet(ctx, AssistantSid) + + + +Returns Style sheet JSON object for this Assistant + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant | + +### Return type + +[**PreviewUnderstandAssistantStyleSheet**](preview.understand.assistant.style_sheet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncList + +> PreviewSyncServiceSyncList FetchSyncList(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewSyncServiceSyncList**](preview.sync.service.sync_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncListItem + +> PreviewSyncServiceSyncListSyncListItem FetchSyncListItem(ctx, ServiceSid, ListSid, Index) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| | +**Index** | **int32**| | + +### Return type + +[**PreviewSyncServiceSyncListSyncListItem**](preview.sync.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncListPermission + +> PreviewSyncServiceSyncListSyncListPermission FetchSyncListPermission(ctx, ServiceSid, ListSid, Identity) + + + +Fetch a specific Sync List Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| Identifier of the Sync List. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + +[**PreviewSyncServiceSyncListSyncListPermission**](preview.sync.service.sync_list.sync_list_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMap + +> PreviewSyncServiceSyncMap FetchSyncMap(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + +### Return type + +[**PreviewSyncServiceSyncMap**](preview.sync.service.sync_map.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMapItem + +> PreviewSyncServiceSyncMapSyncMapItem FetchSyncMapItem(ctx, ServiceSid, MapSid, Key) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| | +**Key** | **string**| | + +### Return type + +[**PreviewSyncServiceSyncMapSyncMapItem**](preview.sync.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMapPermission + +> PreviewSyncServiceSyncMapSyncMapPermission FetchSyncMapPermission(ctx, ServiceSid, MapSid, Identity) + + + +Fetch a specific Sync Map Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| Identifier of the Sync Map. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer. | + +### Return type + +[**PreviewSyncServiceSyncMapSyncMapPermission**](preview.sync.service.sync_map.sync_map_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTask + +> PreviewUnderstandAssistantTask FetchTask(ctx, AssistantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + +### Return type + +[**PreviewUnderstandAssistantTask**](preview.understand.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskActions + +> PreviewUnderstandAssistantTaskTaskActions FetchTaskActions(ctx, AssistantSid, TaskSid) + + + +Returns JSON actions for this Task. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | +**TaskSid** | **string**| The unique ID of the Task. | + +### Return type + +[**PreviewUnderstandAssistantTaskTaskActions**](preview.understand.assistant.task.task_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskStatistics + +> PreviewUnderstandAssistantTaskTaskStatistics FetchTaskStatistics(ctx, AssistantSid, TaskSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Field. | + +### Return type + +[**PreviewUnderstandAssistantTaskTaskStatistics**](preview.understand.assistant.task.task_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchUsage + +> PreviewWirelessSimUsage FetchUsage(ctx, SimSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SimSid** | **string**| | + **optional** | ***FetchUsageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchUsageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **End** | **optional.String**| | + **Start** | **optional.String**| | + +### Return type + +[**PreviewWirelessSimUsage**](preview.wireless.sim.usage.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAssistant + +> ListAssistantResponse ListAssistant(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAssistantResponse**](ListAssistantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAuthorizationDocument + +> ListAuthorizationDocumentResponse ListAuthorizationDocument(ctx, optional) + + + +Retrieve a list of AuthorizationDocuments belonging to the account initiating the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAuthorizationDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAuthorizationDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Email** | **optional.String**| Email that this AuthorizationDocument will be sent to for signing. | + **Status** | **optional.String**| Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAuthorizationDocumentResponse**](ListAuthorizationDocumentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailableAddOn + +> ListAvailableAddOnResponse ListAvailableAddOn(ctx, optional) + + + +Retrieve a list of Add-ons currently available to be installed. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAvailableAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailableAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailableAddOnResponse**](ListAvailableAddOnResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAvailableAddOnExtension + +> ListAvailableAddOnExtensionResponse ListAvailableAddOnExtension(ctx, AvailableAddOnSid, optional) + + + +Retrieve a list of Extensions for the Available Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AvailableAddOnSid** | **string**| The SID of the AvailableAddOn resource with the extensions to read. | + **optional** | ***ListAvailableAddOnExtensionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAvailableAddOnExtensionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAvailableAddOnExtensionResponse**](ListAvailableAddOnExtensionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCertificate + +> ListCertificateResponse ListCertificate(ctx, FleetSid, optional) + + + +Retrieve a list of all Certificate credentials belonging to the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***ListCertificateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCertificateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DeviceSid** | **optional.String**| Filters the resulting list of Certificates by a unique string identifier of an authenticated Device. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCertificateResponse**](ListCertificateResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCommand + +> ListCommandResponse ListCommand(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Device** | **optional.String**| | + **Sim** | **optional.String**| | + **Status** | **optional.String**| | + **Direction** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCommandResponse**](ListCommandResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDay + +> ListDayResponse ListDay(ctx, ResourceType, optional) + + + +Retrieve a list of all Days for a resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***ListDayOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDayOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDayResponse**](ListDayResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDependentHostedNumberOrder + +> ListDependentHostedNumberOrderResponse ListDependentHostedNumberOrder(ctx, SigningDocumentSid, optional) + + + +Retrieve a list of dependent HostedNumberOrders belonging to the AuthorizationDocument. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SigningDocumentSid** | **string**| | + **optional** | ***ListDependentHostedNumberOrderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDependentHostedNumberOrderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Status** | **optional.String**| Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. | + **PhoneNumber** | **optional.String**| An E164 formatted phone number hosted by this HostedNumberOrder. | + **IncomingPhoneNumberSid** | **optional.String**| A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. | + **FriendlyName** | **optional.String**| A human readable description of this resource, up to 64 characters. | + **UniqueName** | **optional.String**| Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDependentHostedNumberOrderResponse**](ListDependentHostedNumberOrderResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDeployment + +> ListDeploymentResponse ListDeployment(ctx, FleetSid, optional) + + + +Retrieve a list of all Deployments belonging to the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***ListDeploymentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDeploymentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDeploymentResponse**](ListDeploymentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDevice + +> ListDeviceResponse ListDevice(ctx, FleetSid, optional) + + + +Retrieve a list of all Devices belonging to the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***ListDeviceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDeviceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DeploymentSid** | **optional.String**| Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDeviceResponse**](ListDeviceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDocument + +> ListDocumentResponse ListDocument(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDocumentResponse**](ListDocumentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDocumentPermission + +> ListDocumentPermissionResponse ListDocumentPermission(ctx, ServiceSid, DocumentSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**DocumentSid** | **string**| Identifier of the Sync Document. Either a SID or a unique name. | + **optional** | ***ListDocumentPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDocumentPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDocumentPermissionResponse**](ListDocumentPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExportCustomJob + +> ListExportCustomJobResponse ListExportCustomJob(ctx, ResourceType, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***ListExportCustomJobOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExportCustomJobOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExportCustomJobResponse**](ListExportCustomJobResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListField + +> ListFieldResponse ListField(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Field. | + **optional** | ***ListFieldOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldResponse**](ListFieldResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFieldType + +> ListFieldTypeResponse ListFieldType(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***ListFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldTypeResponse**](ListFieldTypeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFieldValue + +> ListFieldValueResponse ListFieldValue(ctx, AssistantSid, FieldTypeSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**FieldTypeSid** | **string**| | + **optional** | ***ListFieldValueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFieldValueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| An ISO language-country string of the value. For example: *en-US* | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFieldValueResponse**](ListFieldValueResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFleet + +> ListFleetResponse ListFleet(ctx, optional) + + + +Retrieve a list of all Fleets belonging to your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFleetResponse**](ListFleetResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListHostedNumberOrder + +> ListHostedNumberOrderResponse ListHostedNumberOrder(ctx, optional) + + + +Retrieve a list of HostedNumberOrders belonging to the account initiating the request. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListHostedNumberOrderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListHostedNumberOrderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`. | + **PhoneNumber** | **optional.String**| An E164 formatted phone number hosted by this HostedNumberOrder. | + **IncomingPhoneNumberSid** | **optional.String**| A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder. | + **FriendlyName** | **optional.String**| A human readable description of this resource, up to 64 characters. | + **UniqueName** | **optional.String**| Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListHostedNumberOrderResponse**](ListHostedNumberOrderResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInstalledAddOn + +> ListInstalledAddOnResponse ListInstalledAddOn(ctx, optional) + + + +Retrieve a list of Add-ons currently installed on this Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListInstalledAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInstalledAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInstalledAddOnResponse**](ListInstalledAddOnResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInstalledAddOnExtension + +> ListInstalledAddOnExtensionResponse ListInstalledAddOnExtension(ctx, InstalledAddOnSid, optional) + + + +Retrieve a list of Extensions for the Installed Add-on. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**InstalledAddOnSid** | **string**| The SID of the InstalledAddOn resource with the extensions to read. | + **optional** | ***ListInstalledAddOnExtensionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInstalledAddOnExtensionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInstalledAddOnExtensionResponse**](ListInstalledAddOnExtensionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListKey + +> ListKeyResponse ListKey(ctx, FleetSid, optional) + + + +Retrieve a list of all Keys credentials belonging to the Fleet. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | + **optional** | ***ListKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DeviceSid** | **optional.String**| Filters the resulting list of Keys by a unique string identifier of an authenticated Device. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListKeyResponse**](ListKeyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListModelBuild + +> ListModelBuildResponse ListModelBuild(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***ListModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListModelBuildResponse**](ListModelBuildResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListQuery + +> ListQueryResponse ListQuery(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | + **optional** | ***ListQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Language** | **optional.String**| An ISO language-country string of the sample. | + **ModelBuild** | **optional.String**| The Model Build Sid or unique name of the Model Build to be queried. | + **Status** | **optional.String**| A string that described the query status. The values can be: pending_review, reviewed, discarded | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListQueryResponse**](ListQueryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRatePlan + +> ListRatePlanResponse ListRatePlan(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRatePlanResponse**](ListRatePlanResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSample + +> ListSampleResponse ListSample(ctx, AssistantSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Sample. | + **optional** | ***ListSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Language** | **optional.String**| An ISO language-country string of the sample. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSampleResponse**](ListSampleResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSim + +> ListSimResponse ListSim(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| | + **Iccid** | **optional.String**| | + **RatePlan** | **optional.String**| | + **EId** | **optional.String**| | + **SimRegistrationCode** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSimResponse**](ListSimResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncList + +> ListSyncListResponse ListSyncList(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListSyncListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListResponse**](ListSyncListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncListItem + +> ListSyncListItemResponse ListSyncListItem(ctx, ServiceSid, ListSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| | + **optional** | ***ListSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| | + **From** | **optional.String**| | + **Bounds** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListItemResponse**](ListSyncListItemResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncListPermission + +> ListSyncListPermissionResponse ListSyncListPermission(ctx, ServiceSid, ListSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync List. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| Identifier of the Sync List. Either a SID or a unique name. | + **optional** | ***ListSyncListPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListPermissionResponse**](ListSyncListPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMap + +> ListSyncMapResponse ListSyncMap(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | + **optional** | ***ListSyncMapOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapResponse**](ListSyncMapResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMapItem + +> ListSyncMapItemResponse ListSyncMapItem(ctx, ServiceSid, MapSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| | + **optional** | ***ListSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| | + **From** | **optional.String**| | + **Bounds** | **optional.String**| | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapItemResponse**](ListSyncMapItemResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMapPermission + +> ListSyncMapPermissionResponse ListSyncMapPermission(ctx, ServiceSid, MapSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync Map. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| Identifier of the Sync Map. Either a SID or a unique name. | + **optional** | ***ListSyncMapPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapPermissionResponse**](ListSyncMapPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTask + +> ListTaskResponse ListTask(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | + **optional** | ***ListTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskResponse**](ListTaskResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAssistant + +> PreviewUnderstandAssistant UpdateAssistant(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateAssistantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAssistantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallbackEvents** | **optional.String**| Space-separated list of callback events that will trigger callbacks. | + **CallbackUrl** | **optional.String**| A user-provided URL to send event callbacks to. | + **FallbackActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON actions to be executed when the user's input is not recognized as matching any Task. | + **FriendlyName** | **optional.String**| A text description for the Assistant. It is non-unique and can up to 255 characters long. | + **InitiationActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. | + **LogQueries** | **optional.Bool**| A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. | + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON object that holds the style sheet for the assistant | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistant**](preview.understand.assistant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAssistantFallbackActions + +> PreviewUnderstandAssistantAssistantFallbackActions UpdateAssistantFallbackActions(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***UpdateAssistantFallbackActionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAssistantFallbackActionsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FallbackActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewUnderstandAssistantAssistantFallbackActions**](preview.understand.assistant.assistant_fallback_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAssistantInitiationActions + +> PreviewUnderstandAssistantAssistantInitiationActions UpdateAssistantInitiationActions(ctx, AssistantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | + **optional** | ***UpdateAssistantInitiationActionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAssistantInitiationActionsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **InitiationActions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewUnderstandAssistantAssistantInitiationActions**](preview.understand.assistant.assistant_initiation_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAuthorizationDocument + +> PreviewHostedNumbersAuthorizationDocument UpdateAuthorizationDocument(ctx, Sid, optional) + + + +Updates a specific AuthorizationDocument. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateAuthorizationDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAuthorizationDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AddressSid** | **optional.String**| A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. | + **CcEmails** | [**optional.Interface of []string**](string.md)| Email recipients who will be informed when an Authorization Document has been sent and signed | + **ContactPhoneNumber** | **optional.String**| The contact phone number of the person authorized to sign the Authorization Document. | + **ContactTitle** | **optional.String**| The title of the person authorized to sign the Authorization Document for this phone number. | + **Email** | **optional.String**| Email that this AuthorizationDocument will be sent to for signing. | + **HostedNumberOrderSids** | [**optional.Interface of []string**](string.md)| A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. | + **Status** | **optional.String**| Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. | + +### Return type + +[**PreviewHostedNumbersAuthorizationDocument**](preview.hosted_numbers.authorization_document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCertificate + +> PreviewDeployedDevicesFleetCertificate UpdateCertificate(ctx, FleetSid, Sid, optional) + + + +Update the given properties of a specific Certificate credential in the Fleet, giving it a friendly name or assigning to a Device. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Certificate credential resource. | + **optional** | ***UpdateCertificateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCertificateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DeviceSid** | **optional.String**| Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetCertificate**](preview.deployed_devices.fleet.certificate.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDeployment + +> PreviewDeployedDevicesFleetDeployment UpdateDeployment(ctx, FleetSid, Sid, optional) + + + +Update the given properties of a specific Deployment credential in the Fleet, giving it a friendly name or linking to a specific Twilio Sync service instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Deployment resource. | + **optional** | ***UpdateDeploymentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDeploymentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Deployment, up to 64 characters long | + **SyncServiceSid** | **optional.String**| Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. | + +### Return type + +[**PreviewDeployedDevicesFleetDeployment**](preview.deployed_devices.fleet.deployment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDevice + +> PreviewDeployedDevicesFleetDevice UpdateDevice(ctx, FleetSid, Sid, optional) + + + +Update the given properties of a specific Device in the Fleet, giving it a friendly name, assigning to a Deployment, or a human identity. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Device resource. | + **optional** | ***UpdateDeviceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDeviceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DeploymentSid** | **optional.String**| Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. | + **Enabled** | **optional.Bool**| | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. | + **Identity** | **optional.String**| Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetDevice**](preview.deployed_devices.fleet.device.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDocument + +> PreviewSyncServiceDocument UpdateDocument(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewSyncServiceDocument**](preview.sync.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDocumentPermission + +> PreviewSyncServiceDocumentDocumentPermission UpdateDocumentPermission(ctx, ServiceSid, DocumentSid, Identity, optional) + + + +Update an identity's access to a specific Sync Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Sync Service Instance. | +**DocumentSid** | **string**| Identifier of the Sync Document. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. | + **optional** | ***UpdateDocumentPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDocumentPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Boolean flag specifying whether the identity can delete the Sync Document. | + **Read** | **optional.Bool**| Boolean flag specifying whether the identity can read the Sync Document. | + **Write** | **optional.Bool**| Boolean flag specifying whether the identity can update the Sync Document. | + +### Return type + +[**PreviewSyncServiceDocumentDocumentPermission**](preview.sync.service.document.document_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExportConfiguration + +> PreviewBulkExportsExportConfiguration UpdateExportConfiguration(ctx, ResourceType, optional) + + + +Update a specific Export Configuration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ResourceType** | **string**| The type of communication – Messages, Calls, Conferences, and Participants | + **optional** | ***UpdateExportConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateExportConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Enabled** | **optional.Bool**| If true, Twilio will automatically generate every day's file when the day is over. | + **WebhookMethod** | **optional.String**| Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url | + **WebhookUrl** | **optional.String**| Stores the URL destination for the method specified in webhook_method. | + +### Return type + +[**PreviewBulkExportsExportConfiguration**](preview.bulk_exports.export_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFieldType + +> PreviewUnderstandAssistantFieldType UpdateFieldType(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateFieldTypeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFieldTypeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantFieldType**](preview.understand.assistant.field_type.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFleet + +> PreviewDeployedDevicesFleet UpdateFleet(ctx, Sid, optional) + + + +Update the friendly name property of a specific Fleet in your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Fleet resource. | + **optional** | ***UpdateFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DefaultDeploymentSid** | **optional.String**| Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet. | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Fleet, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleet**](preview.deployed_devices.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateHostedNumberOrder + +> PreviewHostedNumbersHostedNumberOrder UpdateHostedNumberOrder(ctx, Sid, optional) + + + +Updates a specific HostedNumberOrder. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateHostedNumberOrderOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateHostedNumberOrderOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallDelay** | **optional.Int32**| The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. | + **CcEmails** | [**optional.Interface of []string**](string.md)| Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. | + **Email** | **optional.String**| Email of the owner of this phone number that is being hosted. | + **Extension** | **optional.String**| Digits to dial after connecting the verification call. | + **FriendlyName** | **optional.String**| A 64 character string that is a human readable text that describes this resource. | + **Status** | **optional.String**| User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. | + **UniqueName** | **optional.String**| Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | + **VerificationCode** | **optional.String**| A verification code that is given to the user via a phone call to the phone number that is being hosted. | + **VerificationDocumentSid** | **optional.String**| Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. | + **VerificationType** | **optional.String**| Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. | + +### Return type + +[**PreviewHostedNumbersHostedNumberOrder**](preview.hosted_numbers.hosted_number_order.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateInstalledAddOn + +> PreviewMarketplaceInstalledAddOn UpdateInstalledAddOn(ctx, Sid, optional) + + + +Update an Add-on installation for the Account specified. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the InstalledAddOn resource to update. | + **optional** | ***UpdateInstalledAddOnOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateInstalledAddOnOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Configuration** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be unique within the Account. | + +### Return type + +[**PreviewMarketplaceInstalledAddOn**](preview.marketplace.installed_add_on.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateInstalledAddOnExtension + +> PreviewMarketplaceInstalledAddOnInstalledAddOnExtension UpdateInstalledAddOnExtension(ctx, InstalledAddOnSid, Sid, optional) + + + +Update an Extension for an Add-on installation. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**InstalledAddOnSid** | **string**| The SID of the InstalledAddOn resource with the extension to update. | +**Sid** | **string**| The SID of the InstalledAddOn Extension resource to update. | + **optional** | ***UpdateInstalledAddOnExtensionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateInstalledAddOnExtensionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Enabled** | **optional.Bool**| Whether the Extension should be invoked. | + +### Return type + +[**PreviewMarketplaceInstalledAddOnInstalledAddOnExtension**](preview.marketplace.installed_add_on.installed_add_on_extension.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateKey + +> PreviewDeployedDevicesFleetKey UpdateKey(ctx, FleetSid, Sid, optional) + + + +Update the given properties of a specific Key credential in the Fleet, giving it a friendly name or assigning to a Device. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FleetSid** | **string**| | +**Sid** | **string**| Provides a 34 character string that uniquely identifies the requested Key credential resource. | + **optional** | ***UpdateKeyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateKeyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DeviceSid** | **optional.String**| Provides the unique string identifier of an existing Device to become authenticated with this Key credential. | + **FriendlyName** | **optional.String**| Provides a human readable descriptive text for this Key credential, up to 256 characters long. | + +### Return type + +[**PreviewDeployedDevicesFleetKey**](preview.deployed_devices.fleet.key.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateModelBuild + +> PreviewUnderstandAssistantModelBuild UpdateModelBuild(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| | +**Sid** | **string**| | + **optional** | ***UpdateModelBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateModelBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 | + +### Return type + +[**PreviewUnderstandAssistantModelBuild**](preview.understand.assistant.model_build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateQuery + +> PreviewUnderstandAssistantQuery UpdateQuery(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateQueryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateQueryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **SampleSid** | **optional.String**| An optional reference to the Sample created from this query. | + **Status** | **optional.String**| A string that described the query status. The values can be: pending_review, reviewed, discarded | + +### Return type + +[**PreviewUnderstandAssistantQuery**](preview.understand.assistant.query.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRatePlan + +> PreviewWirelessRatePlan UpdateRatePlan(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| | + **UniqueName** | **optional.String**| | + +### Return type + +[**PreviewWirelessRatePlan**](preview.wireless.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSample + +> PreviewUnderstandAssistantTaskSample UpdateSample(ctx, AssistantSid, TaskSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**TaskSid** | **string**| The unique ID of the Task associated with this Sample. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateSampleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSampleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Language** | **optional.String**| An ISO language-country string of the sample. | + **SourceChannel** | **optional.String**| The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null | + **TaggedText** | **optional.String**| The text example of how end-users may express this task. The sample may contain Field tag blocks. | + +### Return type + +[**PreviewUnderstandAssistantTaskSample**](preview.understand.assistant.task.sample.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> PreviewSyncService UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AclEnabled** | **optional.Bool**| | + **FriendlyName** | **optional.String**| | + **ReachabilityWebhooksEnabled** | **optional.Bool**| | + **WebhookUrl** | **optional.String**| | + +### Return type + +[**PreviewSyncService**](preview.sync.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSim + +> PreviewWirelessSim UpdateSim(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| | + **optional** | ***UpdateSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallbackMethod** | **optional.String**| | + **CallbackUrl** | **optional.String**| | + **CommandsCallbackMethod** | **optional.String**| | + **CommandsCallbackUrl** | **optional.String**| | + **FriendlyName** | **optional.String**| | + **RatePlan** | **optional.String**| | + **SmsFallbackMethod** | **optional.String**| | + **SmsFallbackUrl** | **optional.String**| | + **SmsMethod** | **optional.String**| | + **SmsUrl** | **optional.String**| | + **Status** | **optional.String**| | + **UniqueName** | **optional.String**| | + **VoiceFallbackMethod** | **optional.String**| | + **VoiceFallbackUrl** | **optional.String**| | + **VoiceMethod** | **optional.String**| | + **VoiceUrl** | **optional.String**| | + +### Return type + +[**PreviewWirelessSim**](preview.wireless.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateStyleSheet + +> PreviewUnderstandAssistantStyleSheet UpdateStyleSheet(ctx, AssistantSid, optional) + + + +Updates the style sheet for an assistant identified by {AssistantSid} or {AssistantUniqueName}. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant | + **optional** | ***UpdateStyleSheetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateStyleSheetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **StyleSheet** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON Style sheet string | + +### Return type + +[**PreviewUnderstandAssistantStyleSheet**](preview.understand.assistant.style_sheet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncListItem + +> PreviewSyncServiceSyncListSyncListItem UpdateSyncListItem(ctx, ServiceSid, ListSid, Index, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**ListSid** | **string**| | +**Index** | **int32**| | + **optional** | ***UpdateSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewSyncServiceSyncListSyncListItem**](preview.sync.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncListPermission + +> PreviewSyncServiceSyncListSyncListPermission UpdateSyncListPermission(ctx, ServiceSid, ListSid, Identity, optional) + + + +Update an identity's access to a specific Sync List. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Sync Service Instance. | +**ListSid** | **string**| Identifier of the Sync List. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. | + **optional** | ***UpdateSyncListPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncListPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Boolean flag specifying whether the identity can delete the Sync List. | + **Read** | **optional.Bool**| Boolean flag specifying whether the identity can read the Sync List. | + **Write** | **optional.Bool**| Boolean flag specifying whether the identity can create, update and delete Items of the Sync List. | + +### Return type + +[**PreviewSyncServiceSyncListSyncListPermission**](preview.sync.service.sync_list.sync_list_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncMapItem + +> PreviewSyncServiceSyncMapSyncMapItem UpdateSyncMapItem(ctx, ServiceSid, MapSid, Key, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| | +**MapSid** | **string**| | +**Key** | **string**| | + **optional** | ***UpdateSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| | + +### Return type + +[**PreviewSyncServiceSyncMapSyncMapItem**](preview.sync.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncMapPermission + +> PreviewSyncServiceSyncMapSyncMapPermission UpdateSyncMapPermission(ctx, ServiceSid, MapSid, Identity, optional) + + + +Update an identity's access to a specific Sync Map. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Sync Service Instance. | +**MapSid** | **string**| Identifier of the Sync Map. Either a SID or a unique name. | +**Identity** | **string**| Arbitrary string identifier representing a human user associated with an FPA token, assigned by the developer. | + **optional** | ***UpdateSyncMapPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncMapPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Boolean flag specifying whether the identity can delete the Sync Map. | + **Read** | **optional.Bool**| Boolean flag specifying whether the identity can read the Sync Map. | + **Write** | **optional.Bool**| Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map. | + +### Return type + +[**PreviewSyncServiceSyncMapSyncMapPermission**](preview.sync.service.sync_map.sync_map_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTask + +> PreviewUnderstandAssistantTask UpdateTask(ctx, AssistantSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the Assistant. | +**Sid** | **string**| A 34 character string that uniquely identifies this resource. | + **optional** | ***UpdateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. | + **ActionsUrl** | **optional.String**| User-provided HTTP endpoint where from the assistant fetches actions | + **FriendlyName** | **optional.String**| A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | + **UniqueName** | **optional.String**| A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | + +### Return type + +[**PreviewUnderstandAssistantTask**](preview.understand.assistant.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTaskActions + +> PreviewUnderstandAssistantTaskTaskActions UpdateTaskActions(ctx, AssistantSid, TaskSid, optional) + + + +Updates the actions of an Task identified by {TaskSid} or {TaskUniqueName}. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AssistantSid** | **string**| The unique ID of the parent Assistant. | +**TaskSid** | **string**| The unique ID of the Task. | + **optional** | ***UpdateTaskActionsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskActionsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Actions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The JSON actions that instruct the Assistant how to perform this task. | + +### Return type + +[**PreviewUnderstandAssistantTaskTaskActions**](preview.understand.assistant.task.task_actions.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/preview/docs/ListAssistantResponse.md b/rest/preview/docs/ListAssistantResponse.md new file mode 100644 index 000000000..db79d2936 --- /dev/null +++ b/rest/preview/docs/ListAssistantResponse.md @@ -0,0 +1,12 @@ +# ListAssistantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assistants** | [**[]PreviewUnderstandAssistant**](preview.understand.assistant.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListAuthorizationDocumentResponse.md b/rest/preview/docs/ListAuthorizationDocumentResponse.md new file mode 100644 index 000000000..5fa512135 --- /dev/null +++ b/rest/preview/docs/ListAuthorizationDocumentResponse.md @@ -0,0 +1,12 @@ +# ListAuthorizationDocumentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]PreviewHostedNumbersAuthorizationDocument**](preview.hosted_numbers.authorization_document.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListAvailableAddOnExtensionResponse.md b/rest/preview/docs/ListAvailableAddOnExtensionResponse.md new file mode 100644 index 000000000..630bb20a3 --- /dev/null +++ b/rest/preview/docs/ListAvailableAddOnExtensionResponse.md @@ -0,0 +1,12 @@ +# ListAvailableAddOnExtensionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Extensions** | [**[]PreviewMarketplaceAvailableAddOnAvailableAddOnExtension**](preview.marketplace.available_add_on.available_add_on_extension.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListAvailableAddOnResponse.md b/rest/preview/docs/ListAvailableAddOnResponse.md new file mode 100644 index 000000000..c4afd9359 --- /dev/null +++ b/rest/preview/docs/ListAvailableAddOnResponse.md @@ -0,0 +1,12 @@ +# ListAvailableAddOnResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailableAddOns** | [**[]PreviewMarketplaceAvailableAddOn**](preview.marketplace.available_add_on.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListCertificateResponse.md b/rest/preview/docs/ListCertificateResponse.md new file mode 100644 index 000000000..09b4c24d3 --- /dev/null +++ b/rest/preview/docs/ListCertificateResponse.md @@ -0,0 +1,12 @@ +# ListCertificateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificates** | [**[]PreviewDeployedDevicesFleetCertificate**](preview.deployed_devices.fleet.certificate.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListCommandResponse.md b/rest/preview/docs/ListCommandResponse.md new file mode 100644 index 000000000..90885e325 --- /dev/null +++ b/rest/preview/docs/ListCommandResponse.md @@ -0,0 +1,12 @@ +# ListCommandResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]PreviewWirelessCommand**](preview.wireless.command.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDayResponse.md b/rest/preview/docs/ListDayResponse.md new file mode 100644 index 000000000..83986ef44 --- /dev/null +++ b/rest/preview/docs/ListDayResponse.md @@ -0,0 +1,12 @@ +# ListDayResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Days** | [**[]PreviewBulkExportsExportDay**](preview.bulk_exports.export.day.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDayResponseMeta.md b/rest/preview/docs/ListDayResponseMeta.md new file mode 100644 index 000000000..a08156e33 --- /dev/null +++ b/rest/preview/docs/ListDayResponseMeta.md @@ -0,0 +1,17 @@ +# ListDayResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDependentHostedNumberOrderResponse.md b/rest/preview/docs/ListDependentHostedNumberOrderResponse.md new file mode 100644 index 000000000..fceabd070 --- /dev/null +++ b/rest/preview/docs/ListDependentHostedNumberOrderResponse.md @@ -0,0 +1,12 @@ +# ListDependentHostedNumberOrderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder**](preview.hosted_numbers.authorization_document.dependent_hosted_number_order.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDeploymentResponse.md b/rest/preview/docs/ListDeploymentResponse.md new file mode 100644 index 000000000..41a071449 --- /dev/null +++ b/rest/preview/docs/ListDeploymentResponse.md @@ -0,0 +1,12 @@ +# ListDeploymentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployments** | [**[]PreviewDeployedDevicesFleetDeployment**](preview.deployed_devices.fleet.deployment.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDeviceResponse.md b/rest/preview/docs/ListDeviceResponse.md new file mode 100644 index 000000000..db93ec28c --- /dev/null +++ b/rest/preview/docs/ListDeviceResponse.md @@ -0,0 +1,12 @@ +# ListDeviceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Devices** | [**[]PreviewDeployedDevicesFleetDevice**](preview.deployed_devices.fleet.device.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDocumentPermissionResponse.md b/rest/preview/docs/ListDocumentPermissionResponse.md new file mode 100644 index 000000000..4540188c2 --- /dev/null +++ b/rest/preview/docs/ListDocumentPermissionResponse.md @@ -0,0 +1,12 @@ +# ListDocumentPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Permissions** | [**[]PreviewSyncServiceDocumentDocumentPermission**](preview.sync.service.document.document_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListDocumentResponse.md b/rest/preview/docs/ListDocumentResponse.md new file mode 100644 index 000000000..b06a62ce5 --- /dev/null +++ b/rest/preview/docs/ListDocumentResponse.md @@ -0,0 +1,12 @@ +# ListDocumentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Documents** | [**[]PreviewSyncServiceDocument**](preview.sync.service.document.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListExportCustomJobResponse.md b/rest/preview/docs/ListExportCustomJobResponse.md new file mode 100644 index 000000000..db09ad8b2 --- /dev/null +++ b/rest/preview/docs/ListExportCustomJobResponse.md @@ -0,0 +1,12 @@ +# ListExportCustomJobResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Jobs** | [**[]PreviewBulkExportsExportExportCustomJob**](preview.bulk_exports.export.export_custom_job.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListFieldResponse.md b/rest/preview/docs/ListFieldResponse.md new file mode 100644 index 000000000..2640fa028 --- /dev/null +++ b/rest/preview/docs/ListFieldResponse.md @@ -0,0 +1,12 @@ +# ListFieldResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | [**[]PreviewUnderstandAssistantTaskField**](preview.understand.assistant.task.field.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListFieldTypeResponse.md b/rest/preview/docs/ListFieldTypeResponse.md new file mode 100644 index 000000000..3f18eaba7 --- /dev/null +++ b/rest/preview/docs/ListFieldTypeResponse.md @@ -0,0 +1,12 @@ +# ListFieldTypeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldTypes** | [**[]PreviewUnderstandAssistantFieldType**](preview.understand.assistant.field_type.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListFieldValueResponse.md b/rest/preview/docs/ListFieldValueResponse.md new file mode 100644 index 000000000..a58d5fe79 --- /dev/null +++ b/rest/preview/docs/ListFieldValueResponse.md @@ -0,0 +1,12 @@ +# ListFieldValueResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldValues** | [**[]PreviewUnderstandAssistantFieldTypeFieldValue**](preview.understand.assistant.field_type.field_value.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListFleetResponse.md b/rest/preview/docs/ListFleetResponse.md new file mode 100644 index 000000000..35273b5c9 --- /dev/null +++ b/rest/preview/docs/ListFleetResponse.md @@ -0,0 +1,12 @@ +# ListFleetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fleets** | [**[]PreviewDeployedDevicesFleet**](preview.deployed_devices.fleet.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListHostedNumberOrderResponse.md b/rest/preview/docs/ListHostedNumberOrderResponse.md new file mode 100644 index 000000000..f135a7e4c --- /dev/null +++ b/rest/preview/docs/ListHostedNumberOrderResponse.md @@ -0,0 +1,12 @@ +# ListHostedNumberOrderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]PreviewHostedNumbersHostedNumberOrder**](preview.hosted_numbers.hosted_number_order.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListInstalledAddOnExtensionResponse.md b/rest/preview/docs/ListInstalledAddOnExtensionResponse.md new file mode 100644 index 000000000..4b127811e --- /dev/null +++ b/rest/preview/docs/ListInstalledAddOnExtensionResponse.md @@ -0,0 +1,12 @@ +# ListInstalledAddOnExtensionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Extensions** | [**[]PreviewMarketplaceInstalledAddOnInstalledAddOnExtension**](preview.marketplace.installed_add_on.installed_add_on_extension.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListInstalledAddOnResponse.md b/rest/preview/docs/ListInstalledAddOnResponse.md new file mode 100644 index 000000000..21ae690b9 --- /dev/null +++ b/rest/preview/docs/ListInstalledAddOnResponse.md @@ -0,0 +1,12 @@ +# ListInstalledAddOnResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InstalledAddOns** | [**[]PreviewMarketplaceInstalledAddOn**](preview.marketplace.installed_add_on.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListKeyResponse.md b/rest/preview/docs/ListKeyResponse.md new file mode 100644 index 000000000..68fda17d9 --- /dev/null +++ b/rest/preview/docs/ListKeyResponse.md @@ -0,0 +1,12 @@ +# ListKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keys** | [**[]PreviewDeployedDevicesFleetKey**](preview.deployed_devices.fleet.key.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListModelBuildResponse.md b/rest/preview/docs/ListModelBuildResponse.md new file mode 100644 index 000000000..6ae6cae02 --- /dev/null +++ b/rest/preview/docs/ListModelBuildResponse.md @@ -0,0 +1,12 @@ +# ListModelBuildResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**ModelBuilds** | [**[]PreviewUnderstandAssistantModelBuild**](preview.understand.assistant.model_build.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListQueryResponse.md b/rest/preview/docs/ListQueryResponse.md new file mode 100644 index 000000000..1afb44f27 --- /dev/null +++ b/rest/preview/docs/ListQueryResponse.md @@ -0,0 +1,12 @@ +# ListQueryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Queries** | [**[]PreviewUnderstandAssistantQuery**](preview.understand.assistant.query.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListRatePlanResponse.md b/rest/preview/docs/ListRatePlanResponse.md new file mode 100644 index 000000000..9cece3ed2 --- /dev/null +++ b/rest/preview/docs/ListRatePlanResponse.md @@ -0,0 +1,12 @@ +# ListRatePlanResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**RatePlans** | [**[]PreviewWirelessRatePlan**](preview.wireless.rate_plan.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSampleResponse.md b/rest/preview/docs/ListSampleResponse.md new file mode 100644 index 000000000..dacc723e3 --- /dev/null +++ b/rest/preview/docs/ListSampleResponse.md @@ -0,0 +1,12 @@ +# ListSampleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Samples** | [**[]PreviewUnderstandAssistantTaskSample**](preview.understand.assistant.task.sample.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListServiceResponse.md b/rest/preview/docs/ListServiceResponse.md new file mode 100644 index 000000000..a13726075 --- /dev/null +++ b/rest/preview/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Services** | [**[]PreviewSyncService**](preview.sync.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSimResponse.md b/rest/preview/docs/ListSimResponse.md new file mode 100644 index 000000000..b544601b2 --- /dev/null +++ b/rest/preview/docs/ListSimResponse.md @@ -0,0 +1,12 @@ +# ListSimResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Sims** | [**[]PreviewWirelessSim**](preview.wireless.sim.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncListItemResponse.md b/rest/preview/docs/ListSyncListItemResponse.md new file mode 100644 index 000000000..9dd7d9e37 --- /dev/null +++ b/rest/preview/docs/ListSyncListItemResponse.md @@ -0,0 +1,12 @@ +# ListSyncListItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]PreviewSyncServiceSyncListSyncListItem**](preview.sync.service.sync_list.sync_list_item.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncListPermissionResponse.md b/rest/preview/docs/ListSyncListPermissionResponse.md new file mode 100644 index 000000000..32d905fd9 --- /dev/null +++ b/rest/preview/docs/ListSyncListPermissionResponse.md @@ -0,0 +1,12 @@ +# ListSyncListPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Permissions** | [**[]PreviewSyncServiceSyncListSyncListPermission**](preview.sync.service.sync_list.sync_list_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncListResponse.md b/rest/preview/docs/ListSyncListResponse.md new file mode 100644 index 000000000..67f5c2818 --- /dev/null +++ b/rest/preview/docs/ListSyncListResponse.md @@ -0,0 +1,12 @@ +# ListSyncListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]PreviewSyncServiceSyncList**](preview.sync.service.sync_list.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncMapItemResponse.md b/rest/preview/docs/ListSyncMapItemResponse.md new file mode 100644 index 000000000..6bee3a0c8 --- /dev/null +++ b/rest/preview/docs/ListSyncMapItemResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]PreviewSyncServiceSyncMapSyncMapItem**](preview.sync.service.sync_map.sync_map_item.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncMapPermissionResponse.md b/rest/preview/docs/ListSyncMapPermissionResponse.md new file mode 100644 index 000000000..d308e623b --- /dev/null +++ b/rest/preview/docs/ListSyncMapPermissionResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Permissions** | [**[]PreviewSyncServiceSyncMapSyncMapPermission**](preview.sync.service.sync_map.sync_map_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListSyncMapResponse.md b/rest/preview/docs/ListSyncMapResponse.md new file mode 100644 index 000000000..a928d3bfd --- /dev/null +++ b/rest/preview/docs/ListSyncMapResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Maps** | [**[]PreviewSyncServiceSyncMap**](preview.sync.service.sync_map.md) | | [optional] +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/ListTaskResponse.md b/rest/preview/docs/ListTaskResponse.md new file mode 100644 index 000000000..0da86a0de --- /dev/null +++ b/rest/preview/docs/ListTaskResponse.md @@ -0,0 +1,12 @@ +# ListTaskResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListDayResponseMeta**](ListDayResponse_meta.md) | | [optional] +**Tasks** | [**[]PreviewUnderstandAssistantTask**](preview.understand.assistant.task.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExport.md b/rest/preview/docs/PreviewBulkExportsExport.md new file mode 100644 index 000000000..2c187e910 --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExport.md @@ -0,0 +1,13 @@ +# PreviewBulkExportsExport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ResourceType** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExportConfiguration.md b/rest/preview/docs/PreviewBulkExportsExportConfiguration.md new file mode 100644 index 000000000..146b0326b --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExportConfiguration.md @@ -0,0 +1,15 @@ +# PreviewBulkExportsExportConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | [optional] +**ResourceType** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExportDay.md b/rest/preview/docs/PreviewBulkExportsExportDay.md new file mode 100644 index 000000000..4dffebd05 --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExportDay.md @@ -0,0 +1,15 @@ +# PreviewBulkExportsExportDay + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateDate** | **string** | | [optional] +**Day** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**Size** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExportDayInstance.md b/rest/preview/docs/PreviewBulkExportsExportDayInstance.md new file mode 100644 index 000000000..ebe1cad67 --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExportDayInstance.md @@ -0,0 +1,11 @@ +# PreviewBulkExportsExportDayInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectTo** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExportExportCustomJob.md b/rest/preview/docs/PreviewBulkExportsExportExportCustomJob.md new file mode 100644 index 000000000..73bd1cc14 --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExportExportCustomJob.md @@ -0,0 +1,19 @@ +# PreviewBulkExportsExportExportCustomJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | [**map[string]interface{}**](.md) | | [optional] +**Email** | **string** | | [optional] +**EndDay** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**JobSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**StartDay** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewBulkExportsExportJob.md b/rest/preview/docs/PreviewBulkExportsExportJob.md new file mode 100644 index 000000000..baa5d0640 --- /dev/null +++ b/rest/preview/docs/PreviewBulkExportsExportJob.md @@ -0,0 +1,20 @@ +# PreviewBulkExportsExportJob + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | [**map[string]interface{}**](.md) | | [optional] +**Email** | **string** | | [optional] +**EndDay** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**JobSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**StartDay** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookMethod** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewDeployedDevicesFleet.md b/rest/preview/docs/PreviewDeployedDevicesFleet.md new file mode 100644 index 000000000..5dc5db35d --- /dev/null +++ b/rest/preview/docs/PreviewDeployedDevicesFleet.md @@ -0,0 +1,19 @@ +# PreviewDeployedDevicesFleet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultDeploymentSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewDeployedDevicesFleetCertificate.md b/rest/preview/docs/PreviewDeployedDevicesFleetCertificate.md new file mode 100644 index 000000000..1b653ce49 --- /dev/null +++ b/rest/preview/docs/PreviewDeployedDevicesFleetCertificate.md @@ -0,0 +1,19 @@ +# PreviewDeployedDevicesFleetCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DeviceSid** | **string** | | [optional] +**FleetSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Thumbprint** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewDeployedDevicesFleetDeployment.md b/rest/preview/docs/PreviewDeployedDevicesFleetDeployment.md new file mode 100644 index 000000000..bb870a418 --- /dev/null +++ b/rest/preview/docs/PreviewDeployedDevicesFleetDeployment.md @@ -0,0 +1,18 @@ +# PreviewDeployedDevicesFleetDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FleetSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SyncServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewDeployedDevicesFleetDevice.md b/rest/preview/docs/PreviewDeployedDevicesFleetDevice.md new file mode 100644 index 000000000..8a219b90c --- /dev/null +++ b/rest/preview/docs/PreviewDeployedDevicesFleetDevice.md @@ -0,0 +1,22 @@ +# PreviewDeployedDevicesFleetDevice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateAuthenticated** | [**time.Time**](time.Time.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DeploymentSid** | **string** | | [optional] +**Enabled** | **bool** | | [optional] +**FleetSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewDeployedDevicesFleetKey.md b/rest/preview/docs/PreviewDeployedDevicesFleetKey.md new file mode 100644 index 000000000..0e1d26966 --- /dev/null +++ b/rest/preview/docs/PreviewDeployedDevicesFleetKey.md @@ -0,0 +1,19 @@ +# PreviewDeployedDevicesFleetKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DeviceSid** | **string** | | [optional] +**FleetSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Secret** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewHostedNumbersAuthorizationDocument.md b/rest/preview/docs/PreviewHostedNumbersAuthorizationDocument.md new file mode 100644 index 000000000..46cc4b64d --- /dev/null +++ b/rest/preview/docs/PreviewHostedNumbersAuthorizationDocument.md @@ -0,0 +1,19 @@ +# PreviewHostedNumbersAuthorizationDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | | [optional] +**CcEmails** | **[]string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Email** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder.md b/rest/preview/docs/PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder.md new file mode 100644 index 000000000..ebc29006c --- /dev/null +++ b/rest/preview/docs/PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder.md @@ -0,0 +1,32 @@ +# PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**CallDelay** | **int32** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**CcEmails** | **[]string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Email** | **string** | | [optional] +**Extension** | **string** | | [optional] +**FailureReason** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IncomingPhoneNumberSid** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SigningDocumentSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**VerificationAttempts** | **int32** | | [optional] +**VerificationCallSids** | **[]string** | | [optional] +**VerificationCode** | **string** | | [optional] +**VerificationDocumentSid** | **string** | | [optional] +**VerificationType** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewHostedNumbersHostedNumberOrder.md b/rest/preview/docs/PreviewHostedNumbersHostedNumberOrder.md new file mode 100644 index 000000000..c0501959c --- /dev/null +++ b/rest/preview/docs/PreviewHostedNumbersHostedNumberOrder.md @@ -0,0 +1,33 @@ +# PreviewHostedNumbersHostedNumberOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressSid** | **string** | | [optional] +**CallDelay** | **int32** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**CcEmails** | **[]string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Email** | **string** | | [optional] +**Extension** | **string** | | [optional] +**FailureReason** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**IncomingPhoneNumberSid** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SigningDocumentSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VerificationAttempts** | **int32** | | [optional] +**VerificationCallSids** | **[]string** | | [optional] +**VerificationCode** | **string** | | [optional] +**VerificationDocumentSid** | **string** | | [optional] +**VerificationType** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewMarketplaceAvailableAddOn.md b/rest/preview/docs/PreviewMarketplaceAvailableAddOn.md new file mode 100644 index 000000000..ec2c3d423 --- /dev/null +++ b/rest/preview/docs/PreviewMarketplaceAvailableAddOn.md @@ -0,0 +1,17 @@ +# PreviewMarketplaceAvailableAddOn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConfigurationSchema** | [**map[string]interface{}**](.md) | | [optional] +**Description** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**PricingType** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewMarketplaceAvailableAddOnAvailableAddOnExtension.md b/rest/preview/docs/PreviewMarketplaceAvailableAddOnAvailableAddOnExtension.md new file mode 100644 index 000000000..9ad541849 --- /dev/null +++ b/rest/preview/docs/PreviewMarketplaceAvailableAddOnAvailableAddOnExtension.md @@ -0,0 +1,16 @@ +# PreviewMarketplaceAvailableAddOnAvailableAddOnExtension + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AvailableAddOnSid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**ProductName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewMarketplaceInstalledAddOn.md b/rest/preview/docs/PreviewMarketplaceInstalledAddOn.md new file mode 100644 index 000000000..558d8a55d --- /dev/null +++ b/rest/preview/docs/PreviewMarketplaceInstalledAddOn.md @@ -0,0 +1,20 @@ +# PreviewMarketplaceInstalledAddOn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Configuration** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Description** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewMarketplaceInstalledAddOnInstalledAddOnExtension.md b/rest/preview/docs/PreviewMarketplaceInstalledAddOnInstalledAddOnExtension.md new file mode 100644 index 000000000..0079306b7 --- /dev/null +++ b/rest/preview/docs/PreviewMarketplaceInstalledAddOnInstalledAddOnExtension.md @@ -0,0 +1,17 @@ +# PreviewMarketplaceInstalledAddOnInstalledAddOnExtension + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**InstalledAddOnSid** | **string** | | [optional] +**ProductName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncService.md b/rest/preview/docs/PreviewSyncService.md new file mode 100644 index 000000000..dc013c858 --- /dev/null +++ b/rest/preview/docs/PreviewSyncService.md @@ -0,0 +1,20 @@ +# PreviewSyncService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AclEnabled** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ReachabilityWebhooksEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceDocument.md b/rest/preview/docs/PreviewSyncServiceDocument.md new file mode 100644 index 000000000..ed5ff2ee4 --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceDocument.md @@ -0,0 +1,21 @@ +# PreviewSyncServiceDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceDocumentDocumentPermission.md b/rest/preview/docs/PreviewSyncServiceDocumentDocumentPermission.md new file mode 100644 index 000000000..64e4799c0 --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceDocumentDocumentPermission.md @@ -0,0 +1,18 @@ +# PreviewSyncServiceDocumentDocumentPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DocumentSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncList.md b/rest/preview/docs/PreviewSyncServiceSyncList.md new file mode 100644 index 000000000..ac3f6a9dc --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncList.md @@ -0,0 +1,20 @@ +# PreviewSyncServiceSyncList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncListSyncListItem.md b/rest/preview/docs/PreviewSyncServiceSyncListSyncListItem.md new file mode 100644 index 000000000..645db5fca --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncListSyncListItem.md @@ -0,0 +1,20 @@ +# PreviewSyncServiceSyncListSyncListItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Index** | **int32** | | [optional] +**ListSid** | **string** | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncListSyncListPermission.md b/rest/preview/docs/PreviewSyncServiceSyncListSyncListPermission.md new file mode 100644 index 000000000..8b110d688 --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncListSyncListPermission.md @@ -0,0 +1,18 @@ +# PreviewSyncServiceSyncListSyncListPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**ListSid** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncMap.md b/rest/preview/docs/PreviewSyncServiceSyncMap.md new file mode 100644 index 000000000..fff9f1352 --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncMap.md @@ -0,0 +1,20 @@ +# PreviewSyncServiceSyncMap + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapItem.md b/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapItem.md new file mode 100644 index 000000000..0eb11d71f --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapItem.md @@ -0,0 +1,20 @@ +# PreviewSyncServiceSyncMapSyncMapItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Key** | **string** | | [optional] +**MapSid** | **string** | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapPermission.md b/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapPermission.md new file mode 100644 index 000000000..d7957b512 --- /dev/null +++ b/rest/preview/docs/PreviewSyncServiceSyncMapSyncMapPermission.md @@ -0,0 +1,18 @@ +# PreviewSyncServiceSyncMapSyncMapPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**MapSid** | **string** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewTrustedCommsBrandedChannel.md b/rest/preview/docs/PreviewTrustedCommsBrandedChannel.md new file mode 100644 index 000000000..20c70295f --- /dev/null +++ b/rest/preview/docs/PreviewTrustedCommsBrandedChannel.md @@ -0,0 +1,16 @@ +# PreviewTrustedCommsBrandedChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BrandSid** | **string** | | [optional] +**BusinessSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewTrustedCommsBrandedChannelChannel.md b/rest/preview/docs/PreviewTrustedCommsBrandedChannelChannel.md new file mode 100644 index 000000000..f71a2d52b --- /dev/null +++ b/rest/preview/docs/PreviewTrustedCommsBrandedChannelChannel.md @@ -0,0 +1,17 @@ +# PreviewTrustedCommsBrandedChannelChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BrandSid** | **string** | | [optional] +**BrandedChannelSid** | **string** | | [optional] +**BusinessSid** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**PhoneNumberSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewTrustedCommsBrandsInformation.md b/rest/preview/docs/PreviewTrustedCommsBrandsInformation.md new file mode 100644 index 000000000..6a5a28f4d --- /dev/null +++ b/rest/preview/docs/PreviewTrustedCommsBrandsInformation.md @@ -0,0 +1,14 @@ +# PreviewTrustedCommsBrandsInformation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileLink** | **string** | | [optional] +**FileLinkTtlInSeconds** | **string** | | [optional] +**UpdateTime** | [**time.Time**](time.Time.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewTrustedCommsCps.md b/rest/preview/docs/PreviewTrustedCommsCps.md new file mode 100644 index 000000000..bdac35208 --- /dev/null +++ b/rest/preview/docs/PreviewTrustedCommsCps.md @@ -0,0 +1,13 @@ +# PreviewTrustedCommsCps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CpsUrl** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewTrustedCommsCurrentCall.md b/rest/preview/docs/PreviewTrustedCommsCurrentCall.md new file mode 100644 index 000000000..0d8ca7569 --- /dev/null +++ b/rest/preview/docs/PreviewTrustedCommsCurrentCall.md @@ -0,0 +1,24 @@ +# PreviewTrustedCommsCurrentCall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BgColor** | **string** | | [optional] +**Caller** | **string** | | [optional] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] +**FontColor** | **string** | | [optional] +**From** | **string** | | [optional] +**Logo** | **string** | | [optional] +**Manager** | **string** | | [optional] +**Reason** | **string** | | [optional] +**ShieldImg** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**To** | **string** | | [optional] +**Url** | **string** | | [optional] +**UseCase** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistant.md b/rest/preview/docs/PreviewUnderstandAssistant.md new file mode 100644 index 000000000..654d5c334 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistant.md @@ -0,0 +1,22 @@ +# PreviewUnderstandAssistant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallbackEvents** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**LatestModelBuildSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**LogQueries** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantAssistantFallbackActions.md b/rest/preview/docs/PreviewUnderstandAssistantAssistantFallbackActions.md new file mode 100644 index 000000000..3605102e8 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantAssistantFallbackActions.md @@ -0,0 +1,14 @@ +# PreviewUnderstandAssistantAssistantFallbackActions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantAssistantInitiationActions.md b/rest/preview/docs/PreviewUnderstandAssistantAssistantInitiationActions.md new file mode 100644 index 000000000..0c5923c06 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantAssistantInitiationActions.md @@ -0,0 +1,14 @@ +# PreviewUnderstandAssistantAssistantInitiationActions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantDialogue.md b/rest/preview/docs/PreviewUnderstandAssistantDialogue.md new file mode 100644 index 000000000..4a0bbef9d --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantDialogue.md @@ -0,0 +1,15 @@ +# PreviewUnderstandAssistantDialogue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantFieldType.md b/rest/preview/docs/PreviewUnderstandAssistantFieldType.md new file mode 100644 index 000000000..4db8a26ca --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantFieldType.md @@ -0,0 +1,19 @@ +# PreviewUnderstandAssistantFieldType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantFieldTypeFieldValue.md b/rest/preview/docs/PreviewUnderstandAssistantFieldTypeFieldValue.md new file mode 100644 index 000000000..d7c2b7d99 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantFieldTypeFieldValue.md @@ -0,0 +1,20 @@ +# PreviewUnderstandAssistantFieldTypeFieldValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FieldTypeSid** | **string** | | [optional] +**Language** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SynonymOf** | **string** | | [optional] +**Url** | **string** | | [optional] +**Value** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantModelBuild.md b/rest/preview/docs/PreviewUnderstandAssistantModelBuild.md new file mode 100644 index 000000000..830aa195d --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantModelBuild.md @@ -0,0 +1,20 @@ +# PreviewUnderstandAssistantModelBuild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**BuildDuration** | Pointer to **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ErrorCode** | Pointer to **int32** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantQuery.md b/rest/preview/docs/PreviewUnderstandAssistantQuery.md new file mode 100644 index 000000000..fcafa1d43 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantQuery.md @@ -0,0 +1,23 @@ +# PreviewUnderstandAssistantQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Language** | **string** | | [optional] +**ModelBuildSid** | **string** | | [optional] +**Query** | **string** | | [optional] +**Results** | [**map[string]interface{}**](.md) | | [optional] +**SampleSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SourceChannel** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantStyleSheet.md b/rest/preview/docs/PreviewUnderstandAssistantStyleSheet.md new file mode 100644 index 000000000..acce4b3fa --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantStyleSheet.md @@ -0,0 +1,14 @@ +# PreviewUnderstandAssistantStyleSheet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantTask.md b/rest/preview/docs/PreviewUnderstandAssistantTask.md new file mode 100644 index 000000000..c23c33a48 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantTask.md @@ -0,0 +1,20 @@ +# PreviewUnderstandAssistantTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActionsUrl** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantTaskField.md b/rest/preview/docs/PreviewUnderstandAssistantTaskField.md new file mode 100644 index 000000000..e4f2c7d50 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantTaskField.md @@ -0,0 +1,19 @@ +# PreviewUnderstandAssistantTaskField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FieldType** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantTaskSample.md b/rest/preview/docs/PreviewUnderstandAssistantTaskSample.md new file mode 100644 index 000000000..cc87360f9 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantTaskSample.md @@ -0,0 +1,20 @@ +# PreviewUnderstandAssistantTaskSample + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Language** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SourceChannel** | **string** | | [optional] +**TaggedText** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantTaskTaskActions.md b/rest/preview/docs/PreviewUnderstandAssistantTaskTaskActions.md new file mode 100644 index 000000000..6aec1f048 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantTaskTaskActions.md @@ -0,0 +1,15 @@ +# PreviewUnderstandAssistantTaskTaskActions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewUnderstandAssistantTaskTaskStatistics.md b/rest/preview/docs/PreviewUnderstandAssistantTaskTaskStatistics.md new file mode 100644 index 000000000..d07fb5f44 --- /dev/null +++ b/rest/preview/docs/PreviewUnderstandAssistantTaskTaskStatistics.md @@ -0,0 +1,16 @@ +# PreviewUnderstandAssistantTaskTaskStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssistantSid** | **string** | | [optional] +**FieldsCount** | **int32** | | [optional] +**SamplesCount** | **int32** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewWirelessCommand.md b/rest/preview/docs/PreviewWirelessCommand.md new file mode 100644 index 000000000..772105b4e --- /dev/null +++ b/rest/preview/docs/PreviewWirelessCommand.md @@ -0,0 +1,21 @@ +# PreviewWirelessCommand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Command** | **string** | | [optional] +**CommandMode** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DeviceSid** | **string** | | [optional] +**Direction** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SimSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewWirelessRatePlan.md b/rest/preview/docs/PreviewWirelessRatePlan.md new file mode 100644 index 000000000..f374349aa --- /dev/null +++ b/rest/preview/docs/PreviewWirelessRatePlan.md @@ -0,0 +1,24 @@ +# PreviewWirelessRatePlan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DataEnabled** | **bool** | | [optional] +**DataLimit** | **int32** | | [optional] +**DataMetering** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**InternationalRoaming** | **[]string** | | [optional] +**MessagingEnabled** | **bool** | | [optional] +**NationalRoamingEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceEnabled** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewWirelessSim.md b/rest/preview/docs/PreviewWirelessSim.md new file mode 100644 index 000000000..437273c67 --- /dev/null +++ b/rest/preview/docs/PreviewWirelessSim.md @@ -0,0 +1,32 @@ +# PreviewWirelessSim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CommandsCallbackMethod** | **string** | | [optional] +**CommandsCallbackUrl** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**EId** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Iccid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RatePlanSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/PreviewWirelessSimUsage.md b/rest/preview/docs/PreviewWirelessSimUsage.md new file mode 100644 index 000000000..ae2d12052 --- /dev/null +++ b/rest/preview/docs/PreviewWirelessSimUsage.md @@ -0,0 +1,19 @@ +# PreviewWirelessSimUsage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CommandsCosts** | [**map[string]interface{}**](.md) | | [optional] +**CommandsUsage** | [**map[string]interface{}**](.md) | | [optional] +**DataCosts** | [**map[string]interface{}**](.md) | | [optional] +**DataUsage** | [**map[string]interface{}**](.md) | | [optional] +**Period** | [**map[string]interface{}**](.md) | | [optional] +**SimSid** | **string** | | [optional] +**SimUniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateAssistantFallbackActionsRequest.md b/rest/preview/docs/UpdateAssistantFallbackActionsRequest.md new file mode 100644 index 000000000..f7dad27c8 --- /dev/null +++ b/rest/preview/docs/UpdateAssistantFallbackActionsRequest.md @@ -0,0 +1,11 @@ +# UpdateAssistantFallbackActionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FallbackActions** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateAssistantInitiationActionsRequest.md b/rest/preview/docs/UpdateAssistantInitiationActionsRequest.md new file mode 100644 index 000000000..bd6ad4f62 --- /dev/null +++ b/rest/preview/docs/UpdateAssistantInitiationActionsRequest.md @@ -0,0 +1,11 @@ +# UpdateAssistantInitiationActionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InitiationActions** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateAssistantRequest.md b/rest/preview/docs/UpdateAssistantRequest.md new file mode 100644 index 000000000..d254df5eb --- /dev/null +++ b/rest/preview/docs/UpdateAssistantRequest.md @@ -0,0 +1,18 @@ +# UpdateAssistantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackEvents** | **string** | Space-separated list of callback events that will trigger callbacks. | [optional] +**CallbackUrl** | **string** | A user-provided URL to send event callbacks to. | [optional] +**FallbackActions** | [**map[string]interface{}**](.md) | The JSON actions to be executed when the user's input is not recognized as matching any Task. | [optional] +**FriendlyName** | **string** | A text description for the Assistant. It is non-unique and can up to 255 characters long. | [optional] +**InitiationActions** | [**map[string]interface{}**](.md) | The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. | [optional] +**LogQueries** | **bool** | A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. | [optional] +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON object that holds the style sheet for the assistant | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateAuthorizationDocumentRequest.md b/rest/preview/docs/UpdateAuthorizationDocumentRequest.md new file mode 100644 index 000000000..e66c6c09b --- /dev/null +++ b/rest/preview/docs/UpdateAuthorizationDocumentRequest.md @@ -0,0 +1,17 @@ +# UpdateAuthorizationDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressSid** | **string** | A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. | [optional] +**CcEmails** | **[]string** | Email recipients who will be informed when an Authorization Document has been sent and signed | [optional] +**ContactPhoneNumber** | **string** | The contact phone number of the person authorized to sign the Authorization Document. | [optional] +**ContactTitle** | **string** | The title of the person authorized to sign the Authorization Document for this phone number. | [optional] +**Email** | **string** | Email that this AuthorizationDocument will be sent to for signing. | [optional] +**HostedNumberOrderSids** | **[]string** | A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. | [optional] +**Status** | **string** | Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateCertificateRequest.md b/rest/preview/docs/UpdateCertificateRequest.md new file mode 100644 index 000000000..b1f2b6fe5 --- /dev/null +++ b/rest/preview/docs/UpdateCertificateRequest.md @@ -0,0 +1,12 @@ +# UpdateCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceSid** | **string** | Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateDeploymentRequest.md b/rest/preview/docs/UpdateDeploymentRequest.md new file mode 100644 index 000000000..593f82a0a --- /dev/null +++ b/rest/preview/docs/UpdateDeploymentRequest.md @@ -0,0 +1,12 @@ +# UpdateDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | Provides a human readable descriptive text for this Deployment, up to 64 characters long | [optional] +**SyncServiceSid** | **string** | Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateDeviceRequest.md b/rest/preview/docs/UpdateDeviceRequest.md new file mode 100644 index 000000000..c41cf6b12 --- /dev/null +++ b/rest/preview/docs/UpdateDeviceRequest.md @@ -0,0 +1,14 @@ +# UpdateDeviceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeploymentSid** | **string** | Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. | [optional] +**Identity** | **string** | Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateDocumentPermissionRequest.md b/rest/preview/docs/UpdateDocumentPermissionRequest.md new file mode 100644 index 000000000..079d5b8db --- /dev/null +++ b/rest/preview/docs/UpdateDocumentPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateDocumentPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Boolean flag specifying whether the identity can delete the Sync Document. | +**Read** | **bool** | Boolean flag specifying whether the identity can read the Sync Document. | +**Write** | **bool** | Boolean flag specifying whether the identity can update the Sync Document. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateDocumentRequest.md b/rest/preview/docs/UpdateDocumentRequest.md new file mode 100644 index 000000000..c2a170ae5 --- /dev/null +++ b/rest/preview/docs/UpdateDocumentRequest.md @@ -0,0 +1,11 @@ +# UpdateDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateExportConfigurationRequest.md b/rest/preview/docs/UpdateExportConfigurationRequest.md new file mode 100644 index 000000000..78f48b5f5 --- /dev/null +++ b/rest/preview/docs/UpdateExportConfigurationRequest.md @@ -0,0 +1,13 @@ +# UpdateExportConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | If true, Twilio will automatically generate every day's file when the day is over. | [optional] +**WebhookMethod** | **string** | Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url | [optional] +**WebhookUrl** | **string** | Stores the URL destination for the method specified in webhook_method. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateFieldTypeRequest.md b/rest/preview/docs/UpdateFieldTypeRequest.md new file mode 100644 index 000000000..0b71ecd4d --- /dev/null +++ b/rest/preview/docs/UpdateFieldTypeRequest.md @@ -0,0 +1,12 @@ +# UpdateFieldTypeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateFleetRequest.md b/rest/preview/docs/UpdateFleetRequest.md new file mode 100644 index 000000000..9db857b67 --- /dev/null +++ b/rest/preview/docs/UpdateFleetRequest.md @@ -0,0 +1,12 @@ +# UpdateFleetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultDeploymentSid** | **string** | Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet. | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text for this Fleet, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateHostedNumberOrderRequest.md b/rest/preview/docs/UpdateHostedNumberOrderRequest.md new file mode 100644 index 000000000..9fed16d96 --- /dev/null +++ b/rest/preview/docs/UpdateHostedNumberOrderRequest.md @@ -0,0 +1,20 @@ +# UpdateHostedNumberOrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallDelay** | **int32** | The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. | [optional] +**CcEmails** | **[]string** | Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. | [optional] +**Email** | **string** | Email of the owner of this phone number that is being hosted. | [optional] +**Extension** | **string** | Digits to dial after connecting the verification call. | [optional] +**FriendlyName** | **string** | A 64 character string that is a human readable text that describes this resource. | [optional] +**Status** | **string** | User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. | [optional] +**UniqueName** | **string** | Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. | [optional] +**VerificationCode** | **string** | A verification code that is given to the user via a phone call to the phone number that is being hosted. | [optional] +**VerificationDocumentSid** | **string** | Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. | [optional] +**VerificationType** | **string** | Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateInstalledAddOnExtensionRequest.md b/rest/preview/docs/UpdateInstalledAddOnExtensionRequest.md new file mode 100644 index 000000000..a20f67661 --- /dev/null +++ b/rest/preview/docs/UpdateInstalledAddOnExtensionRequest.md @@ -0,0 +1,11 @@ +# UpdateInstalledAddOnExtensionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the Extension should be invoked. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateInstalledAddOnRequest.md b/rest/preview/docs/UpdateInstalledAddOnRequest.md new file mode 100644 index 000000000..51f647a0f --- /dev/null +++ b/rest/preview/docs/UpdateInstalledAddOnRequest.md @@ -0,0 +1,12 @@ +# UpdateInstalledAddOnRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Configuration** | [**map[string]interface{}**](.md) | Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be unique within the Account. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateKeyRequest.md b/rest/preview/docs/UpdateKeyRequest.md new file mode 100644 index 000000000..863d52513 --- /dev/null +++ b/rest/preview/docs/UpdateKeyRequest.md @@ -0,0 +1,12 @@ +# UpdateKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceSid** | **string** | Provides the unique string identifier of an existing Device to become authenticated with this Key credential. | [optional] +**FriendlyName** | **string** | Provides a human readable descriptive text for this Key credential, up to 256 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateModelBuildRequest.md b/rest/preview/docs/UpdateModelBuildRequest.md new file mode 100644 index 000000000..cd3fa26c4 --- /dev/null +++ b/rest/preview/docs/UpdateModelBuildRequest.md @@ -0,0 +1,11 @@ +# UpdateModelBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateQueryRequest.md b/rest/preview/docs/UpdateQueryRequest.md new file mode 100644 index 000000000..daf053567 --- /dev/null +++ b/rest/preview/docs/UpdateQueryRequest.md @@ -0,0 +1,12 @@ +# UpdateQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SampleSid** | **string** | An optional reference to the Sample created from this query. | [optional] +**Status** | **string** | A string that described the query status. The values can be: pending_review, reviewed, discarded | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateRatePlanRequest.md b/rest/preview/docs/UpdateRatePlanRequest.md new file mode 100644 index 000000000..a64a3bf13 --- /dev/null +++ b/rest/preview/docs/UpdateRatePlanRequest.md @@ -0,0 +1,12 @@ +# UpdateRatePlanRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | [optional] +**UniqueName** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSampleRequest.md b/rest/preview/docs/UpdateSampleRequest.md new file mode 100644 index 000000000..bbba8bb6f --- /dev/null +++ b/rest/preview/docs/UpdateSampleRequest.md @@ -0,0 +1,13 @@ +# UpdateSampleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | **string** | An ISO language-country string of the sample. | [optional] +**SourceChannel** | **string** | The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null | [optional] +**TaggedText** | **string** | The text example of how end-users may express this task. The sample may contain Field tag blocks. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateServiceRequest.md b/rest/preview/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..10e887a67 --- /dev/null +++ b/rest/preview/docs/UpdateServiceRequest.md @@ -0,0 +1,14 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclEnabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**ReachabilityWebhooksEnabled** | **bool** | | [optional] +**WebhookUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSimRequest.md b/rest/preview/docs/UpdateSimRequest.md new file mode 100644 index 000000000..6d341614b --- /dev/null +++ b/rest/preview/docs/UpdateSimRequest.md @@ -0,0 +1,26 @@ +# UpdateSimRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**CommandsCallbackMethod** | **string** | | [optional] +**CommandsCallbackUrl** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**RatePlan** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateStyleSheetRequest.md b/rest/preview/docs/UpdateStyleSheetRequest.md new file mode 100644 index 000000000..ad95938d3 --- /dev/null +++ b/rest/preview/docs/UpdateStyleSheetRequest.md @@ -0,0 +1,11 @@ +# UpdateStyleSheetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StyleSheet** | [**map[string]interface{}**](.md) | The JSON Style sheet string | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSyncListItemRequest.md b/rest/preview/docs/UpdateSyncListItemRequest.md new file mode 100644 index 000000000..769e3d1e1 --- /dev/null +++ b/rest/preview/docs/UpdateSyncListItemRequest.md @@ -0,0 +1,11 @@ +# UpdateSyncListItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSyncListPermissionRequest.md b/rest/preview/docs/UpdateSyncListPermissionRequest.md new file mode 100644 index 000000000..cafa8c842 --- /dev/null +++ b/rest/preview/docs/UpdateSyncListPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateSyncListPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Boolean flag specifying whether the identity can delete the Sync List. | +**Read** | **bool** | Boolean flag specifying whether the identity can read the Sync List. | +**Write** | **bool** | Boolean flag specifying whether the identity can create, update and delete Items of the Sync List. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSyncMapItemRequest.md b/rest/preview/docs/UpdateSyncMapItemRequest.md new file mode 100644 index 000000000..1e9077a5f --- /dev/null +++ b/rest/preview/docs/UpdateSyncMapItemRequest.md @@ -0,0 +1,11 @@ +# UpdateSyncMapItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateSyncMapPermissionRequest.md b/rest/preview/docs/UpdateSyncMapPermissionRequest.md new file mode 100644 index 000000000..caccd8c61 --- /dev/null +++ b/rest/preview/docs/UpdateSyncMapPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateSyncMapPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Boolean flag specifying whether the identity can delete the Sync Map. | +**Read** | **bool** | Boolean flag specifying whether the identity can read the Sync Map. | +**Write** | **bool** | Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateTaskActionsRequest.md b/rest/preview/docs/UpdateTaskActionsRequest.md new file mode 100644 index 000000000..78188f99a --- /dev/null +++ b/rest/preview/docs/UpdateTaskActionsRequest.md @@ -0,0 +1,11 @@ +# UpdateTaskActionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | The JSON actions that instruct the Assistant how to perform this task. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/docs/UpdateTaskRequest.md b/rest/preview/docs/UpdateTaskRequest.md new file mode 100644 index 000000000..aa323813b --- /dev/null +++ b/rest/preview/docs/UpdateTaskRequest.md @@ -0,0 +1,14 @@ +# UpdateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | [**map[string]interface{}**](.md) | A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. | [optional] +**ActionsUrl** | **string** | User-provided HTTP endpoint where from the assistant fetches actions | [optional] +**FriendlyName** | **string** | A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. | [optional] +**UniqueName** | **string** | A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/preview/model_create_assistant_request.go b/rest/preview/model_create_assistant_request.go new file mode 100644 index 000000000..d8ac8c8d6 --- /dev/null +++ b/rest/preview/model_create_assistant_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAssistantRequest struct for CreateAssistantRequest +type CreateAssistantRequest struct { + // Space-separated list of callback events that will trigger callbacks. + CallbackEvents string `json:"CallbackEvents,omitempty"` + // A user-provided URL to send event callbacks to. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The JSON actions to be executed when the user's input is not recognized as matching any Task. + FallbackActions map[string]interface{} `json:"FallbackActions,omitempty"` + // A text description for the Assistant. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. + InitiationActions map[string]interface{} `json:"InitiationActions,omitempty"` + // A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. + LogQueries bool `json:"LogQueries,omitempty"` + // The JSON object that holds the style sheet for the assistant + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_authorization_document_request.go b/rest/preview/model_create_authorization_document_request.go new file mode 100644 index 000000000..fc470f2fc --- /dev/null +++ b/rest/preview/model_create_authorization_document_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAuthorizationDocumentRequest struct for CreateAuthorizationDocumentRequest +type CreateAuthorizationDocumentRequest struct { + // A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. + AddressSid string `json:"AddressSid"` + // Email recipients who will be informed when an Authorization Document has been sent and signed. + CcEmails []string `json:"CcEmails,omitempty"` + // The contact phone number of the person authorized to sign the Authorization Document. + ContactPhoneNumber string `json:"ContactPhoneNumber"` + // The title of the person authorized to sign the Authorization Document for this phone number. + ContactTitle string `json:"ContactTitle"` + // Email that this AuthorizationDocument will be sent to for signing. + Email string `json:"Email"` + // A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. + HostedNumberOrderSids []string `json:"HostedNumberOrderSids"` +} diff --git a/rest/preview/model_create_certificate_request.go b/rest/preview/model_create_certificate_request.go new file mode 100644 index 000000000..96aff8b69 --- /dev/null +++ b/rest/preview/model_create_certificate_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCertificateRequest struct for CreateCertificateRequest +type CreateCertificateRequest struct { + // Provides a URL encoded representation of the public certificate in PEM format. + CertificateData string `json:"CertificateData"` + // Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. + DeviceSid string `json:"DeviceSid,omitempty"` + // Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_create_channel_request.go b/rest/preview/model_create_channel_request.go new file mode 100644 index 000000000..d61dd2806 --- /dev/null +++ b/rest/preview/model_create_channel_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateChannelRequest struct for CreateChannelRequest +type CreateChannelRequest struct { + // The unique SID identifier of the Phone Number of the Phone number to be assigned to the Branded Channel. + PhoneNumberSid string `json:"PhoneNumberSid"` +} diff --git a/rest/preview/model_create_command_request.go b/rest/preview/model_create_command_request.go new file mode 100644 index 000000000..fbc77eb0d --- /dev/null +++ b/rest/preview/model_create_command_request.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCommandRequest struct for CreateCommandRequest +type CreateCommandRequest struct { + CallbackMethod string `json:"CallbackMethod,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + Command string `json:"Command"` + CommandMode string `json:"CommandMode,omitempty"` + Device string `json:"Device,omitempty"` + IncludeSid string `json:"IncludeSid,omitempty"` + Sim string `json:"Sim,omitempty"` +} diff --git a/rest/preview/model_create_deployment_request.go b/rest/preview/model_create_deployment_request.go new file mode 100644 index 000000000..cadd86a4d --- /dev/null +++ b/rest/preview/model_create_deployment_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDeploymentRequest struct for CreateDeploymentRequest +type CreateDeploymentRequest struct { + // Provides a human readable descriptive text for this Deployment, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. + SyncServiceSid string `json:"SyncServiceSid,omitempty"` +} diff --git a/rest/preview/model_create_device_request.go b/rest/preview/model_create_device_request.go new file mode 100644 index 000000000..4aa549ade --- /dev/null +++ b/rest/preview/model_create_device_request.go @@ -0,0 +1,23 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDeviceRequest struct for CreateDeviceRequest +type CreateDeviceRequest struct { + // Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. + DeploymentSid string `json:"DeploymentSid,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + // Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. + Identity string `json:"Identity,omitempty"` + // Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_document_request.go b/rest/preview/model_create_document_request.go new file mode 100644 index 000000000..a9cb7f83d --- /dev/null +++ b/rest/preview/model_create_document_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDocumentRequest struct for CreateDocumentRequest +type CreateDocumentRequest struct { + Data map[string]interface{} `json:"Data,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_export_custom_job_request.go b/rest/preview/model_create_export_custom_job_request.go new file mode 100644 index 000000000..a39cc6b4b --- /dev/null +++ b/rest/preview/model_create_export_custom_job_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateExportCustomJobRequest struct for CreateExportCustomJobRequest +type CreateExportCustomJobRequest struct { + // The optional email to send the completion notification to + Email string `json:"Email,omitempty"` + // The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day. + EndDay string `json:"EndDay"` + // The friendly name specified when creating the job + FriendlyName string `json:"FriendlyName"` + // The start day for the custom export specified as a string in the format of yyyy-mm-dd + StartDay string `json:"StartDay"` + // This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied. + WebhookMethod string `json:"WebhookMethod,omitempty"` + // The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_create_field_request.go b/rest/preview/model_create_field_request.go new file mode 100644 index 000000000..13eb0ebef --- /dev/null +++ b/rest/preview/model_create_field_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldRequest struct for CreateFieldRequest +type CreateFieldRequest struct { + // The unique name or sid of the FieldType. It can be any [Built-in Field Type](https://www.twilio.com/docs/assistant/api/built-in-field-types) or the unique_name or the Field Type sid of a custom Field Type. + FieldType string `json:"FieldType"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/preview/model_create_field_type_request.go b/rest/preview/model_create_field_type_request.go new file mode 100644 index 000000000..abac087ea --- /dev/null +++ b/rest/preview/model_create_field_type_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldTypeRequest struct for CreateFieldTypeRequest +type CreateFieldTypeRequest struct { + // A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/preview/model_create_field_value_request.go b/rest/preview/model_create_field_value_request.go new file mode 100644 index 000000000..c8858a736 --- /dev/null +++ b/rest/preview/model_create_field_value_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFieldValueRequest struct for CreateFieldValueRequest +type CreateFieldValueRequest struct { + // An ISO language-country string of the value. + Language string `json:"Language"` + // A value that indicates this field value is a synonym of. Empty if the value is not a synonym. + SynonymOf string `json:"SynonymOf,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + Value string `json:"Value"` +} diff --git a/rest/preview/model_create_fleet_request.go b/rest/preview/model_create_fleet_request.go new file mode 100644 index 000000000..a3a047094 --- /dev/null +++ b/rest/preview/model_create_fleet_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFleetRequest struct for CreateFleetRequest +type CreateFleetRequest struct { + // Provides a human readable descriptive text for this Fleet, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_create_hosted_number_order_request.go b/rest/preview/model_create_hosted_number_order_request.go new file mode 100644 index 000000000..422f73537 --- /dev/null +++ b/rest/preview/model_create_hosted_number_order_request.go @@ -0,0 +1,48 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateHostedNumberOrderRequest struct for CreateHostedNumberOrderRequest +type CreateHostedNumberOrderRequest struct { + // This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to. + AccountSid string `json:"AccountSid,omitempty"` + // Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number. + AddressSid string `json:"AddressSid,omitempty"` + // Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to. + CcEmails []string `json:"CcEmails,omitempty"` + // Optional. Email of the owner of this phone number that is being hosted. + Email string `json:"Email,omitempty"` + // A 64 character string that is a human readable text that describes this resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format + PhoneNumber string `json:"PhoneNumber"` + // Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application. + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + // Used to specify that the SMS capability will be hosted on Twilio's platform. + SmsCapability bool `json:"SmsCapability"` + // The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource. + SmsUrl string `json:"SmsUrl,omitempty"` + // Optional. The Status Callback Method attached to the IncomingPhoneNumber resource. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Optional. The Status Callback URL attached to the IncomingPhoneNumber resource. + StatusCallbackUrl string `json:"StatusCallbackUrl,omitempty"` + // Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + UniqueName string `json:"UniqueName,omitempty"` + // Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. + VerificationDocumentSid string `json:"VerificationDocumentSid,omitempty"` + // Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. + VerificationType string `json:"VerificationType,omitempty"` +} diff --git a/rest/preview/model_create_installed_add_on_request.go b/rest/preview/model_create_installed_add_on_request.go new file mode 100644 index 000000000..37f091c36 --- /dev/null +++ b/rest/preview/model_create_installed_add_on_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateInstalledAddOnRequest struct for CreateInstalledAddOnRequest +type CreateInstalledAddOnRequest struct { + // Whether the Terms of Service were accepted. + AcceptTermsOfService bool `json:"AcceptTermsOfService"` + // The SID of the AvaliableAddOn to install. + AvailableAddOnSid string `json:"AvailableAddOnSid"` + // The JSON object that represents the configuration of the new Add-on being installed. + Configuration map[string]interface{} `json:"Configuration,omitempty"` + // An application-defined string that uniquely identifies the resource. This value must be unique within the Account. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_key_request.go b/rest/preview/model_create_key_request.go new file mode 100644 index 000000000..0c9b2835b --- /dev/null +++ b/rest/preview/model_create_key_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateKeyRequest struct for CreateKeyRequest +type CreateKeyRequest struct { + // Provides the unique string identifier of an existing Device to become authenticated with this Key credential. + DeviceSid string `json:"DeviceSid,omitempty"` + // Provides a human readable descriptive text for this Key credential, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_create_model_build_request.go b/rest/preview/model_create_model_build_request.go new file mode 100644 index 000000000..68b5b9bf8 --- /dev/null +++ b/rest/preview/model_create_model_build_request.go @@ -0,0 +1,17 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateModelBuildRequest struct for CreateModelBuildRequest +type CreateModelBuildRequest struct { + StatusCallback string `json:"StatusCallback,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_query_request.go b/rest/preview/model_create_query_request.go new file mode 100644 index 000000000..d03b6b0e6 --- /dev/null +++ b/rest/preview/model_create_query_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateQueryRequest struct for CreateQueryRequest +type CreateQueryRequest struct { + // Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name* + Field string `json:"Field,omitempty"` + // An ISO language-country string of the sample. + Language string `json:"Language"` + // The Model Build Sid or unique name of the Model Build to be queried. + ModelBuild string `json:"ModelBuild,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. + Query string `json:"Query"` + // Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2* + Tasks string `json:"Tasks,omitempty"` +} diff --git a/rest/preview/model_create_rate_plan_request.go b/rest/preview/model_create_rate_plan_request.go new file mode 100644 index 000000000..b7bdc85ea --- /dev/null +++ b/rest/preview/model_create_rate_plan_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRatePlanRequest struct for CreateRatePlanRequest +type CreateRatePlanRequest struct { + CommandsEnabled bool `json:"CommandsEnabled,omitempty"` + DataEnabled bool `json:"DataEnabled,omitempty"` + DataLimit int32 `json:"DataLimit,omitempty"` + DataMetering string `json:"DataMetering,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InternationalRoaming []string `json:"InternationalRoaming,omitempty"` + MessagingEnabled bool `json:"MessagingEnabled,omitempty"` + NationalRoamingEnabled bool `json:"NationalRoamingEnabled,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + VoiceEnabled bool `json:"VoiceEnabled,omitempty"` +} diff --git a/rest/preview/model_create_sample_request.go b/rest/preview/model_create_sample_request.go new file mode 100644 index 000000000..0327f03c4 --- /dev/null +++ b/rest/preview/model_create_sample_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSampleRequest struct for CreateSampleRequest +type CreateSampleRequest struct { + // An ISO language-country string of the sample. + Language string `json:"Language"` + // The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null + SourceChannel string `json:"SourceChannel,omitempty"` + // The text example of how end-users may express this task. The sample may contain Field tag blocks. + TaggedText string `json:"TaggedText"` +} diff --git a/rest/preview/model_create_service_request.go b/rest/preview/model_create_service_request.go new file mode 100644 index 000000000..c97a5de90 --- /dev/null +++ b/rest/preview/model_create_service_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + AclEnabled bool `json:"AclEnabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_create_sync_list_item_request.go b/rest/preview/model_create_sync_list_item_request.go new file mode 100644 index 000000000..d6f9cb6a1 --- /dev/null +++ b/rest/preview/model_create_sync_list_item_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncListItemRequest struct for CreateSyncListItemRequest +type CreateSyncListItemRequest struct { + Data map[string]interface{} `json:"Data"` +} diff --git a/rest/preview/model_create_sync_list_request.go b/rest/preview/model_create_sync_list_request.go new file mode 100644 index 000000000..94e873700 --- /dev/null +++ b/rest/preview/model_create_sync_list_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncListRequest struct for CreateSyncListRequest +type CreateSyncListRequest struct { + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_sync_map_item_request.go b/rest/preview/model_create_sync_map_item_request.go new file mode 100644 index 000000000..c7d027ac1 --- /dev/null +++ b/rest/preview/model_create_sync_map_item_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncMapItemRequest struct for CreateSyncMapItemRequest +type CreateSyncMapItemRequest struct { + Data map[string]interface{} `json:"Data"` + Key string `json:"Key"` +} diff --git a/rest/preview/model_create_sync_map_request.go b/rest/preview/model_create_sync_map_request.go new file mode 100644 index 000000000..9390113d5 --- /dev/null +++ b/rest/preview/model_create_sync_map_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncMapRequest struct for CreateSyncMapRequest +type CreateSyncMapRequest struct { + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_create_task_request.go b/rest/preview/model_create_task_request.go new file mode 100644 index 000000000..e536c7a76 --- /dev/null +++ b/rest/preview/model_create_task_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTaskRequest struct for CreateTaskRequest +type CreateTaskRequest struct { + // A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. + Actions map[string]interface{} `json:"Actions,omitempty"` + // User-provided HTTP endpoint where from the assistant fetches actions + ActionsUrl string `json:"ActionsUrl,omitempty"` + // A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/preview/model_list_assistant_response.go b/rest/preview/model_list_assistant_response.go new file mode 100644 index 000000000..7e6fbac20 --- /dev/null +++ b/rest/preview/model_list_assistant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAssistantResponse struct for ListAssistantResponse +type ListAssistantResponse struct { + Assistants []PreviewUnderstandAssistant `json:"Assistants,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_authorization_document_response.go b/rest/preview/model_list_authorization_document_response.go new file mode 100644 index 000000000..db72d646b --- /dev/null +++ b/rest/preview/model_list_authorization_document_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAuthorizationDocumentResponse struct for ListAuthorizationDocumentResponse +type ListAuthorizationDocumentResponse struct { + Items []PreviewHostedNumbersAuthorizationDocument `json:"Items,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_available_add_on_extension_response.go b/rest/preview/model_list_available_add_on_extension_response.go new file mode 100644 index 000000000..45c6d49e0 --- /dev/null +++ b/rest/preview/model_list_available_add_on_extension_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailableAddOnExtensionResponse struct for ListAvailableAddOnExtensionResponse +type ListAvailableAddOnExtensionResponse struct { + Extensions []PreviewMarketplaceAvailableAddOnAvailableAddOnExtension `json:"Extensions,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_available_add_on_response.go b/rest/preview/model_list_available_add_on_response.go new file mode 100644 index 000000000..5bc3af990 --- /dev/null +++ b/rest/preview/model_list_available_add_on_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAvailableAddOnResponse struct for ListAvailableAddOnResponse +type ListAvailableAddOnResponse struct { + AvailableAddOns []PreviewMarketplaceAvailableAddOn `json:"AvailableAddOns,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_certificate_response.go b/rest/preview/model_list_certificate_response.go new file mode 100644 index 000000000..c04b3fa77 --- /dev/null +++ b/rest/preview/model_list_certificate_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCertificateResponse struct for ListCertificateResponse +type ListCertificateResponse struct { + Certificates []PreviewDeployedDevicesFleetCertificate `json:"Certificates,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_command_response.go b/rest/preview/model_list_command_response.go new file mode 100644 index 000000000..8c0484918 --- /dev/null +++ b/rest/preview/model_list_command_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCommandResponse struct for ListCommandResponse +type ListCommandResponse struct { + Commands []PreviewWirelessCommand `json:"Commands,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_day_response.go b/rest/preview/model_list_day_response.go new file mode 100644 index 000000000..77b10b31f --- /dev/null +++ b/rest/preview/model_list_day_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDayResponse struct for ListDayResponse +type ListDayResponse struct { + Days []PreviewBulkExportsExportDay `json:"Days,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_day_response_meta.go b/rest/preview/model_list_day_response_meta.go new file mode 100644 index 000000000..a03ae6e23 --- /dev/null +++ b/rest/preview/model_list_day_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDayResponseMeta struct for ListDayResponseMeta +type ListDayResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_list_dependent_hosted_number_order_response.go b/rest/preview/model_list_dependent_hosted_number_order_response.go new file mode 100644 index 000000000..b533601ad --- /dev/null +++ b/rest/preview/model_list_dependent_hosted_number_order_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDependentHostedNumberOrderResponse struct for ListDependentHostedNumberOrderResponse +type ListDependentHostedNumberOrderResponse struct { + Items []PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder `json:"Items,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_deployment_response.go b/rest/preview/model_list_deployment_response.go new file mode 100644 index 000000000..a8b51da86 --- /dev/null +++ b/rest/preview/model_list_deployment_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDeploymentResponse struct for ListDeploymentResponse +type ListDeploymentResponse struct { + Deployments []PreviewDeployedDevicesFleetDeployment `json:"Deployments,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_device_response.go b/rest/preview/model_list_device_response.go new file mode 100644 index 000000000..c7ad84649 --- /dev/null +++ b/rest/preview/model_list_device_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDeviceResponse struct for ListDeviceResponse +type ListDeviceResponse struct { + Devices []PreviewDeployedDevicesFleetDevice `json:"Devices,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_document_permission_response.go b/rest/preview/model_list_document_permission_response.go new file mode 100644 index 000000000..203f27cd0 --- /dev/null +++ b/rest/preview/model_list_document_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDocumentPermissionResponse struct for ListDocumentPermissionResponse +type ListDocumentPermissionResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Permissions []PreviewSyncServiceDocumentDocumentPermission `json:"Permissions,omitempty"` +} diff --git a/rest/preview/model_list_document_response.go b/rest/preview/model_list_document_response.go new file mode 100644 index 000000000..6a8b7e60e --- /dev/null +++ b/rest/preview/model_list_document_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDocumentResponse struct for ListDocumentResponse +type ListDocumentResponse struct { + Documents []PreviewSyncServiceDocument `json:"Documents,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_export_custom_job_response.go b/rest/preview/model_list_export_custom_job_response.go new file mode 100644 index 000000000..b409de3ad --- /dev/null +++ b/rest/preview/model_list_export_custom_job_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExportCustomJobResponse struct for ListExportCustomJobResponse +type ListExportCustomJobResponse struct { + Jobs []PreviewBulkExportsExportExportCustomJob `json:"Jobs,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_field_response.go b/rest/preview/model_list_field_response.go new file mode 100644 index 000000000..413c6c182 --- /dev/null +++ b/rest/preview/model_list_field_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldResponse struct for ListFieldResponse +type ListFieldResponse struct { + Fields []PreviewUnderstandAssistantTaskField `json:"Fields,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_field_type_response.go b/rest/preview/model_list_field_type_response.go new file mode 100644 index 000000000..00b858090 --- /dev/null +++ b/rest/preview/model_list_field_type_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldTypeResponse struct for ListFieldTypeResponse +type ListFieldTypeResponse struct { + FieldTypes []PreviewUnderstandAssistantFieldType `json:"FieldTypes,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_field_value_response.go b/rest/preview/model_list_field_value_response.go new file mode 100644 index 000000000..214cc9336 --- /dev/null +++ b/rest/preview/model_list_field_value_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFieldValueResponse struct for ListFieldValueResponse +type ListFieldValueResponse struct { + FieldValues []PreviewUnderstandAssistantFieldTypeFieldValue `json:"FieldValues,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_fleet_response.go b/rest/preview/model_list_fleet_response.go new file mode 100644 index 000000000..4a9cfe905 --- /dev/null +++ b/rest/preview/model_list_fleet_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFleetResponse struct for ListFleetResponse +type ListFleetResponse struct { + Fleets []PreviewDeployedDevicesFleet `json:"Fleets,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_hosted_number_order_response.go b/rest/preview/model_list_hosted_number_order_response.go new file mode 100644 index 000000000..6b07e3b81 --- /dev/null +++ b/rest/preview/model_list_hosted_number_order_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListHostedNumberOrderResponse struct for ListHostedNumberOrderResponse +type ListHostedNumberOrderResponse struct { + Items []PreviewHostedNumbersHostedNumberOrder `json:"Items,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_installed_add_on_extension_response.go b/rest/preview/model_list_installed_add_on_extension_response.go new file mode 100644 index 000000000..92ec77283 --- /dev/null +++ b/rest/preview/model_list_installed_add_on_extension_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInstalledAddOnExtensionResponse struct for ListInstalledAddOnExtensionResponse +type ListInstalledAddOnExtensionResponse struct { + Extensions []PreviewMarketplaceInstalledAddOnInstalledAddOnExtension `json:"Extensions,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_installed_add_on_response.go b/rest/preview/model_list_installed_add_on_response.go new file mode 100644 index 000000000..115375605 --- /dev/null +++ b/rest/preview/model_list_installed_add_on_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInstalledAddOnResponse struct for ListInstalledAddOnResponse +type ListInstalledAddOnResponse struct { + InstalledAddOns []PreviewMarketplaceInstalledAddOn `json:"InstalledAddOns,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_key_response.go b/rest/preview/model_list_key_response.go new file mode 100644 index 000000000..475b3a712 --- /dev/null +++ b/rest/preview/model_list_key_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListKeyResponse struct for ListKeyResponse +type ListKeyResponse struct { + Keys []PreviewDeployedDevicesFleetKey `json:"Keys,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_model_build_response.go b/rest/preview/model_list_model_build_response.go new file mode 100644 index 000000000..8ac3f60f2 --- /dev/null +++ b/rest/preview/model_list_model_build_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListModelBuildResponse struct for ListModelBuildResponse +type ListModelBuildResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + ModelBuilds []PreviewUnderstandAssistantModelBuild `json:"ModelBuilds,omitempty"` +} diff --git a/rest/preview/model_list_query_response.go b/rest/preview/model_list_query_response.go new file mode 100644 index 000000000..2e371adca --- /dev/null +++ b/rest/preview/model_list_query_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListQueryResponse struct for ListQueryResponse +type ListQueryResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Queries []PreviewUnderstandAssistantQuery `json:"Queries,omitempty"` +} diff --git a/rest/preview/model_list_rate_plan_response.go b/rest/preview/model_list_rate_plan_response.go new file mode 100644 index 000000000..34856e4f2 --- /dev/null +++ b/rest/preview/model_list_rate_plan_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRatePlanResponse struct for ListRatePlanResponse +type ListRatePlanResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + RatePlans []PreviewWirelessRatePlan `json:"RatePlans,omitempty"` +} diff --git a/rest/preview/model_list_sample_response.go b/rest/preview/model_list_sample_response.go new file mode 100644 index 000000000..38b2c8eaf --- /dev/null +++ b/rest/preview/model_list_sample_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSampleResponse struct for ListSampleResponse +type ListSampleResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Samples []PreviewUnderstandAssistantTaskSample `json:"Samples,omitempty"` +} diff --git a/rest/preview/model_list_service_response.go b/rest/preview/model_list_service_response.go new file mode 100644 index 000000000..7409b501f --- /dev/null +++ b/rest/preview/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Services []PreviewSyncService `json:"Services,omitempty"` +} diff --git a/rest/preview/model_list_sim_response.go b/rest/preview/model_list_sim_response.go new file mode 100644 index 000000000..a3be42bc4 --- /dev/null +++ b/rest/preview/model_list_sim_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSimResponse struct for ListSimResponse +type ListSimResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Sims []PreviewWirelessSim `json:"Sims,omitempty"` +} diff --git a/rest/preview/model_list_sync_list_item_response.go b/rest/preview/model_list_sync_list_item_response.go new file mode 100644 index 000000000..9e6564399 --- /dev/null +++ b/rest/preview/model_list_sync_list_item_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListItemResponse struct for ListSyncListItemResponse +type ListSyncListItemResponse struct { + Items []PreviewSyncServiceSyncListSyncListItem `json:"Items,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_sync_list_permission_response.go b/rest/preview/model_list_sync_list_permission_response.go new file mode 100644 index 000000000..95b04a6a8 --- /dev/null +++ b/rest/preview/model_list_sync_list_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListPermissionResponse struct for ListSyncListPermissionResponse +type ListSyncListPermissionResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Permissions []PreviewSyncServiceSyncListSyncListPermission `json:"Permissions,omitempty"` +} diff --git a/rest/preview/model_list_sync_list_response.go b/rest/preview/model_list_sync_list_response.go new file mode 100644 index 000000000..50ee6d553 --- /dev/null +++ b/rest/preview/model_list_sync_list_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListResponse struct for ListSyncListResponse +type ListSyncListResponse struct { + Lists []PreviewSyncServiceSyncList `json:"Lists,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_sync_map_item_response.go b/rest/preview/model_list_sync_map_item_response.go new file mode 100644 index 000000000..2de7426cb --- /dev/null +++ b/rest/preview/model_list_sync_map_item_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapItemResponse struct for ListSyncMapItemResponse +type ListSyncMapItemResponse struct { + Items []PreviewSyncServiceSyncMapSyncMapItem `json:"Items,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_sync_map_permission_response.go b/rest/preview/model_list_sync_map_permission_response.go new file mode 100644 index 000000000..61e77c863 --- /dev/null +++ b/rest/preview/model_list_sync_map_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapPermissionResponse struct for ListSyncMapPermissionResponse +type ListSyncMapPermissionResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Permissions []PreviewSyncServiceSyncMapSyncMapPermission `json:"Permissions,omitempty"` +} diff --git a/rest/preview/model_list_sync_map_response.go b/rest/preview/model_list_sync_map_response.go new file mode 100644 index 000000000..9ca00b68d --- /dev/null +++ b/rest/preview/model_list_sync_map_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapResponse struct for ListSyncMapResponse +type ListSyncMapResponse struct { + Maps []PreviewSyncServiceSyncMap `json:"Maps,omitempty"` + Meta ListDayResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/preview/model_list_task_response.go b/rest/preview/model_list_task_response.go new file mode 100644 index 000000000..836767c7b --- /dev/null +++ b/rest/preview/model_list_task_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskResponse struct for ListTaskResponse +type ListTaskResponse struct { + Meta ListDayResponseMeta `json:"Meta,omitempty"` + Tasks []PreviewUnderstandAssistantTask `json:"Tasks,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export.go b/rest/preview/model_preview_bulk_exports_export.go new file mode 100644 index 000000000..faf26c0f6 --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export.go @@ -0,0 +1,17 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExport struct for PreviewBulkExportsExport +type PreviewBulkExportsExport struct { + Links map[string]interface{} `json:"Links,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export_configuration.go b/rest/preview/model_preview_bulk_exports_export_configuration.go new file mode 100644 index 000000000..96b937fbd --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export_configuration.go @@ -0,0 +1,19 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExportConfiguration struct for PreviewBulkExportsExportConfiguration +type PreviewBulkExportsExportConfiguration struct { + Enabled bool `json:"Enabled,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export_day.go b/rest/preview/model_preview_bulk_exports_export_day.go new file mode 100644 index 000000000..9fab3032d --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export_day.go @@ -0,0 +1,19 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExportDay struct for PreviewBulkExportsExportDay +type PreviewBulkExportsExportDay struct { + CreateDate string `json:"CreateDate,omitempty"` + Day string `json:"Day,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + Size int32 `json:"Size,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export_day_instance.go b/rest/preview/model_preview_bulk_exports_export_day_instance.go new file mode 100644 index 000000000..2cacf26d7 --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export_day_instance.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExportDayInstance struct for PreviewBulkExportsExportDayInstance +type PreviewBulkExportsExportDayInstance struct { + RedirectTo string `json:"RedirectTo,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export_export_custom_job.go b/rest/preview/model_preview_bulk_exports_export_export_custom_job.go new file mode 100644 index 000000000..2d5d74d05 --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export_export_custom_job.go @@ -0,0 +1,23 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExportExportCustomJob struct for PreviewBulkExportsExportExportCustomJob +type PreviewBulkExportsExportExportCustomJob struct { + Details map[string]interface{} `json:"Details,omitempty"` + Email string `json:"Email,omitempty"` + EndDay string `json:"EndDay,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + JobSid string `json:"JobSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + StartDay string `json:"StartDay,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_preview_bulk_exports_export_job.go b/rest/preview/model_preview_bulk_exports_export_job.go new file mode 100644 index 000000000..4e9838170 --- /dev/null +++ b/rest/preview/model_preview_bulk_exports_export_job.go @@ -0,0 +1,24 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewBulkExportsExportJob struct for PreviewBulkExportsExportJob +type PreviewBulkExportsExportJob struct { + Details map[string]interface{} `json:"Details,omitempty"` + Email string `json:"Email,omitempty"` + EndDay string `json:"EndDay,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + JobSid string `json:"JobSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + StartDay string `json:"StartDay,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_preview_deployed_devices_fleet.go b/rest/preview/model_preview_deployed_devices_fleet.go new file mode 100644 index 000000000..d05a4cd02 --- /dev/null +++ b/rest/preview/model_preview_deployed_devices_fleet.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewDeployedDevicesFleet struct for PreviewDeployedDevicesFleet +type PreviewDeployedDevicesFleet struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultDeploymentSid string `json:"DefaultDeploymentSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_deployed_devices_fleet_certificate.go b/rest/preview/model_preview_deployed_devices_fleet_certificate.go new file mode 100644 index 000000000..156392c6c --- /dev/null +++ b/rest/preview/model_preview_deployed_devices_fleet_certificate.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewDeployedDevicesFleetCertificate struct for PreviewDeployedDevicesFleetCertificate +type PreviewDeployedDevicesFleetCertificate struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DeviceSid string `json:"DeviceSid,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + Thumbprint string `json:"Thumbprint,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_deployed_devices_fleet_deployment.go b/rest/preview/model_preview_deployed_devices_fleet_deployment.go new file mode 100644 index 000000000..7d805a8f6 --- /dev/null +++ b/rest/preview/model_preview_deployed_devices_fleet_deployment.go @@ -0,0 +1,25 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewDeployedDevicesFleetDeployment struct for PreviewDeployedDevicesFleetDeployment +type PreviewDeployedDevicesFleetDeployment struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + SyncServiceSid string `json:"SyncServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_deployed_devices_fleet_device.go b/rest/preview/model_preview_deployed_devices_fleet_device.go new file mode 100644 index 000000000..a5030ee22 --- /dev/null +++ b/rest/preview/model_preview_deployed_devices_fleet_device.go @@ -0,0 +1,29 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewDeployedDevicesFleetDevice struct for PreviewDeployedDevicesFleetDevice +type PreviewDeployedDevicesFleetDevice struct { + AccountSid string `json:"AccountSid,omitempty"` + DateAuthenticated time.Time `json:"DateAuthenticated,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DeploymentSid string `json:"DeploymentSid,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_deployed_devices_fleet_key.go b/rest/preview/model_preview_deployed_devices_fleet_key.go new file mode 100644 index 000000000..8d6d1baee --- /dev/null +++ b/rest/preview/model_preview_deployed_devices_fleet_key.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewDeployedDevicesFleetKey struct for PreviewDeployedDevicesFleetKey +type PreviewDeployedDevicesFleetKey struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DeviceSid string `json:"DeviceSid,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Secret string `json:"Secret,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_hosted_numbers_authorization_document.go b/rest/preview/model_preview_hosted_numbers_authorization_document.go new file mode 100644 index 000000000..53e4ec1cc --- /dev/null +++ b/rest/preview/model_preview_hosted_numbers_authorization_document.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewHostedNumbersAuthorizationDocument struct for PreviewHostedNumbersAuthorizationDocument +type PreviewHostedNumbersAuthorizationDocument struct { + AddressSid string `json:"AddressSid,omitempty"` + CcEmails []string `json:"CcEmails,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Email string `json:"Email,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_hosted_numbers_authorization_document_dependent_hosted_number_order.go b/rest/preview/model_preview_hosted_numbers_authorization_document_dependent_hosted_number_order.go new file mode 100644 index 000000000..45e5563ef --- /dev/null +++ b/rest/preview/model_preview_hosted_numbers_authorization_document_dependent_hosted_number_order.go @@ -0,0 +1,39 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder struct for PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder +type PreviewHostedNumbersAuthorizationDocumentDependentHostedNumberOrder struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + CallDelay int32 `json:"CallDelay,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + CcEmails []string `json:"CcEmails,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Email string `json:"Email,omitempty"` + Extension string `json:"Extension,omitempty"` + FailureReason string `json:"FailureReason,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IncomingPhoneNumberSid string `json:"IncomingPhoneNumberSid,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SigningDocumentSid string `json:"SigningDocumentSid,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + VerificationAttempts int32 `json:"VerificationAttempts,omitempty"` + VerificationCallSids []string `json:"VerificationCallSids,omitempty"` + VerificationCode string `json:"VerificationCode,omitempty"` + VerificationDocumentSid string `json:"VerificationDocumentSid,omitempty"` + VerificationType string `json:"VerificationType,omitempty"` +} diff --git a/rest/preview/model_preview_hosted_numbers_hosted_number_order.go b/rest/preview/model_preview_hosted_numbers_hosted_number_order.go new file mode 100644 index 000000000..428ed4d2b --- /dev/null +++ b/rest/preview/model_preview_hosted_numbers_hosted_number_order.go @@ -0,0 +1,40 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewHostedNumbersHostedNumberOrder struct for PreviewHostedNumbersHostedNumberOrder +type PreviewHostedNumbersHostedNumberOrder struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressSid string `json:"AddressSid,omitempty"` + CallDelay int32 `json:"CallDelay,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + CcEmails []string `json:"CcEmails,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Email string `json:"Email,omitempty"` + Extension string `json:"Extension,omitempty"` + FailureReason string `json:"FailureReason,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IncomingPhoneNumberSid string `json:"IncomingPhoneNumberSid,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SigningDocumentSid string `json:"SigningDocumentSid,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VerificationAttempts int32 `json:"VerificationAttempts,omitempty"` + VerificationCallSids []string `json:"VerificationCallSids,omitempty"` + VerificationCode string `json:"VerificationCode,omitempty"` + VerificationDocumentSid string `json:"VerificationDocumentSid,omitempty"` + VerificationType string `json:"VerificationType,omitempty"` +} diff --git a/rest/preview/model_preview_marketplace_available_add_on.go b/rest/preview/model_preview_marketplace_available_add_on.go new file mode 100644 index 000000000..ec5b15b53 --- /dev/null +++ b/rest/preview/model_preview_marketplace_available_add_on.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewMarketplaceAvailableAddOn struct for PreviewMarketplaceAvailableAddOn +type PreviewMarketplaceAvailableAddOn struct { + ConfigurationSchema map[string]interface{} `json:"ConfigurationSchema,omitempty"` + Description string `json:"Description,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + PricingType string `json:"PricingType,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_marketplace_available_add_on_available_add_on_extension.go b/rest/preview/model_preview_marketplace_available_add_on_available_add_on_extension.go new file mode 100644 index 000000000..550b1b15d --- /dev/null +++ b/rest/preview/model_preview_marketplace_available_add_on_available_add_on_extension.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewMarketplaceAvailableAddOnAvailableAddOnExtension struct for PreviewMarketplaceAvailableAddOnAvailableAddOnExtension +type PreviewMarketplaceAvailableAddOnAvailableAddOnExtension struct { + AvailableAddOnSid string `json:"AvailableAddOnSid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ProductName string `json:"ProductName,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_marketplace_installed_add_on.go b/rest/preview/model_preview_marketplace_installed_add_on.go new file mode 100644 index 000000000..2ecafac3c --- /dev/null +++ b/rest/preview/model_preview_marketplace_installed_add_on.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewMarketplaceInstalledAddOn struct for PreviewMarketplaceInstalledAddOn +type PreviewMarketplaceInstalledAddOn struct { + AccountSid string `json:"AccountSid,omitempty"` + Configuration map[string]interface{} `json:"Configuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_marketplace_installed_add_on_installed_add_on_extension.go b/rest/preview/model_preview_marketplace_installed_add_on_installed_add_on_extension.go new file mode 100644 index 000000000..2947dfa64 --- /dev/null +++ b/rest/preview/model_preview_marketplace_installed_add_on_installed_add_on_extension.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewMarketplaceInstalledAddOnInstalledAddOnExtension struct for PreviewMarketplaceInstalledAddOnInstalledAddOnExtension +type PreviewMarketplaceInstalledAddOnInstalledAddOnExtension struct { + Enabled bool `json:"Enabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InstalledAddOnSid string `json:"InstalledAddOnSid,omitempty"` + ProductName string `json:"ProductName,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service.go b/rest/preview/model_preview_sync_service.go new file mode 100644 index 000000000..5268c27cd --- /dev/null +++ b/rest/preview/model_preview_sync_service.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncService struct for PreviewSyncService +type PreviewSyncService struct { + AccountSid string `json:"AccountSid,omitempty"` + AclEnabled bool `json:"AclEnabled,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_document.go b/rest/preview/model_preview_sync_service_document.go new file mode 100644 index 000000000..8e7bc08c4 --- /dev/null +++ b/rest/preview/model_preview_sync_service_document.go @@ -0,0 +1,28 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncServiceDocument struct for PreviewSyncServiceDocument +type PreviewSyncServiceDocument struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_document_document_permission.go b/rest/preview/model_preview_sync_service_document_document_permission.go new file mode 100644 index 000000000..429375b90 --- /dev/null +++ b/rest/preview/model_preview_sync_service_document_document_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewSyncServiceDocumentDocumentPermission struct for PreviewSyncServiceDocumentDocumentPermission +type PreviewSyncServiceDocumentDocumentPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + DocumentSid string `json:"DocumentSid,omitempty"` + Identity string `json:"Identity,omitempty"` + Manage bool `json:"Manage,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_list.go b/rest/preview/model_preview_sync_service_sync_list.go new file mode 100644 index 000000000..1961378b2 --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_list.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncServiceSyncList struct for PreviewSyncServiceSyncList +type PreviewSyncServiceSyncList struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_list_sync_list_item.go b/rest/preview/model_preview_sync_service_sync_list_sync_list_item.go new file mode 100644 index 000000000..820ca323e --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_list_sync_list_item.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncServiceSyncListSyncListItem struct for PreviewSyncServiceSyncListSyncListItem +type PreviewSyncServiceSyncListSyncListItem struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Index int32 `json:"Index,omitempty"` + ListSid string `json:"ListSid,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_list_sync_list_permission.go b/rest/preview/model_preview_sync_service_sync_list_sync_list_permission.go new file mode 100644 index 000000000..b927ac05f --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_list_sync_list_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewSyncServiceSyncListSyncListPermission struct for PreviewSyncServiceSyncListSyncListPermission +type PreviewSyncServiceSyncListSyncListPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + Identity string `json:"Identity,omitempty"` + ListSid string `json:"ListSid,omitempty"` + Manage bool `json:"Manage,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_map.go b/rest/preview/model_preview_sync_service_sync_map.go new file mode 100644 index 000000000..a5a676663 --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_map.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncServiceSyncMap struct for PreviewSyncServiceSyncMap +type PreviewSyncServiceSyncMap struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_map_sync_map_item.go b/rest/preview/model_preview_sync_service_sync_map_sync_map_item.go new file mode 100644 index 000000000..f45063e31 --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_map_sync_map_item.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewSyncServiceSyncMapSyncMapItem struct for PreviewSyncServiceSyncMapSyncMapItem +type PreviewSyncServiceSyncMapSyncMapItem struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Key string `json:"Key,omitempty"` + MapSid string `json:"MapSid,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_sync_service_sync_map_sync_map_permission.go b/rest/preview/model_preview_sync_service_sync_map_sync_map_permission.go new file mode 100644 index 000000000..44ac3bf30 --- /dev/null +++ b/rest/preview/model_preview_sync_service_sync_map_sync_map_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewSyncServiceSyncMapSyncMapPermission struct for PreviewSyncServiceSyncMapSyncMapPermission +type PreviewSyncServiceSyncMapSyncMapPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + Identity string `json:"Identity,omitempty"` + Manage bool `json:"Manage,omitempty"` + MapSid string `json:"MapSid,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/preview/model_preview_trusted_comms_branded_channel.go b/rest/preview/model_preview_trusted_comms_branded_channel.go new file mode 100644 index 000000000..83b0af740 --- /dev/null +++ b/rest/preview/model_preview_trusted_comms_branded_channel.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewTrustedCommsBrandedChannel struct for PreviewTrustedCommsBrandedChannel +type PreviewTrustedCommsBrandedChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + BrandSid string `json:"BrandSid,omitempty"` + BusinessSid string `json:"BusinessSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_trusted_comms_branded_channel_channel.go b/rest/preview/model_preview_trusted_comms_branded_channel_channel.go new file mode 100644 index 000000000..86fc32199 --- /dev/null +++ b/rest/preview/model_preview_trusted_comms_branded_channel_channel.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewTrustedCommsBrandedChannelChannel struct for PreviewTrustedCommsBrandedChannelChannel +type PreviewTrustedCommsBrandedChannelChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + BrandSid string `json:"BrandSid,omitempty"` + BrandedChannelSid string `json:"BrandedChannelSid,omitempty"` + BusinessSid string `json:"BusinessSid,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + PhoneNumberSid string `json:"PhoneNumberSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_trusted_comms_brands_information.go b/rest/preview/model_preview_trusted_comms_brands_information.go new file mode 100644 index 000000000..e9f7e6bc2 --- /dev/null +++ b/rest/preview/model_preview_trusted_comms_brands_information.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewTrustedCommsBrandsInformation struct for PreviewTrustedCommsBrandsInformation +type PreviewTrustedCommsBrandsInformation struct { + FileLink string `json:"FileLink,omitempty"` + FileLinkTtlInSeconds string `json:"FileLinkTtlInSeconds,omitempty"` + UpdateTime time.Time `json:"UpdateTime,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_trusted_comms_cps.go b/rest/preview/model_preview_trusted_comms_cps.go new file mode 100644 index 000000000..d3397fdc4 --- /dev/null +++ b/rest/preview/model_preview_trusted_comms_cps.go @@ -0,0 +1,17 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewTrustedCommsCps struct for PreviewTrustedCommsCps +type PreviewTrustedCommsCps struct { + CpsUrl string `json:"CpsUrl,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_trusted_comms_current_call.go b/rest/preview/model_preview_trusted_comms_current_call.go new file mode 100644 index 000000000..dc56552c3 --- /dev/null +++ b/rest/preview/model_preview_trusted_comms_current_call.go @@ -0,0 +1,31 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewTrustedCommsCurrentCall struct for PreviewTrustedCommsCurrentCall +type PreviewTrustedCommsCurrentCall struct { + BgColor string `json:"BgColor,omitempty"` + Caller string `json:"Caller,omitempty"` + CreatedAt time.Time `json:"CreatedAt,omitempty"` + FontColor string `json:"FontColor,omitempty"` + From string `json:"From,omitempty"` + Logo string `json:"Logo,omitempty"` + Manager string `json:"Manager,omitempty"` + Reason string `json:"Reason,omitempty"` + ShieldImg string `json:"ShieldImg,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + To string `json:"To,omitempty"` + Url string `json:"Url,omitempty"` + UseCase string `json:"UseCase,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant.go b/rest/preview/model_preview_understand_assistant.go new file mode 100644 index 000000000..fa8ff100c --- /dev/null +++ b/rest/preview/model_preview_understand_assistant.go @@ -0,0 +1,29 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistant struct for PreviewUnderstandAssistant +type PreviewUnderstandAssistant struct { + AccountSid string `json:"AccountSid,omitempty"` + CallbackEvents string `json:"CallbackEvents,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + LatestModelBuildSid string `json:"LatestModelBuildSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LogQueries bool `json:"LogQueries,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_assistant_fallback_actions.go b/rest/preview/model_preview_understand_assistant_assistant_fallback_actions.go new file mode 100644 index 000000000..6ba6e340d --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_assistant_fallback_actions.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantAssistantFallbackActions struct for PreviewUnderstandAssistantAssistantFallbackActions +type PreviewUnderstandAssistantAssistantFallbackActions struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_assistant_initiation_actions.go b/rest/preview/model_preview_understand_assistant_assistant_initiation_actions.go new file mode 100644 index 000000000..0cebb7620 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_assistant_initiation_actions.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantAssistantInitiationActions struct for PreviewUnderstandAssistantAssistantInitiationActions +type PreviewUnderstandAssistantAssistantInitiationActions struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_dialogue.go b/rest/preview/model_preview_understand_assistant_dialogue.go new file mode 100644 index 000000000..743bbe854 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_dialogue.go @@ -0,0 +1,19 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantDialogue struct for PreviewUnderstandAssistantDialogue +type PreviewUnderstandAssistantDialogue struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_field_type.go b/rest/preview/model_preview_understand_assistant_field_type.go new file mode 100644 index 000000000..cb3a75315 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_field_type.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantFieldType struct for PreviewUnderstandAssistantFieldType +type PreviewUnderstandAssistantFieldType struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_field_type_field_value.go b/rest/preview/model_preview_understand_assistant_field_type_field_value.go new file mode 100644 index 000000000..39c42d48e --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_field_type_field_value.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantFieldTypeFieldValue struct for PreviewUnderstandAssistantFieldTypeFieldValue +type PreviewUnderstandAssistantFieldTypeFieldValue struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FieldTypeSid string `json:"FieldTypeSid,omitempty"` + Language string `json:"Language,omitempty"` + Sid string `json:"Sid,omitempty"` + SynonymOf string `json:"SynonymOf,omitempty"` + Url string `json:"Url,omitempty"` + Value string `json:"Value,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_model_build.go b/rest/preview/model_preview_understand_assistant_model_build.go new file mode 100644 index 000000000..fff8f1998 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_model_build.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantModelBuild struct for PreviewUnderstandAssistantModelBuild +type PreviewUnderstandAssistantModelBuild struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + BuildDuration *int32 `json:"BuildDuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ErrorCode *int32 `json:"ErrorCode,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_query.go b/rest/preview/model_preview_understand_assistant_query.go new file mode 100644 index 000000000..078c2c436 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_query.go @@ -0,0 +1,30 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantQuery struct for PreviewUnderstandAssistantQuery +type PreviewUnderstandAssistantQuery struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Language string `json:"Language,omitempty"` + ModelBuildSid string `json:"ModelBuildSid,omitempty"` + Query string `json:"Query,omitempty"` + Results map[string]interface{} `json:"Results,omitempty"` + SampleSid string `json:"SampleSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SourceChannel string `json:"SourceChannel,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_style_sheet.go b/rest/preview/model_preview_understand_assistant_style_sheet.go new file mode 100644 index 000000000..72ed0ce03 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_style_sheet.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantStyleSheet struct for PreviewUnderstandAssistantStyleSheet +type PreviewUnderstandAssistantStyleSheet struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_task.go b/rest/preview/model_preview_understand_assistant_task.go new file mode 100644 index 000000000..cd1ec5ecc --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_task.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantTask struct for PreviewUnderstandAssistantTask +type PreviewUnderstandAssistantTask struct { + AccountSid string `json:"AccountSid,omitempty"` + ActionsUrl string `json:"ActionsUrl,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_task_field.go b/rest/preview/model_preview_understand_assistant_task_field.go new file mode 100644 index 000000000..c4078a3df --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_task_field.go @@ -0,0 +1,26 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantTaskField struct for PreviewUnderstandAssistantTaskField +type PreviewUnderstandAssistantTaskField struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FieldType string `json:"FieldType,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_task_sample.go b/rest/preview/model_preview_understand_assistant_task_sample.go new file mode 100644 index 000000000..22630cf10 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_task_sample.go @@ -0,0 +1,27 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewUnderstandAssistantTaskSample struct for PreviewUnderstandAssistantTaskSample +type PreviewUnderstandAssistantTaskSample struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Language string `json:"Language,omitempty"` + Sid string `json:"Sid,omitempty"` + SourceChannel string `json:"SourceChannel,omitempty"` + TaggedText string `json:"TaggedText,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_task_task_actions.go b/rest/preview/model_preview_understand_assistant_task_task_actions.go new file mode 100644 index 000000000..c365dc497 --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_task_task_actions.go @@ -0,0 +1,19 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantTaskTaskActions struct for PreviewUnderstandAssistantTaskTaskActions +type PreviewUnderstandAssistantTaskTaskActions struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_understand_assistant_task_task_statistics.go b/rest/preview/model_preview_understand_assistant_task_task_statistics.go new file mode 100644 index 000000000..76fd42f8f --- /dev/null +++ b/rest/preview/model_preview_understand_assistant_task_task_statistics.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewUnderstandAssistantTaskTaskStatistics struct for PreviewUnderstandAssistantTaskTaskStatistics +type PreviewUnderstandAssistantTaskTaskStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + AssistantSid string `json:"AssistantSid,omitempty"` + FieldsCount int32 `json:"FieldsCount,omitempty"` + SamplesCount int32 `json:"SamplesCount,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_wireless_command.go b/rest/preview/model_preview_wireless_command.go new file mode 100644 index 000000000..e96117754 --- /dev/null +++ b/rest/preview/model_preview_wireless_command.go @@ -0,0 +1,28 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewWirelessCommand struct for PreviewWirelessCommand +type PreviewWirelessCommand struct { + AccountSid string `json:"AccountSid,omitempty"` + Command string `json:"Command,omitempty"` + CommandMode string `json:"CommandMode,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DeviceSid string `json:"DeviceSid,omitempty"` + Direction string `json:"Direction,omitempty"` + Sid string `json:"Sid,omitempty"` + SimSid string `json:"SimSid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_preview_wireless_rate_plan.go b/rest/preview/model_preview_wireless_rate_plan.go new file mode 100644 index 000000000..87c7ef8a7 --- /dev/null +++ b/rest/preview/model_preview_wireless_rate_plan.go @@ -0,0 +1,31 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewWirelessRatePlan struct for PreviewWirelessRatePlan +type PreviewWirelessRatePlan struct { + AccountSid string `json:"AccountSid,omitempty"` + DataEnabled bool `json:"DataEnabled,omitempty"` + DataLimit int32 `json:"DataLimit,omitempty"` + DataMetering string `json:"DataMetering,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InternationalRoaming []string `json:"InternationalRoaming,omitempty"` + MessagingEnabled bool `json:"MessagingEnabled,omitempty"` + NationalRoamingEnabled bool `json:"NationalRoamingEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VoiceEnabled bool `json:"VoiceEnabled,omitempty"` +} diff --git a/rest/preview/model_preview_wireless_sim.go b/rest/preview/model_preview_wireless_sim.go new file mode 100644 index 000000000..023d227ed --- /dev/null +++ b/rest/preview/model_preview_wireless_sim.go @@ -0,0 +1,39 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// PreviewWirelessSim struct for PreviewWirelessSim +type PreviewWirelessSim struct { + AccountSid string `json:"AccountSid,omitempty"` + CommandsCallbackMethod string `json:"CommandsCallbackMethod,omitempty"` + CommandsCallbackUrl string `json:"CommandsCallbackUrl,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EId string `json:"EId,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Iccid string `json:"Iccid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RatePlanSid string `json:"RatePlanSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/preview/model_preview_wireless_sim_usage.go b/rest/preview/model_preview_wireless_sim_usage.go new file mode 100644 index 000000000..aa7bbddef --- /dev/null +++ b/rest/preview/model_preview_wireless_sim_usage.go @@ -0,0 +1,23 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PreviewWirelessSimUsage struct for PreviewWirelessSimUsage +type PreviewWirelessSimUsage struct { + AccountSid string `json:"AccountSid,omitempty"` + CommandsCosts map[string]interface{} `json:"CommandsCosts,omitempty"` + CommandsUsage map[string]interface{} `json:"CommandsUsage,omitempty"` + DataCosts map[string]interface{} `json:"DataCosts,omitempty"` + DataUsage map[string]interface{} `json:"DataUsage,omitempty"` + Period map[string]interface{} `json:"Period,omitempty"` + SimSid string `json:"SimSid,omitempty"` + SimUniqueName string `json:"SimUniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/preview/model_update_assistant_fallback_actions_request.go b/rest/preview/model_update_assistant_fallback_actions_request.go new file mode 100644 index 000000000..0a58cf36b --- /dev/null +++ b/rest/preview/model_update_assistant_fallback_actions_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAssistantFallbackActionsRequest struct for UpdateAssistantFallbackActionsRequest +type UpdateAssistantFallbackActionsRequest struct { + FallbackActions map[string]interface{} `json:"FallbackActions,omitempty"` +} diff --git a/rest/preview/model_update_assistant_initiation_actions_request.go b/rest/preview/model_update_assistant_initiation_actions_request.go new file mode 100644 index 000000000..414603b25 --- /dev/null +++ b/rest/preview/model_update_assistant_initiation_actions_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAssistantInitiationActionsRequest struct for UpdateAssistantInitiationActionsRequest +type UpdateAssistantInitiationActionsRequest struct { + InitiationActions map[string]interface{} `json:"InitiationActions,omitempty"` +} diff --git a/rest/preview/model_update_assistant_request.go b/rest/preview/model_update_assistant_request.go new file mode 100644 index 000000000..8a414ed67 --- /dev/null +++ b/rest/preview/model_update_assistant_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAssistantRequest struct for UpdateAssistantRequest +type UpdateAssistantRequest struct { + // Space-separated list of callback events that will trigger callbacks. + CallbackEvents string `json:"CallbackEvents,omitempty"` + // A user-provided URL to send event callbacks to. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The JSON actions to be executed when the user's input is not recognized as matching any Task. + FallbackActions map[string]interface{} `json:"FallbackActions,omitempty"` + // A text description for the Assistant. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The JSON actions to be executed on inbound phone calls when the Assistant has to say something first. + InitiationActions map[string]interface{} `json:"InitiationActions,omitempty"` + // A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided. + LogQueries bool `json:"LogQueries,omitempty"` + // The JSON object that holds the style sheet for the assistant + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_update_authorization_document_request.go b/rest/preview/model_update_authorization_document_request.go new file mode 100644 index 000000000..35e4c31d6 --- /dev/null +++ b/rest/preview/model_update_authorization_document_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAuthorizationDocumentRequest struct for UpdateAuthorizationDocumentRequest +type UpdateAuthorizationDocumentRequest struct { + // A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument. + AddressSid string `json:"AddressSid,omitempty"` + // Email recipients who will be informed when an Authorization Document has been sent and signed + CcEmails []string `json:"CcEmails,omitempty"` + // The contact phone number of the person authorized to sign the Authorization Document. + ContactPhoneNumber string `json:"ContactPhoneNumber,omitempty"` + // The title of the person authorized to sign the Authorization Document for this phone number. + ContactTitle string `json:"ContactTitle,omitempty"` + // Email that this AuthorizationDocument will be sent to for signing. + Email string `json:"Email,omitempty"` + // A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform. + HostedNumberOrderSids []string `json:"HostedNumberOrderSids,omitempty"` + // Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses. + Status string `json:"Status,omitempty"` +} diff --git a/rest/preview/model_update_certificate_request.go b/rest/preview/model_update_certificate_request.go new file mode 100644 index 000000000..cfd2966fc --- /dev/null +++ b/rest/preview/model_update_certificate_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCertificateRequest struct for UpdateCertificateRequest +type UpdateCertificateRequest struct { + // Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential. + DeviceSid string `json:"DeviceSid,omitempty"` + // Provides a human readable descriptive text for this Certificate credential, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_update_deployment_request.go b/rest/preview/model_update_deployment_request.go new file mode 100644 index 000000000..8e20797b6 --- /dev/null +++ b/rest/preview/model_update_deployment_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDeploymentRequest struct for UpdateDeploymentRequest +type UpdateDeploymentRequest struct { + // Provides a human readable descriptive text for this Deployment, up to 64 characters long + FriendlyName string `json:"FriendlyName,omitempty"` + // Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. + SyncServiceSid string `json:"SyncServiceSid,omitempty"` +} diff --git a/rest/preview/model_update_device_request.go b/rest/preview/model_update_device_request.go new file mode 100644 index 000000000..3209f2b89 --- /dev/null +++ b/rest/preview/model_update_device_request.go @@ -0,0 +1,21 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDeviceRequest struct for UpdateDeviceRequest +type UpdateDeviceRequest struct { + // Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. + DeploymentSid string `json:"DeploymentSid,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + // Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. + Identity string `json:"Identity,omitempty"` +} diff --git a/rest/preview/model_update_document_permission_request.go b/rest/preview/model_update_document_permission_request.go new file mode 100644 index 000000000..95994abf2 --- /dev/null +++ b/rest/preview/model_update_document_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDocumentPermissionRequest struct for UpdateDocumentPermissionRequest +type UpdateDocumentPermissionRequest struct { + // Boolean flag specifying whether the identity can delete the Sync Document. + Manage bool `json:"Manage"` + // Boolean flag specifying whether the identity can read the Sync Document. + Read bool `json:"Read"` + // Boolean flag specifying whether the identity can update the Sync Document. + Write bool `json:"Write"` +} diff --git a/rest/preview/model_update_document_request.go b/rest/preview/model_update_document_request.go new file mode 100644 index 000000000..387d006fa --- /dev/null +++ b/rest/preview/model_update_document_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDocumentRequest struct for UpdateDocumentRequest +type UpdateDocumentRequest struct { + Data map[string]interface{} `json:"Data"` +} diff --git a/rest/preview/model_update_export_configuration_request.go b/rest/preview/model_update_export_configuration_request.go new file mode 100644 index 000000000..6c9ab790b --- /dev/null +++ b/rest/preview/model_update_export_configuration_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateExportConfigurationRequest struct for UpdateExportConfigurationRequest +type UpdateExportConfigurationRequest struct { + // If true, Twilio will automatically generate every day's file when the day is over. + Enabled bool `json:"Enabled,omitempty"` + // Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url + WebhookMethod string `json:"WebhookMethod,omitempty"` + // Stores the URL destination for the method specified in webhook_method. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_update_field_type_request.go b/rest/preview/model_update_field_type_request.go new file mode 100644 index 000000000..a03474c6a --- /dev/null +++ b/rest/preview/model_update_field_type_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFieldTypeRequest struct for UpdateFieldTypeRequest +type UpdateFieldTypeRequest struct { + // A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_update_fleet_request.go b/rest/preview/model_update_fleet_request.go new file mode 100644 index 000000000..1c4697ba4 --- /dev/null +++ b/rest/preview/model_update_fleet_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFleetRequest struct for UpdateFleetRequest +type UpdateFleetRequest struct { + // Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet. + DefaultDeploymentSid string `json:"DefaultDeploymentSid,omitempty"` + // Provides a human readable descriptive text for this Fleet, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_update_hosted_number_order_request.go b/rest/preview/model_update_hosted_number_order_request.go new file mode 100644 index 000000000..2d1d2282d --- /dev/null +++ b/rest/preview/model_update_hosted_number_order_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateHostedNumberOrderRequest struct for UpdateHostedNumberOrderRequest +type UpdateHostedNumberOrderRequest struct { + // The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0. + CallDelay int32 `json:"CallDelay,omitempty"` + // Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to. + CcEmails []string `json:"CcEmails,omitempty"` + // Email of the owner of this phone number that is being hosted. + Email string `json:"Email,omitempty"` + // Digits to dial after connecting the verification call. + Extension string `json:"Extension,omitempty"` + // A 64 character string that is a human readable text that describes this resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill. + Status string `json:"Status,omitempty"` + // Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID. + UniqueName string `json:"UniqueName,omitempty"` + // A verification code that is given to the user via a phone call to the phone number that is being hosted. + VerificationCode string `json:"VerificationCode,omitempty"` + // Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill. + VerificationDocumentSid string `json:"VerificationDocumentSid,omitempty"` + // Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill. + VerificationType string `json:"VerificationType,omitempty"` +} diff --git a/rest/preview/model_update_installed_add_on_extension_request.go b/rest/preview/model_update_installed_add_on_extension_request.go new file mode 100644 index 000000000..14edd083d --- /dev/null +++ b/rest/preview/model_update_installed_add_on_extension_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateInstalledAddOnExtensionRequest struct for UpdateInstalledAddOnExtensionRequest +type UpdateInstalledAddOnExtensionRequest struct { + // Whether the Extension should be invoked. + Enabled bool `json:"Enabled"` +} diff --git a/rest/preview/model_update_installed_add_on_request.go b/rest/preview/model_update_installed_add_on_request.go new file mode 100644 index 000000000..47f650382 --- /dev/null +++ b/rest/preview/model_update_installed_add_on_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateInstalledAddOnRequest struct for UpdateInstalledAddOnRequest +type UpdateInstalledAddOnRequest struct { + // Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured + Configuration map[string]interface{} `json:"Configuration,omitempty"` + // An application-defined string that uniquely identifies the resource. This value must be unique within the Account. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_update_key_request.go b/rest/preview/model_update_key_request.go new file mode 100644 index 000000000..ec53bda47 --- /dev/null +++ b/rest/preview/model_update_key_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateKeyRequest struct for UpdateKeyRequest +type UpdateKeyRequest struct { + // Provides the unique string identifier of an existing Device to become authenticated with this Key credential. + DeviceSid string `json:"DeviceSid,omitempty"` + // Provides a human readable descriptive text for this Key credential, up to 256 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/preview/model_update_model_build_request.go b/rest/preview/model_update_model_build_request.go new file mode 100644 index 000000000..04bf40fc7 --- /dev/null +++ b/rest/preview/model_update_model_build_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateModelBuildRequest struct for UpdateModelBuildRequest +type UpdateModelBuildRequest struct { + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1 + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_update_query_request.go b/rest/preview/model_update_query_request.go new file mode 100644 index 000000000..baf0de3e1 --- /dev/null +++ b/rest/preview/model_update_query_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateQueryRequest struct for UpdateQueryRequest +type UpdateQueryRequest struct { + // An optional reference to the Sample created from this query. + SampleSid string `json:"SampleSid,omitempty"` + // A string that described the query status. The values can be: pending_review, reviewed, discarded + Status string `json:"Status,omitempty"` +} diff --git a/rest/preview/model_update_rate_plan_request.go b/rest/preview/model_update_rate_plan_request.go new file mode 100644 index 000000000..45f5cf040 --- /dev/null +++ b/rest/preview/model_update_rate_plan_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRatePlanRequest struct for UpdateRatePlanRequest +type UpdateRatePlanRequest struct { + FriendlyName string `json:"FriendlyName,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/model_update_sample_request.go b/rest/preview/model_update_sample_request.go new file mode 100644 index 000000000..d0df45a12 --- /dev/null +++ b/rest/preview/model_update_sample_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSampleRequest struct for UpdateSampleRequest +type UpdateSampleRequest struct { + // An ISO language-country string of the sample. + Language string `json:"Language,omitempty"` + // The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null + SourceChannel string `json:"SourceChannel,omitempty"` + // The text example of how end-users may express this task. The sample may contain Field tag blocks. + TaggedText string `json:"TaggedText,omitempty"` +} diff --git a/rest/preview/model_update_service_request.go b/rest/preview/model_update_service_request.go new file mode 100644 index 000000000..5fae90e2a --- /dev/null +++ b/rest/preview/model_update_service_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + AclEnabled bool `json:"AclEnabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/preview/model_update_sim_request.go b/rest/preview/model_update_sim_request.go new file mode 100644 index 000000000..124355fc8 --- /dev/null +++ b/rest/preview/model_update_sim_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSimRequest struct for UpdateSimRequest +type UpdateSimRequest struct { + CallbackMethod string `json:"CallbackMethod,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + CommandsCallbackMethod string `json:"CommandsCallbackMethod,omitempty"` + CommandsCallbackUrl string `json:"CommandsCallbackUrl,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + RatePlan string `json:"RatePlan,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/preview/model_update_style_sheet_request.go b/rest/preview/model_update_style_sheet_request.go new file mode 100644 index 000000000..a6850330c --- /dev/null +++ b/rest/preview/model_update_style_sheet_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateStyleSheetRequest struct for UpdateStyleSheetRequest +type UpdateStyleSheetRequest struct { + // The JSON Style sheet string + StyleSheet map[string]interface{} `json:"StyleSheet,omitempty"` +} diff --git a/rest/preview/model_update_sync_list_item_request.go b/rest/preview/model_update_sync_list_item_request.go new file mode 100644 index 000000000..e32d9743f --- /dev/null +++ b/rest/preview/model_update_sync_list_item_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncListItemRequest struct for UpdateSyncListItemRequest +type UpdateSyncListItemRequest struct { + Data map[string]interface{} `json:"Data"` +} diff --git a/rest/preview/model_update_sync_list_permission_request.go b/rest/preview/model_update_sync_list_permission_request.go new file mode 100644 index 000000000..f75821d07 --- /dev/null +++ b/rest/preview/model_update_sync_list_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncListPermissionRequest struct for UpdateSyncListPermissionRequest +type UpdateSyncListPermissionRequest struct { + // Boolean flag specifying whether the identity can delete the Sync List. + Manage bool `json:"Manage"` + // Boolean flag specifying whether the identity can read the Sync List. + Read bool `json:"Read"` + // Boolean flag specifying whether the identity can create, update and delete Items of the Sync List. + Write bool `json:"Write"` +} diff --git a/rest/preview/model_update_sync_map_item_request.go b/rest/preview/model_update_sync_map_item_request.go new file mode 100644 index 000000000..0dc02c9bd --- /dev/null +++ b/rest/preview/model_update_sync_map_item_request.go @@ -0,0 +1,15 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncMapItemRequest struct for UpdateSyncMapItemRequest +type UpdateSyncMapItemRequest struct { + Data map[string]interface{} `json:"Data"` +} diff --git a/rest/preview/model_update_sync_map_permission_request.go b/rest/preview/model_update_sync_map_permission_request.go new file mode 100644 index 000000000..7c1ad26ca --- /dev/null +++ b/rest/preview/model_update_sync_map_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncMapPermissionRequest struct for UpdateSyncMapPermissionRequest +type UpdateSyncMapPermissionRequest struct { + // Boolean flag specifying whether the identity can delete the Sync Map. + Manage bool `json:"Manage"` + // Boolean flag specifying whether the identity can read the Sync Map. + Read bool `json:"Read"` + // Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map. + Write bool `json:"Write"` +} diff --git a/rest/preview/model_update_task_actions_request.go b/rest/preview/model_update_task_actions_request.go new file mode 100644 index 000000000..820b883eb --- /dev/null +++ b/rest/preview/model_update_task_actions_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskActionsRequest struct for UpdateTaskActionsRequest +type UpdateTaskActionsRequest struct { + // The JSON actions that instruct the Assistant how to perform this task. + Actions map[string]interface{} `json:"Actions,omitempty"` +} diff --git a/rest/preview/model_update_task_request.go b/rest/preview/model_update_task_request.go new file mode 100644 index 000000000..4a88abb63 --- /dev/null +++ b/rest/preview/model_update_task_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskRequest struct for UpdateTaskRequest +type UpdateTaskRequest struct { + // A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique. + Actions map[string]interface{} `json:"Actions,omitempty"` + // User-provided HTTP endpoint where from the assistant fetches actions + ActionsUrl string `json:"ActionsUrl,omitempty"` + // A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/preview/response.go b/rest/preview/response.go new file mode 100644 index 000000000..b07de78bf --- /dev/null +++ b/rest/preview/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Preview + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/pricing/v1/.openapi-generator-ignore b/rest/pricing/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/pricing/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/pricing/v1/README.md b/rest/pricing/v1/README.md new file mode 100644 index 000000000..eb262faa8 --- /dev/null +++ b/rest/pricing/v1/README.md @@ -0,0 +1,87 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**FetchMessagingCountry**](docs/DefaultApi.md#fetchmessagingcountry) | **Get** /v1/Messaging/Countries/{IsoCountry} | +*DefaultApi* | [**FetchPhoneNumberCountry**](docs/DefaultApi.md#fetchphonenumbercountry) | **Get** /v1/PhoneNumbers/Countries/{IsoCountry} | +*DefaultApi* | [**FetchVoiceCountry**](docs/DefaultApi.md#fetchvoicecountry) | **Get** /v1/Voice/Countries/{IsoCountry} | +*DefaultApi* | [**FetchVoiceNumber**](docs/DefaultApi.md#fetchvoicenumber) | **Get** /v1/Voice/Numbers/{Number} | +*DefaultApi* | [**ListMessagingCountry**](docs/DefaultApi.md#listmessagingcountry) | **Get** /v1/Messaging/Countries | +*DefaultApi* | [**ListPhoneNumberCountry**](docs/DefaultApi.md#listphonenumbercountry) | **Get** /v1/PhoneNumbers/Countries | +*DefaultApi* | [**ListVoiceCountry**](docs/DefaultApi.md#listvoicecountry) | **Get** /v1/Voice/Countries | + + +## Documentation For Models + + - [ListMessagingCountryResponse](docs/ListMessagingCountryResponse.md) + - [ListMessagingCountryResponseMeta](docs/ListMessagingCountryResponseMeta.md) + - [ListPhoneNumberCountryResponse](docs/ListPhoneNumberCountryResponse.md) + - [ListVoiceCountryResponse](docs/ListVoiceCountryResponse.md) + - [PricingV1Messaging](docs/PricingV1Messaging.md) + - [PricingV1MessagingMessagingCountry](docs/PricingV1MessagingMessagingCountry.md) + - [PricingV1MessagingMessagingCountryInstance](docs/PricingV1MessagingMessagingCountryInstance.md) + - [PricingV1MessagingMessagingCountryInstanceInboundSmsPrices](docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md) + - [PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices](docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md) + - [PricingV1PhoneNumber](docs/PricingV1PhoneNumber.md) + - [PricingV1PhoneNumberPhoneNumberCountry](docs/PricingV1PhoneNumberPhoneNumberCountry.md) + - [PricingV1PhoneNumberPhoneNumberCountryInstance](docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md) + - [PricingV1Voice](docs/PricingV1Voice.md) + - [PricingV1VoiceVoiceCountry](docs/PricingV1VoiceVoiceCountry.md) + - [PricingV1VoiceVoiceCountryInstance](docs/PricingV1VoiceVoiceCountryInstance.md) + - [PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices](docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md) + - [PricingV1VoiceVoiceNumber](docs/PricingV1VoiceVoiceNumber.md) + - [PricingV1VoiceVoiceNumberOutboundCallPrice](docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/pricing/v1/api_default.go b/rest/pricing/v1/api_default.go new file mode 100644 index 000000000..0f6ed48a3 --- /dev/null +++ b/rest/pricing/v1/api_default.go @@ -0,0 +1,262 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://pricing.twilio.com"), + } +} + +/* +FetchMessagingCountry Method for FetchMessagingCountry + * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. +@return PricingV1MessagingMessagingCountryInstance +*/ +func (c *DefaultApiService) FetchMessagingCountry(IsoCountry string) (*PricingV1MessagingMessagingCountryInstance, error) { + path := "/v1/Messaging/Countries/{IsoCountry}" + path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV1MessagingMessagingCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchPhoneNumberCountry Method for FetchPhoneNumberCountry + * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. +@return PricingV1PhoneNumberPhoneNumberCountryInstance +*/ +func (c *DefaultApiService) FetchPhoneNumberCountry(IsoCountry string) (*PricingV1PhoneNumberPhoneNumberCountryInstance, error) { + path := "/v1/PhoneNumbers/Countries/{IsoCountry}" + path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV1PhoneNumberPhoneNumberCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVoiceCountry Method for FetchVoiceCountry + * @param IsoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. +@return PricingV1VoiceVoiceCountryInstance +*/ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV1VoiceVoiceCountryInstance, error) { + path := "/v1/Voice/Countries/{IsoCountry}" + path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV1VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVoiceNumber Method for FetchVoiceNumber + * @param Number The phone number to fetch. +@return PricingV1VoiceVoiceNumber +*/ +func (c *DefaultApiService) FetchVoiceNumber(Number string) (*PricingV1VoiceVoiceNumber, error) { + path := "/v1/Voice/Numbers/{Number}" + path = strings.Replace(path, "{"+"Number"+"}", Number, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV1VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessagingCountryParams Optional parameters for the method 'ListMessagingCountry' +type ListMessagingCountryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessagingCountry Method for ListMessagingCountry + * @param optional nil or *ListMessagingCountryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessagingCountryResponse +*/ +func (c *DefaultApiService) ListMessagingCountry(params *ListMessagingCountryParams) (*ListMessagingCountryResponse, error) { + path := "/v1/Messaging/Countries" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessagingCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListPhoneNumberCountryParams Optional parameters for the method 'ListPhoneNumberCountry' +type ListPhoneNumberCountryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListPhoneNumberCountry Method for ListPhoneNumberCountry + * @param optional nil or *ListPhoneNumberCountryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListPhoneNumberCountryResponse +*/ +func (c *DefaultApiService) ListPhoneNumberCountry(params *ListPhoneNumberCountryParams) (*ListPhoneNumberCountryResponse, error) { + path := "/v1/PhoneNumbers/Countries" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListPhoneNumberCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' +type ListVoiceCountryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVoiceCountry Method for ListVoiceCountry + * @param optional nil or *ListVoiceCountryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVoiceCountryResponse +*/ +func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { + path := "/v1/Voice/Countries" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/pricing/v1/docs/DefaultApi.md b/rest/pricing/v1/docs/DefaultApi.md new file mode 100644 index 000000000..4f870afc5 --- /dev/null +++ b/rest/pricing/v1/docs/DefaultApi.md @@ -0,0 +1,266 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchMessagingCountry**](DefaultApi.md#FetchMessagingCountry) | **Get** /v1/Messaging/Countries/{IsoCountry} | +[**FetchPhoneNumberCountry**](DefaultApi.md#FetchPhoneNumberCountry) | **Get** /v1/PhoneNumbers/Countries/{IsoCountry} | +[**FetchVoiceCountry**](DefaultApi.md#FetchVoiceCountry) | **Get** /v1/Voice/Countries/{IsoCountry} | +[**FetchVoiceNumber**](DefaultApi.md#FetchVoiceNumber) | **Get** /v1/Voice/Numbers/{Number} | +[**ListMessagingCountry**](DefaultApi.md#ListMessagingCountry) | **Get** /v1/Messaging/Countries | +[**ListPhoneNumberCountry**](DefaultApi.md#ListPhoneNumberCountry) | **Get** /v1/PhoneNumbers/Countries | +[**ListVoiceCountry**](DefaultApi.md#ListVoiceCountry) | **Get** /v1/Voice/Countries | + + + +## FetchMessagingCountry + +> PricingV1MessagingMessagingCountryInstance FetchMessagingCountry(ctx, IsoCountry) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCountry** | **string**| The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. | + +### Return type + +[**PricingV1MessagingMessagingCountryInstance**](pricing.v1.messaging.messaging_country-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchPhoneNumberCountry + +> PricingV1PhoneNumberPhoneNumberCountryInstance FetchPhoneNumberCountry(ctx, IsoCountry) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCountry** | **string**| The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. | + +### Return type + +[**PricingV1PhoneNumberPhoneNumberCountryInstance**](pricing.v1.phone_number.phone_number_country-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVoiceCountry + +> PricingV1VoiceVoiceCountryInstance FetchVoiceCountry(ctx, IsoCountry) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCountry** | **string**| The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch. | + +### Return type + +[**PricingV1VoiceVoiceCountryInstance**](pricing.v1.voice.voice_country-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVoiceNumber + +> PricingV1VoiceVoiceNumber FetchVoiceNumber(ctx, Number) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Number** | **string**| The phone number to fetch. | + +### Return type + +[**PricingV1VoiceVoiceNumber**](pricing.v1.voice.voice_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessagingCountry + +> ListMessagingCountryResponse ListMessagingCountry(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListMessagingCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessagingCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessagingCountryResponse**](ListMessagingCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPhoneNumberCountry + +> ListPhoneNumberCountryResponse ListPhoneNumberCountry(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListPhoneNumberCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListPhoneNumberCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListPhoneNumberCountryResponse**](ListPhoneNumberCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVoiceCountry + +> ListVoiceCountryResponse ListVoiceCountry(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListVoiceCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVoiceCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVoiceCountryResponse**](ListVoiceCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/pricing/v1/docs/ListMessagingCountryResponse.md b/rest/pricing/v1/docs/ListMessagingCountryResponse.md new file mode 100644 index 000000000..1c51176b3 --- /dev/null +++ b/rest/pricing/v1/docs/ListMessagingCountryResponse.md @@ -0,0 +1,12 @@ +# ListMessagingCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1MessagingMessagingCountry**](pricing.v1.messaging.messaging_country.md) | | [optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md b/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md new file mode 100644 index 000000000..291fd3768 --- /dev/null +++ b/rest/pricing/v1/docs/ListMessagingCountryResponseMeta.md @@ -0,0 +1,17 @@ +# ListMessagingCountryResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md b/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md new file mode 100644 index 000000000..bfe8574c9 --- /dev/null +++ b/rest/pricing/v1/docs/ListPhoneNumberCountryResponse.md @@ -0,0 +1,12 @@ +# ListPhoneNumberCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1PhoneNumberPhoneNumberCountry**](pricing.v1.phone_number.phone_number_country.md) | | [optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/ListVoiceCountryResponse.md b/rest/pricing/v1/docs/ListVoiceCountryResponse.md new file mode 100644 index 000000000..e9ac81ce8 --- /dev/null +++ b/rest/pricing/v1/docs/ListVoiceCountryResponse.md @@ -0,0 +1,12 @@ +# ListVoiceCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV1VoiceVoiceCountry**](pricing.v1.voice.voice_country.md) | | [optional] +**Meta** | [**ListMessagingCountryResponseMeta**](ListMessagingCountryResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1Messaging.md b/rest/pricing/v1/docs/PricingV1Messaging.md new file mode 100644 index 000000000..5aa574256 --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1Messaging.md @@ -0,0 +1,13 @@ +# PricingV1Messaging + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md new file mode 100644 index 000000000..3dce84a6d --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountry.md @@ -0,0 +1,13 @@ +# PricingV1MessagingMessagingCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md new file mode 100644 index 000000000..4ada848dc --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstance.md @@ -0,0 +1,16 @@ +# PricingV1MessagingMessagingCountryInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**InboundSmsPrices** | [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | | [optional] +**IsoCountry** | **string** | | [optional] +**OutboundSmsPrices** | [**[]PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md new file mode 100644 index 000000000..bcd80c221 --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceInboundSmsPrices.md @@ -0,0 +1,13 @@ +# PricingV1MessagingMessagingCountryInstanceInboundSmsPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] +**NumberType** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md new file mode 100644 index 000000000..4e1cfc7c1 --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices.md @@ -0,0 +1,14 @@ +# PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Carrier** | **string** | | [optional] +**Mcc** | **string** | | [optional] +**Mnc** | **string** | | [optional] +**Prices** | [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1PhoneNumber.md b/rest/pricing/v1/docs/PricingV1PhoneNumber.md new file mode 100644 index 000000000..7b6c02bb5 --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1PhoneNumber.md @@ -0,0 +1,13 @@ +# PricingV1PhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md b/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md new file mode 100644 index 000000000..3fb75a87c --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountry.md @@ -0,0 +1,13 @@ +# PricingV1PhoneNumberPhoneNumberCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md b/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md new file mode 100644 index 000000000..81422cc1d --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1PhoneNumberPhoneNumberCountryInstance.md @@ -0,0 +1,15 @@ +# PricingV1PhoneNumberPhoneNumberCountryInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**PhoneNumberPrices** | [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1Voice.md b/rest/pricing/v1/docs/PricingV1Voice.md new file mode 100644 index 000000000..f678ec79a --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1Voice.md @@ -0,0 +1,13 @@ +# PricingV1Voice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md new file mode 100644 index 000000000..955b26cef --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountry.md @@ -0,0 +1,13 @@ +# PricingV1VoiceVoiceCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md new file mode 100644 index 000000000..7c3d550ff --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstance.md @@ -0,0 +1,16 @@ +# PricingV1VoiceVoiceCountryInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**InboundCallPrices** | [**[]PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | | [optional] +**IsoCountry** | **string** | | [optional] +**OutboundPrefixPrices** | [**[]PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices**](pricing_v1_voice_voice_country_instance_outbound_prefix_prices.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md new file mode 100644 index 000000000..3211a648e --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices.md @@ -0,0 +1,14 @@ +# PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] +**FriendlyName** | **string** | | [optional] +**Prefixes** | **[]string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md b/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md new file mode 100644 index 000000000..f2306639f --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1VoiceVoiceNumber.md @@ -0,0 +1,17 @@ +# PricingV1VoiceVoiceNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**InboundCallPrice** | [**PricingV1MessagingMessagingCountryInstanceInboundSmsPrices**](pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.md) | | [optional] +**IsoCountry** | **string** | | [optional] +**Number** | **string** | | [optional] +**OutboundCallPrice** | [**PricingV1VoiceVoiceNumberOutboundCallPrice**](pricing_v1_voice_voice_number_outbound_call_price.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md b/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md new file mode 100644 index 000000000..4bc8f776a --- /dev/null +++ b/rest/pricing/v1/docs/PricingV1VoiceVoiceNumberOutboundCallPrice.md @@ -0,0 +1,12 @@ +# PricingV1VoiceVoiceNumberOutboundCallPrice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v1/model_list_messaging_country_response.go b/rest/pricing/v1/model_list_messaging_country_response.go new file mode 100644 index 000000000..8ef9b8eda --- /dev/null +++ b/rest/pricing/v1/model_list_messaging_country_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessagingCountryResponse struct for ListMessagingCountryResponse +type ListMessagingCountryResponse struct { + Countries []PricingV1MessagingMessagingCountry `json:"Countries,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/pricing/v1/model_list_messaging_country_response_meta.go b/rest/pricing/v1/model_list_messaging_country_response_meta.go new file mode 100644 index 000000000..cf1a13504 --- /dev/null +++ b/rest/pricing/v1/model_list_messaging_country_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessagingCountryResponseMeta struct for ListMessagingCountryResponseMeta +type ListMessagingCountryResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_list_phone_number_country_response.go b/rest/pricing/v1/model_list_phone_number_country_response.go new file mode 100644 index 000000000..d81d3b2ff --- /dev/null +++ b/rest/pricing/v1/model_list_phone_number_country_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListPhoneNumberCountryResponse struct for ListPhoneNumberCountryResponse +type ListPhoneNumberCountryResponse struct { + Countries []PricingV1PhoneNumberPhoneNumberCountry `json:"Countries,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/pricing/v1/model_list_voice_country_response.go b/rest/pricing/v1/model_list_voice_country_response.go new file mode 100644 index 000000000..89750c244 --- /dev/null +++ b/rest/pricing/v1/model_list_voice_country_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVoiceCountryResponse struct for ListVoiceCountryResponse +type ListVoiceCountryResponse struct { + Countries []PricingV1VoiceVoiceCountry `json:"Countries,omitempty"` + Meta ListMessagingCountryResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_messaging.go b/rest/pricing/v1/model_pricing_v1_messaging.go new file mode 100644 index 000000000..48a2fc633 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_messaging.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1Messaging struct for PricingV1Messaging +type PricingV1Messaging struct { + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go new file mode 100644 index 000000000..e8204bd4b --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1MessagingMessagingCountry struct for PricingV1MessagingMessagingCountry +type PricingV1MessagingMessagingCountry struct { + Country string `json:"Country,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go new file mode 100644 index 000000000..bf5bf0b10 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance.go @@ -0,0 +1,20 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1MessagingMessagingCountryInstance struct for PricingV1MessagingMessagingCountryInstance +type PricingV1MessagingMessagingCountryInstance struct { + Country string `json:"Country,omitempty"` + InboundSmsPrices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"InboundSmsPrices,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + OutboundSmsPrices []PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices `json:"OutboundSmsPrices,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go new file mode 100644 index 000000000..501c107c3 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_inbound_sms_prices.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceInboundSmsPrices +type PricingV1MessagingMessagingCountryInstanceInboundSmsPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go new file mode 100644 index 000000000..a8d1530c3 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_messaging_messaging_country_instance_outbound_sms_prices.go @@ -0,0 +1,18 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct for PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices +type PricingV1MessagingMessagingCountryInstanceOutboundSmsPrices struct { + Carrier string `json:"Carrier,omitempty"` + Mcc string `json:"Mcc,omitempty"` + Mnc string `json:"Mnc,omitempty"` + Prices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"Prices,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_phone_number.go b/rest/pricing/v1/model_pricing_v1_phone_number.go new file mode 100644 index 000000000..6cdd4c93b --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_phone_number.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1PhoneNumber struct for PricingV1PhoneNumber +type PricingV1PhoneNumber struct { + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go b/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go new file mode 100644 index 000000000..55739a0e1 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1PhoneNumberPhoneNumberCountry struct for PricingV1PhoneNumberPhoneNumberCountry +type PricingV1PhoneNumberPhoneNumberCountry struct { + Country string `json:"Country,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go b/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go new file mode 100644 index 000000000..c6621f917 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_phone_number_phone_number_country_instance.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1PhoneNumberPhoneNumberCountryInstance struct for PricingV1PhoneNumberPhoneNumberCountryInstance +type PricingV1PhoneNumberPhoneNumberCountryInstance struct { + Country string `json:"Country,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + PhoneNumberPrices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"PhoneNumberPrices,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice.go b/rest/pricing/v1/model_pricing_v1_voice.go new file mode 100644 index 000000000..13cc5bc9a --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1Voice struct for PricingV1Voice +type PricingV1Voice struct { + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice_voice_country.go b/rest/pricing/v1/model_pricing_v1_voice_voice_country.go new file mode 100644 index 000000000..559be1830 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice_voice_country.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1VoiceVoiceCountry struct for PricingV1VoiceVoiceCountry +type PricingV1VoiceVoiceCountry struct { + Country string `json:"Country,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go b/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go new file mode 100644 index 000000000..4d6630139 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance.go @@ -0,0 +1,20 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1VoiceVoiceCountryInstance struct for PricingV1VoiceVoiceCountryInstance +type PricingV1VoiceVoiceCountryInstance struct { + Country string `json:"Country,omitempty"` + InboundCallPrices []PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"InboundCallPrices,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + OutboundPrefixPrices []PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices `json:"OutboundPrefixPrices,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go b/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go new file mode 100644 index 000000000..6366adb6f --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice_voice_country_instance_outbound_prefix_prices.go @@ -0,0 +1,18 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices +type PricingV1VoiceVoiceCountryInstanceOutboundPrefixPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Prefixes []string `json:"Prefixes,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice_voice_number.go b/rest/pricing/v1/model_pricing_v1_voice_voice_number.go new file mode 100644 index 000000000..a51327345 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice_voice_number.go @@ -0,0 +1,21 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1VoiceVoiceNumber struct for PricingV1VoiceVoiceNumber +type PricingV1VoiceVoiceNumber struct { + Country string `json:"Country,omitempty"` + InboundCallPrice PricingV1MessagingMessagingCountryInstanceInboundSmsPrices `json:"InboundCallPrice,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Number string `json:"Number,omitempty"` + OutboundCallPrice PricingV1VoiceVoiceNumberOutboundCallPrice `json:"OutboundCallPrice,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go b/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go new file mode 100644 index 000000000..0a8833eb3 --- /dev/null +++ b/rest/pricing/v1/model_pricing_v1_voice_voice_number_outbound_call_price.go @@ -0,0 +1,16 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV1VoiceVoiceNumberOutboundCallPrice struct for PricingV1VoiceVoiceNumberOutboundCallPrice +type PricingV1VoiceVoiceNumberOutboundCallPrice struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` +} diff --git a/rest/pricing/v1/response.go b/rest/pricing/v1/response.go new file mode 100644 index 000000000..fa78517e6 --- /dev/null +++ b/rest/pricing/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/pricing/v2/.openapi-generator-ignore b/rest/pricing/v2/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/pricing/v2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/pricing/v2/README.md b/rest/pricing/v2/README.md new file mode 100644 index 000000000..f01b0e3a5 --- /dev/null +++ b/rest/pricing/v2/README.md @@ -0,0 +1,74 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**FetchVoiceCountry**](docs/DefaultApi.md#fetchvoicecountry) | **Get** /v2/Voice/Countries/{IsoCountry} | +*DefaultApi* | [**FetchVoiceNumber**](docs/DefaultApi.md#fetchvoicenumber) | **Get** /v2/Voice/Numbers/{DestinationNumber} | +*DefaultApi* | [**ListVoiceCountry**](docs/DefaultApi.md#listvoicecountry) | **Get** /v2/Voice/Countries | + + +## Documentation For Models + + - [ListVoiceCountryResponse](docs/ListVoiceCountryResponse.md) + - [ListVoiceCountryResponseMeta](docs/ListVoiceCountryResponseMeta.md) + - [PricingV2Voice](docs/PricingV2Voice.md) + - [PricingV2VoiceVoiceCountry](docs/PricingV2VoiceVoiceCountry.md) + - [PricingV2VoiceVoiceCountryInstance](docs/PricingV2VoiceVoiceCountryInstance.md) + - [PricingV2VoiceVoiceCountryInstanceInboundCallPrices](docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md) + - [PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices](docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md) + - [PricingV2VoiceVoiceNumber](docs/PricingV2VoiceVoiceNumber.md) + - [PricingV2VoiceVoiceNumberOutboundCallPrices](docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/pricing/v2/api_default.go b/rest/pricing/v2/api_default.go new file mode 100644 index 000000000..ac3147b0a --- /dev/null +++ b/rest/pricing/v2/api_default.go @@ -0,0 +1,139 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://pricing.twilio.com"), + } +} + +/* +FetchVoiceCountry Method for FetchVoiceCountry +Fetch a specific Country. + * @param IsoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch. +@return PricingV2VoiceVoiceCountryInstance +*/ +func (c *DefaultApiService) FetchVoiceCountry(IsoCountry string) (*PricingV2VoiceVoiceCountryInstance, error) { + path := "/v2/Voice/Countries/{IsoCountry}" + path = strings.Replace(path, "{"+"IsoCountry"+"}", IsoCountry, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV2VoiceVoiceCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchVoiceNumberParams Optional parameters for the method 'FetchVoiceNumber' +type FetchVoiceNumberParams struct { + OriginationNumber *string `json:"OriginationNumber,omitempty"` +} + +/* +FetchVoiceNumber Method for FetchVoiceNumber +Fetch pricing information for a specific destination and, optionally, origination phone number. + * @param DestinationNumber The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. + * @param optional nil or *FetchVoiceNumberOpts - Optional Parameters: + * @param "OriginationNumber" (string) - The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. +@return PricingV2VoiceVoiceNumber +*/ +func (c *DefaultApiService) FetchVoiceNumber(DestinationNumber string, params *FetchVoiceNumberParams) (*PricingV2VoiceVoiceNumber, error) { + path := "/v2/Voice/Numbers/{DestinationNumber}" + path = strings.Replace(path, "{"+"DestinationNumber"+"}", DestinationNumber, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.OriginationNumber != nil { + data.Set("OriginationNumber", *params.OriginationNumber) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &PricingV2VoiceVoiceNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVoiceCountryParams Optional parameters for the method 'ListVoiceCountry' +type ListVoiceCountryParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVoiceCountry Method for ListVoiceCountry + * @param optional nil or *ListVoiceCountryOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVoiceCountryResponse +*/ +func (c *DefaultApiService) ListVoiceCountry(params *ListVoiceCountryParams) (*ListVoiceCountryResponse, error) { + path := "/v2/Voice/Countries" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVoiceCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/pricing/v2/docs/DefaultApi.md b/rest/pricing/v2/docs/DefaultApi.md new file mode 100644 index 000000000..d373bcadd --- /dev/null +++ b/rest/pricing/v2/docs/DefaultApi.md @@ -0,0 +1,131 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FetchVoiceCountry**](DefaultApi.md#FetchVoiceCountry) | **Get** /v2/Voice/Countries/{IsoCountry} | +[**FetchVoiceNumber**](DefaultApi.md#FetchVoiceNumber) | **Get** /v2/Voice/Numbers/{DestinationNumber} | +[**ListVoiceCountry**](DefaultApi.md#ListVoiceCountry) | **Get** /v2/Voice/Countries | + + + +## FetchVoiceCountry + +> PricingV2VoiceVoiceCountryInstance FetchVoiceCountry(ctx, IsoCountry) + + + +Fetch a specific Country. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCountry** | **string**| The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch. | + +### Return type + +[**PricingV2VoiceVoiceCountryInstance**](pricing.v2.voice.voice_country-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVoiceNumber + +> PricingV2VoiceVoiceNumber FetchVoiceNumber(ctx, DestinationNumber, optional) + + + +Fetch pricing information for a specific destination and, optionally, origination phone number. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DestinationNumber** | **string**| The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. | + **optional** | ***FetchVoiceNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchVoiceNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **OriginationNumber** | **optional.String**| The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number. | + +### Return type + +[**PricingV2VoiceVoiceNumber**](pricing.v2.voice.voice_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVoiceCountry + +> ListVoiceCountryResponse ListVoiceCountry(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListVoiceCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVoiceCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVoiceCountryResponse**](ListVoiceCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/pricing/v2/docs/ListVoiceCountryResponse.md b/rest/pricing/v2/docs/ListVoiceCountryResponse.md new file mode 100644 index 000000000..fe4438c22 --- /dev/null +++ b/rest/pricing/v2/docs/ListVoiceCountryResponse.md @@ -0,0 +1,12 @@ +# ListVoiceCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Countries** | [**[]PricingV2VoiceVoiceCountry**](pricing.v2.voice.voice_country.md) | | [optional] +**Meta** | [**ListVoiceCountryResponseMeta**](ListVoiceCountryResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md b/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md new file mode 100644 index 000000000..b5afa8fb1 --- /dev/null +++ b/rest/pricing/v2/docs/ListVoiceCountryResponseMeta.md @@ -0,0 +1,17 @@ +# ListVoiceCountryResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2Voice.md b/rest/pricing/v2/docs/PricingV2Voice.md new file mode 100644 index 000000000..00a45b49c --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2Voice.md @@ -0,0 +1,13 @@ +# PricingV2Voice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md new file mode 100644 index 000000000..40cf7165a --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountry.md @@ -0,0 +1,13 @@ +# PricingV2VoiceVoiceCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md new file mode 100644 index 000000000..ea4b15d92 --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstance.md @@ -0,0 +1,16 @@ +# PricingV2VoiceVoiceCountryInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**InboundCallPrices** | [**[]PricingV2VoiceVoiceCountryInstanceInboundCallPrices**](pricing_v2_voice_voice_country_instance_inbound_call_prices.md) | | [optional] +**IsoCountry** | **string** | | [optional] +**OutboundPrefixPrices** | [**[]PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices**](pricing_v2_voice_voice_country_instance_outbound_prefix_prices.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md new file mode 100644 index 000000000..1420e1619 --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceInboundCallPrices.md @@ -0,0 +1,13 @@ +# PricingV2VoiceVoiceCountryInstanceInboundCallPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] +**NumberType** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md new file mode 100644 index 000000000..316134056 --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices.md @@ -0,0 +1,15 @@ +# PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] +**DestinationPrefixes** | **[]string** | | [optional] +**FriendlyName** | **string** | | [optional] +**OriginationPrefixes** | **[]string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md new file mode 100644 index 000000000..30c338310 --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceNumber.md @@ -0,0 +1,18 @@ +# PricingV2VoiceVoiceNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | | [optional] +**DestinationNumber** | **string** | | [optional] +**InboundCallPrice** | [**PricingV2VoiceVoiceCountryInstanceInboundCallPrices**](pricing_v2_voice_voice_country_instance_inbound_call_prices.md) | | [optional] +**IsoCountry** | **string** | | [optional] +**OriginationNumber** | **string** | | [optional] +**OutboundCallPrices** | [**[]PricingV2VoiceVoiceNumberOutboundCallPrices**](pricing_v2_voice_voice_number_outbound_call_prices.md) | | [optional] +**PriceUnit** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md b/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md new file mode 100644 index 000000000..9dd027c1a --- /dev/null +++ b/rest/pricing/v2/docs/PricingV2VoiceVoiceNumberOutboundCallPrices.md @@ -0,0 +1,13 @@ +# PricingV2VoiceVoiceNumberOutboundCallPrices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BasePrice** | **float32** | | [optional] +**CurrentPrice** | **float32** | | [optional] +**OriginationPrefixes** | **[]string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/pricing/v2/model_list_voice_country_response.go b/rest/pricing/v2/model_list_voice_country_response.go new file mode 100644 index 000000000..8a79222d1 --- /dev/null +++ b/rest/pricing/v2/model_list_voice_country_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVoiceCountryResponse struct for ListVoiceCountryResponse +type ListVoiceCountryResponse struct { + Countries []PricingV2VoiceVoiceCountry `json:"Countries,omitempty"` + Meta ListVoiceCountryResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/pricing/v2/model_list_voice_country_response_meta.go b/rest/pricing/v2/model_list_voice_country_response_meta.go new file mode 100644 index 000000000..38065404a --- /dev/null +++ b/rest/pricing/v2/model_list_voice_country_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVoiceCountryResponseMeta struct for ListVoiceCountryResponseMeta +type ListVoiceCountryResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice.go b/rest/pricing/v2/model_pricing_v2_voice.go new file mode 100644 index 000000000..7768aa3b6 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2Voice struct for PricingV2Voice +type PricingV2Voice struct { + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_country.go b/rest/pricing/v2/model_pricing_v2_voice_voice_country.go new file mode 100644 index 000000000..57b523d03 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_country.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceCountry struct for PricingV2VoiceVoiceCountry +type PricingV2VoiceVoiceCountry struct { + Country string `json:"Country,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go new file mode 100644 index 000000000..67ac86a30 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance.go @@ -0,0 +1,20 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceCountryInstance struct for PricingV2VoiceVoiceCountryInstance +type PricingV2VoiceVoiceCountryInstance struct { + Country string `json:"Country,omitempty"` + InboundCallPrices []PricingV2VoiceVoiceCountryInstanceInboundCallPrices `json:"InboundCallPrices,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + OutboundPrefixPrices []PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices `json:"OutboundPrefixPrices,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go new file mode 100644 index 000000000..1e81713b3 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_inbound_call_prices.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct for PricingV2VoiceVoiceCountryInstanceInboundCallPrices +type PricingV2VoiceVoiceCountryInstanceInboundCallPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + NumberType string `json:"NumberType,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go new file mode 100644 index 000000000..6c4021f76 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_country_instance_outbound_prefix_prices.go @@ -0,0 +1,19 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct for PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices +type PricingV2VoiceVoiceCountryInstanceOutboundPrefixPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + DestinationPrefixes []string `json:"DestinationPrefixes,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_number.go b/rest/pricing/v2/model_pricing_v2_voice_voice_number.go new file mode 100644 index 000000000..c91501a6c --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_number.go @@ -0,0 +1,22 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceNumber struct for PricingV2VoiceVoiceNumber +type PricingV2VoiceVoiceNumber struct { + Country string `json:"Country,omitempty"` + DestinationNumber string `json:"DestinationNumber,omitempty"` + InboundCallPrice PricingV2VoiceVoiceCountryInstanceInboundCallPrices `json:"InboundCallPrice,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + OriginationNumber string `json:"OriginationNumber,omitempty"` + OutboundCallPrices []PricingV2VoiceVoiceNumberOutboundCallPrices `json:"OutboundCallPrices,omitempty"` + PriceUnit string `json:"PriceUnit,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go b/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go new file mode 100644 index 000000000..93927f0a6 --- /dev/null +++ b/rest/pricing/v2/model_pricing_v2_voice_voice_number_outbound_call_prices.go @@ -0,0 +1,17 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// PricingV2VoiceVoiceNumberOutboundCallPrices struct for PricingV2VoiceVoiceNumberOutboundCallPrices +type PricingV2VoiceVoiceNumberOutboundCallPrices struct { + BasePrice float32 `json:"BasePrice,omitempty"` + CurrentPrice float32 `json:"CurrentPrice,omitempty"` + OriginationPrefixes []string `json:"OriginationPrefixes,omitempty"` +} diff --git a/rest/pricing/v2/response.go b/rest/pricing/v2/response.go new file mode 100644 index 000000000..fa78517e6 --- /dev/null +++ b/rest/pricing/v2/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Pricing + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/proxy/v1/.openapi-generator-ignore b/rest/proxy/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/proxy/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/proxy/v1/README.md b/rest/proxy/v1/README.md new file mode 100644 index 000000000..877673561 --- /dev/null +++ b/rest/proxy/v1/README.md @@ -0,0 +1,117 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateMessageInteraction**](docs/DefaultApi.md#createmessageinteraction) | **Post** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions | +*DefaultApi* | [**CreateParticipant**](docs/DefaultApi.md#createparticipant) | **Post** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants | +*DefaultApi* | [**CreatePhoneNumber**](docs/DefaultApi.md#createphonenumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateSession**](docs/DefaultApi.md#createsession) | **Post** /v1/Services/{ServiceSid}/Sessions | +*DefaultApi* | [**CreateShortCode**](docs/DefaultApi.md#createshortcode) | **Post** /v1/Services/{ServiceSid}/ShortCodes | +*DefaultApi* | [**DeleteInteraction**](docs/DefaultApi.md#deleteinteraction) | **Delete** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid} | +*DefaultApi* | [**DeleteParticipant**](docs/DefaultApi.md#deleteparticipant) | **Delete** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid} | +*DefaultApi* | [**DeletePhoneNumber**](docs/DefaultApi.md#deletephonenumber) | **Delete** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteSession**](docs/DefaultApi.md#deletesession) | **Delete** /v1/Services/{ServiceSid}/Sessions/{Sid} | +*DefaultApi* | [**DeleteShortCode**](docs/DefaultApi.md#deleteshortcode) | **Delete** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +*DefaultApi* | [**FetchInteraction**](docs/DefaultApi.md#fetchinteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid} | +*DefaultApi* | [**FetchMessageInteraction**](docs/DefaultApi.md#fetchmessageinteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid} | +*DefaultApi* | [**FetchParticipant**](docs/DefaultApi.md#fetchparticipant) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid} | +*DefaultApi* | [**FetchPhoneNumber**](docs/DefaultApi.md#fetchphonenumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchSession**](docs/DefaultApi.md#fetchsession) | **Get** /v1/Services/{ServiceSid}/Sessions/{Sid} | +*DefaultApi* | [**FetchShortCode**](docs/DefaultApi.md#fetchshortcode) | **Get** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +*DefaultApi* | [**ListInteraction**](docs/DefaultApi.md#listinteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions | +*DefaultApi* | [**ListMessageInteraction**](docs/DefaultApi.md#listmessageinteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions | +*DefaultApi* | [**ListParticipant**](docs/DefaultApi.md#listparticipant) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants | +*DefaultApi* | [**ListPhoneNumber**](docs/DefaultApi.md#listphonenumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListSession**](docs/DefaultApi.md#listsession) | **Get** /v1/Services/{ServiceSid}/Sessions | +*DefaultApi* | [**ListShortCode**](docs/DefaultApi.md#listshortcode) | **Get** /v1/Services/{ServiceSid}/ShortCodes | +*DefaultApi* | [**UpdatePhoneNumber**](docs/DefaultApi.md#updatephonenumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | +*DefaultApi* | [**UpdateSession**](docs/DefaultApi.md#updatesession) | **Post** /v1/Services/{ServiceSid}/Sessions/{Sid} | +*DefaultApi* | [**UpdateShortCode**](docs/DefaultApi.md#updateshortcode) | **Post** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | + + +## Documentation For Models + + - [CreateMessageInteractionRequest](docs/CreateMessageInteractionRequest.md) + - [CreateParticipantRequest](docs/CreateParticipantRequest.md) + - [CreatePhoneNumberRequest](docs/CreatePhoneNumberRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateSessionRequest](docs/CreateSessionRequest.md) + - [CreateShortCodeRequest](docs/CreateShortCodeRequest.md) + - [ListInteractionResponse](docs/ListInteractionResponse.md) + - [ListMessageInteractionResponse](docs/ListMessageInteractionResponse.md) + - [ListParticipantResponse](docs/ListParticipantResponse.md) + - [ListPhoneNumberResponse](docs/ListPhoneNumberResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) + - [ListSessionResponse](docs/ListSessionResponse.md) + - [ListShortCodeResponse](docs/ListShortCodeResponse.md) + - [ProxyV1Service](docs/ProxyV1Service.md) + - [ProxyV1ServicePhoneNumber](docs/ProxyV1ServicePhoneNumber.md) + - [ProxyV1ServiceSession](docs/ProxyV1ServiceSession.md) + - [ProxyV1ServiceSessionInteraction](docs/ProxyV1ServiceSessionInteraction.md) + - [ProxyV1ServiceSessionParticipant](docs/ProxyV1ServiceSessionParticipant.md) + - [ProxyV1ServiceSessionParticipantMessageInteraction](docs/ProxyV1ServiceSessionParticipantMessageInteraction.md) + - [ProxyV1ServiceShortCode](docs/ProxyV1ServiceShortCode.md) + - [UpdatePhoneNumberRequest](docs/UpdatePhoneNumberRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateSessionRequest](docs/UpdateSessionRequest.md) + - [UpdateShortCodeRequest](docs/UpdateShortCodeRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/proxy/v1/api_default.go b/rest/proxy/v1/api_default.go new file mode 100644 index 000000000..4f30f7049 --- /dev/null +++ b/rest/proxy/v1/api_default.go @@ -0,0 +1,1283 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://proxy.twilio.com"), + } +} +// CreateMessageInteractionParams Optional parameters for the method 'CreateMessageInteraction' +type CreateMessageInteractionParams struct { + Body *string `json:"Body,omitempty"` + MediaUrl *[]string `json:"MediaUrl,omitempty"` +} + +/* +CreateMessageInteraction Method for CreateMessageInteraction +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. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource. + * @param ParticipantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. + * @param optional nil or *CreateMessageInteractionOpts - Optional Parameters: + * @param "Body" (string) - The message to send to the participant + * @param "MediaUrl" ([]string) - Reserved. Not currently supported. +@return ProxyV1ServiceSessionParticipantMessageInteraction +*/ +func (c *DefaultApiService) CreateMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *CreateMessageInteractionParams) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Body != nil { + data.Set("Body", *params.Body) + } + if params != nil && params.MediaUrl != nil { + data.Set("MediaUrl", strings.Join(*params.MediaUrl, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateParticipantParams Optional parameters for the method 'CreateParticipant' +type CreateParticipantParams struct { + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Identifier *string `json:"Identifier,omitempty"` + ProxyIdentifier *string `json:"ProxyIdentifier,omitempty"` + ProxyIdentifierSid *string `json:"ProxyIdentifierSid,omitempty"` +} + +/* +CreateParticipant Method for CreateParticipant +Add a new Participant to the Session + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource. + * @param optional nil or *CreateParticipantOpts - Optional Parameters: + * @param "FailOnParticipantConflict" (bool) - [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. + * @param "FriendlyName" (string) - The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.** + * @param "Identifier" (string) - The phone number of the Participant. + * @param "ProxyIdentifier" (string) - The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. + * @param "ProxyIdentifierSid" (string) - The SID of the Proxy Identifier to assign to the Participant. +@return ProxyV1ServiceSessionParticipant +*/ +func (c *DefaultApiService) CreateParticipant(ServiceSid string, SessionSid string, params *CreateParticipantParams) (*ProxyV1ServiceSessionParticipant, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Identifier != nil { + data.Set("Identifier", *params.Identifier) + } + if params != nil && params.ProxyIdentifier != nil { + data.Set("ProxyIdentifier", *params.ProxyIdentifier) + } + if params != nil && params.ProxyIdentifierSid != nil { + data.Set("ProxyIdentifierSid", *params.ProxyIdentifierSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' +type CreatePhoneNumberParams struct { + IsReserved *bool `json:"IsReserved,omitempty"` + PhoneNumber *string `json:"PhoneNumber,omitempty"` + Sid *string `json:"Sid,omitempty"` +} + +/* +CreatePhoneNumber Method for CreatePhoneNumber +Add a Phone Number to a Service's Proxy Number Pool. + * @param ServiceSid The SID parent [Service](https://www.twilio.com/docs/proxy/api/service) resource of the new PhoneNumber resource. + * @param optional nil or *CreatePhoneNumberOpts - Optional Parameters: + * @param "IsReserved" (bool) - 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. + * @param "PhoneNumber" (string) - 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. + * @param "Sid" (string) - 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. +@return ProxyV1ServicePhoneNumber +*/ +func (c *DefaultApiService) CreatePhoneNumber(ServiceSid string, params *CreatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } + if params != nil && params.PhoneNumber != nil { + data.Set("PhoneNumber", *params.PhoneNumber) + } + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` + OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateService Method for CreateService +Create a new Service for Twilio Proxy + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "CallbackUrl" (string) - The URL we should call when the interaction status changes. + * @param "ChatInstanceSid" (string) - 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. + * @param "DefaultTtl" (int32) - 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. + * @param "GeoMatchLevel" (string) - 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. + * @param "InterceptCallbackUrl" (string) - The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. + * @param "NumberSelectionBehavior" (string) - 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. + * @param "OutOfSessionCallbackUrl" (string) - 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. + * @param "UniqueName" (string) - 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.** +@return ProxyV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ProxyV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) + } + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) + } + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) + } + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) + } + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) + } + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSessionParams Optional parameters for the method 'CreateSession' +type CreateSessionParams struct { + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Mode *string `json:"Mode,omitempty"` + Participants *[]map[string]interface{} `json:"Participants,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSession Method for CreateSession +Create a new Session + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. + * @param optional nil or *CreateSessionOpts - Optional Parameters: + * @param "DateExpiry" (time.Time) - 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. + * @param "FailOnParticipantConflict" (bool) - [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. + * @param "Mode" (string) - The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`. + * @param "Participants" ([]map[string]interface{}) - The Participant objects to include in the new session. + * @param "Status" (string) - The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create. + * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. + * @param "UniqueName" (string) - 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.** +@return ProxyV1ServiceSession +*/ +func (c *DefaultApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1ServiceSession, error) { + path := "/v1/Services/{ServiceSid}/Sessions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) + } + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) + } + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) + } + if params != nil && params.Participants != nil { + v, err := json.Marshal(params.Participants) + + if err != nil { + return nil, err + } + + data.Set("Participants", fmt.Sprint(v)) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateShortCodeParams Optional parameters for the method 'CreateShortCode' +type CreateShortCodeParams struct { + Sid *string `json:"Sid,omitempty"` +} + +/* +CreateShortCode Method for CreateShortCode +Add a Short Code to the Proxy Number Pool for the Service. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. + * @param optional nil or *CreateShortCodeOpts - Optional Parameters: + * @param "Sid" (string) - 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. +@return ProxyV1ServiceShortCode +*/ +func (c *DefaultApiService) CreateShortCode(ServiceSid string, params *CreateShortCodeParams) (*ProxyV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteInteraction Method for DeleteInteraction +Delete a specific Interaction. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to delete. +*/ +func (c *DefaultApiService) DeleteInteraction(ServiceSid string, SessionSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteParticipant Method for DeleteParticipant +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. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to delete. +*/ +func (c *DefaultApiService) DeleteParticipant(ServiceSid string, SessionSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeletePhoneNumber Method for DeletePhoneNumber +Delete a specific Phone Number from a Service. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete. +*/ +func (c *DefaultApiService) DeletePhoneNumber(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService +Delete a specific Service. + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSession Method for DeleteSession +Delete a specific Session. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. + * @param Sid The Twilio-provided string that uniquely identifies the Session resource to delete. +*/ +func (c *DefaultApiService) DeleteSession(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteShortCode Method for DeleteShortCode +Delete a specific Short Code from a Service. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource to delete the ShortCode resource from. + * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete. +*/ +func (c *DefaultApiService) DeleteShortCode(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchInteraction Method for FetchInteraction +Retrieve a list of Interactions for a given [Session](https://www.twilio.com/docs/proxy/api/session). + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Interaction resource to fetch. +@return ProxyV1ServiceSessionInteraction +*/ +func (c *DefaultApiService) FetchInteraction(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessageInteraction Method for FetchMessageInteraction + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. + * @param ParticipantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. + * @param Sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch. +@return ProxyV1ServiceSessionParticipantMessageInteraction +*/ +func (c *DefaultApiService) FetchMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, Sid string) (*ProxyV1ServiceSessionParticipantMessageInteraction, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipantMessageInteraction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchParticipant Method for FetchParticipant +Fetch a specific Participant. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Participant resource to fetch. +@return ProxyV1ServiceSessionParticipant +*/ +func (c *DefaultApiService) FetchParticipant(ServiceSid string, SessionSid string, Sid string) (*ProxyV1ServiceSessionParticipant, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSessionParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchPhoneNumber Method for FetchPhoneNumber +Fetch a specific Phone Number. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to fetch. +@return ProxyV1ServicePhoneNumber +*/ +func (c *DefaultApiService) FetchPhoneNumber(ServiceSid string, Sid string) (*ProxyV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService +Fetch a specific Service. + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to fetch. +@return ProxyV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*ProxyV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSession Method for FetchSession +Fetch a specific Session. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. + * @param Sid The Twilio-provided string that uniquely identifies the Session resource to fetch. +@return ProxyV1ServiceSession +*/ +func (c *DefaultApiService) FetchSession(ServiceSid string, Sid string) (*ProxyV1ServiceSession, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchShortCode Method for FetchShortCode +Fetch a specific Short Code. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch. +@return ProxyV1ServiceShortCode +*/ +func (c *DefaultApiService) FetchShortCode(ServiceSid string, Sid string) (*ProxyV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListInteractionParams Optional parameters for the method 'ListInteraction' +type ListInteractionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListInteraction Method for ListInteraction +Retrieve a list of all Interactions for a Session. A maximum of 100 records will be returned per page. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) to read the resources from. + * @param optional nil or *ListInteractionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListInteractionResponse +*/ +func (c *DefaultApiService) ListInteraction(ServiceSid string, SessionSid string, params *ListInteractionParams) (*ListInteractionResponse, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessageInteractionParams Optional parameters for the method 'ListMessageInteraction' +type ListMessageInteractionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessageInteraction Method for ListMessageInteraction + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) to read the resources from. + * @param ParticipantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) to read the resources from. + * @param optional nil or *ListMessageInteractionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessageInteractionResponse +*/ +func (c *DefaultApiService) ListMessageInteraction(ServiceSid string, SessionSid string, ParticipantSid string, params *ListMessageInteractionParams) (*ListMessageInteractionResponse, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessageInteractionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListParticipantParams Optional parameters for the method 'ListParticipant' +type ListParticipantParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListParticipant Method for ListParticipant +Retrieve a list of all Participants in a Session. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resources to read. + * @param SessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resources to read. + * @param optional nil or *ListParticipantOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListParticipantResponse +*/ +func (c *DefaultApiService) ListParticipant(ServiceSid string, SessionSid string, params *ListParticipantParams) (*ListParticipantResponse, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"SessionSid"+"}", SessionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' +type ListPhoneNumberParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListPhoneNumber Method for ListPhoneNumber +Retrieve a list of all Phone Numbers in the Proxy Number Pool for a Service. A maximum of 100 records will be returned per page. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resources to read. + * @param optional nil or *ListPhoneNumberOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListPhoneNumberResponse +*/ +func (c *DefaultApiService) ListPhoneNumber(ServiceSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService +Retrieve a list of all Services for Twilio Proxy. A maximum of 100 records will be returned per page. + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSessionParams Optional parameters for the method 'ListSession' +type ListSessionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSession Method for ListSession +Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to read. + * @param optional nil or *ListSessionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSessionResponse +*/ +func (c *DefaultApiService) ListSession(ServiceSid string, params *ListSessionParams) (*ListSessionResponse, error) { + path := "/v1/Services/{ServiceSid}/Sessions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListShortCodeParams Optional parameters for the method 'ListShortCode' +type ListShortCodeParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListShortCode Method for ListShortCode +Retrieve a list of all Short Codes in the Proxy Number Pool for the Service. A maximum of 100 records will be returned per page. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. + * @param optional nil or *ListShortCodeOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListShortCodeResponse +*/ +func (c *DefaultApiService) ListShortCode(ServiceSid string, params *ListShortCodeParams) (*ListShortCodeResponse, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListShortCodeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdatePhoneNumberParams Optional parameters for the method 'UpdatePhoneNumber' +type UpdatePhoneNumberParams struct { + IsReserved *bool `json:"IsReserved,omitempty"` +} + +/* +UpdatePhoneNumber Method for UpdatePhoneNumber +Update a specific Proxy Number. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to update. + * @param optional nil or *UpdatePhoneNumberOpts - Optional Parameters: + * @param "IsReserved" (bool) - 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. +@return ProxyV1ServicePhoneNumber +*/ +func (c *DefaultApiService) UpdatePhoneNumber(ServiceSid string, Sid string, params *UpdatePhoneNumberParams) (*ProxyV1ServicePhoneNumber, error) { + path := "/v1/Services/{ServiceSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServicePhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + CallbackUrl *string `json:"CallbackUrl,omitempty"` + ChatInstanceSid *string `json:"ChatInstanceSid,omitempty"` + DefaultTtl *int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel *string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl *string `json:"InterceptCallbackUrl,omitempty"` + NumberSelectionBehavior *string `json:"NumberSelectionBehavior,omitempty"` + OutOfSessionCallbackUrl *string `json:"OutOfSessionCallbackUrl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateService Method for UpdateService +Update a specific Service. + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "CallbackUrl" (string) - The URL we should call when the interaction status changes. + * @param "ChatInstanceSid" (string) - 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. + * @param "DefaultTtl" (int32) - 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. + * @param "GeoMatchLevel" (string) - 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. + * @param "InterceptCallbackUrl" (string) - The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. + * @param "NumberSelectionBehavior" (string) - 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. + * @param "OutOfSessionCallbackUrl" (string) - 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. + * @param "UniqueName" (string) - 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.** +@return ProxyV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ProxyV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.ChatInstanceSid != nil { + data.Set("ChatInstanceSid", *params.ChatInstanceSid) + } + if params != nil && params.DefaultTtl != nil { + data.Set("DefaultTtl", fmt.Sprint(*params.DefaultTtl)) + } + if params != nil && params.GeoMatchLevel != nil { + data.Set("GeoMatchLevel", *params.GeoMatchLevel) + } + if params != nil && params.InterceptCallbackUrl != nil { + data.Set("InterceptCallbackUrl", *params.InterceptCallbackUrl) + } + if params != nil && params.NumberSelectionBehavior != nil { + data.Set("NumberSelectionBehavior", *params.NumberSelectionBehavior) + } + if params != nil && params.OutOfSessionCallbackUrl != nil { + data.Set("OutOfSessionCallbackUrl", *params.OutOfSessionCallbackUrl) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSessionParams Optional parameters for the method 'UpdateSession' +type UpdateSessionParams struct { + DateExpiry *time.Time `json:"DateExpiry,omitempty"` + FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"` + Status *string `json:"Status,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSession Method for UpdateSession +Update a specific Session. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the Session resource to update. + * @param optional nil or *UpdateSessionOpts - Optional Parameters: + * @param "DateExpiry" (time.Time) - 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. + * @param "FailOnParticipantConflict" (bool) - [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. + * @param "Status" (string) - The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. + * @param "Ttl" (int32) - The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. +@return ProxyV1ServiceSession +*/ +func (c *DefaultApiService) UpdateSession(ServiceSid string, Sid string, params *UpdateSessionParams) (*ProxyV1ServiceSession, error) { + path := "/v1/Services/{ServiceSid}/Sessions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateExpiry != nil { + data.Set("DateExpiry", fmt.Sprint(*params.DateExpiry)) + } + if params != nil && params.FailOnParticipantConflict != nil { + data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict)) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceSession{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateShortCodeParams Optional parameters for the method 'UpdateShortCode' +type UpdateShortCodeParams struct { + IsReserved *bool `json:"IsReserved,omitempty"` +} + +/* +UpdateShortCode Method for UpdateShortCode +Update a specific Short Code. + * @param ServiceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update. + * @param Sid The Twilio-provided string that uniquely identifies the ShortCode resource to update. + * @param optional nil or *UpdateShortCodeOpts - Optional Parameters: + * @param "IsReserved" (bool) - 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. +@return ProxyV1ServiceShortCode +*/ +func (c *DefaultApiService) UpdateShortCode(ServiceSid string, Sid string, params *UpdateShortCodeParams) (*ProxyV1ServiceShortCode, error) { + path := "/v1/Services/{ServiceSid}/ShortCodes/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IsReserved != nil { + data.Set("IsReserved", fmt.Sprint(*params.IsReserved)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ProxyV1ServiceShortCode{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/proxy/v1/docs/CreateMessageInteractionRequest.md b/rest/proxy/v1/docs/CreateMessageInteractionRequest.md new file mode 100644 index 000000000..a3564c741 --- /dev/null +++ b/rest/proxy/v1/docs/CreateMessageInteractionRequest.md @@ -0,0 +1,12 @@ +# CreateMessageInteractionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Body** | **string** | The message to send to the participant | [optional] +**MediaUrl** | **[]string** | Reserved. Not currently supported. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/CreateParticipantRequest.md b/rest/proxy/v1/docs/CreateParticipantRequest.md new file mode 100644 index 000000000..895c1645a --- /dev/null +++ b/rest/proxy/v1/docs/CreateParticipantRequest.md @@ -0,0 +1,15 @@ +# CreateParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FailOnParticipantConflict** | **bool** | [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. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.** | [optional] +**Identifier** | **string** | The phone number of the Participant. | +**ProxyIdentifier** | **string** | The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. | [optional] +**ProxyIdentifierSid** | **string** | The SID of the Proxy Identifier to assign to the Participant. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/CreatePhoneNumberRequest.md b/rest/proxy/v1/docs/CreatePhoneNumberRequest.md new file mode 100644 index 000000000..85cb3721d --- /dev/null +++ b/rest/proxy/v1/docs/CreatePhoneNumberRequest.md @@ -0,0 +1,13 @@ +# CreatePhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsReserved** | **bool** | 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. | [optional] +**PhoneNumber** | **string** | 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. | [optional] +**Sid** | **string** | 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. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/CreateServiceRequest.md b/rest/proxy/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..509c50aac --- /dev/null +++ b/rest/proxy/v1/docs/CreateServiceRequest.md @@ -0,0 +1,18 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackUrl** | **string** | The URL we should call when the interaction status changes. | [optional] +**ChatInstanceSid** | **string** | 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. | [optional] +**DefaultTtl** | **int32** | 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. | [optional] +**GeoMatchLevel** | **string** | 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. | [optional] +**InterceptCallbackUrl** | **string** | The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. | [optional] +**NumberSelectionBehavior** | **string** | 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. | [optional] +**OutOfSessionCallbackUrl** | **string** | 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. | [optional] +**UniqueName** | **string** | 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.** | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/CreateSessionRequest.md b/rest/proxy/v1/docs/CreateSessionRequest.md new file mode 100644 index 000000000..e9bd644fd --- /dev/null +++ b/rest/proxy/v1/docs/CreateSessionRequest.md @@ -0,0 +1,17 @@ +# CreateSessionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateExpiry** | [**time.Time**](time.Time.md) | 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. | [optional] +**FailOnParticipantConflict** | **bool** | [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. | [optional] +**Mode** | **string** | The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`. | [optional] +**Participants** | **[]map[string]interface{}** | The Participant objects to include in the new session. | [optional] +**Status** | **string** | The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create. | [optional] +**Ttl** | **int32** | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. | [optional] +**UniqueName** | **string** | 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.** | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/CreateShortCodeRequest.md b/rest/proxy/v1/docs/CreateShortCodeRequest.md new file mode 100644 index 000000000..a43891d0c --- /dev/null +++ b/rest/proxy/v1/docs/CreateShortCodeRequest.md @@ -0,0 +1,11 @@ +# CreateShortCodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sid** | **string** | 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. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/DefaultApi.md b/rest/proxy/v1/docs/DefaultApi.md new file mode 100644 index 000000000..2fc6fabf5 --- /dev/null +++ b/rest/proxy/v1/docs/DefaultApi.md @@ -0,0 +1,1304 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMessageInteraction**](DefaultApi.md#CreateMessageInteraction) | **Post** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions | +[**CreateParticipant**](DefaultApi.md#CreateParticipant) | **Post** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants | +[**CreatePhoneNumber**](DefaultApi.md#CreatePhoneNumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateSession**](DefaultApi.md#CreateSession) | **Post** /v1/Services/{ServiceSid}/Sessions | +[**CreateShortCode**](DefaultApi.md#CreateShortCode) | **Post** /v1/Services/{ServiceSid}/ShortCodes | +[**DeleteInteraction**](DefaultApi.md#DeleteInteraction) | **Delete** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid} | +[**DeleteParticipant**](DefaultApi.md#DeleteParticipant) | **Delete** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid} | +[**DeletePhoneNumber**](DefaultApi.md#DeletePhoneNumber) | **Delete** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteSession**](DefaultApi.md#DeleteSession) | **Delete** /v1/Services/{ServiceSid}/Sessions/{Sid} | +[**DeleteShortCode**](DefaultApi.md#DeleteShortCode) | **Delete** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +[**FetchInteraction**](DefaultApi.md#FetchInteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid} | +[**FetchMessageInteraction**](DefaultApi.md#FetchMessageInteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions/{Sid} | +[**FetchParticipant**](DefaultApi.md#FetchParticipant) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid} | +[**FetchPhoneNumber**](DefaultApi.md#FetchPhoneNumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchSession**](DefaultApi.md#FetchSession) | **Get** /v1/Services/{ServiceSid}/Sessions/{Sid} | +[**FetchShortCode**](DefaultApi.md#FetchShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | +[**ListInteraction**](DefaultApi.md#ListInteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions | +[**ListMessageInteraction**](DefaultApi.md#ListMessageInteraction) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions | +[**ListParticipant**](DefaultApi.md#ListParticipant) | **Get** /v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants | +[**ListPhoneNumber**](DefaultApi.md#ListPhoneNumber) | **Get** /v1/Services/{ServiceSid}/PhoneNumbers | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListSession**](DefaultApi.md#ListSession) | **Get** /v1/Services/{ServiceSid}/Sessions | +[**ListShortCode**](DefaultApi.md#ListShortCode) | **Get** /v1/Services/{ServiceSid}/ShortCodes | +[**UpdatePhoneNumber**](DefaultApi.md#UpdatePhoneNumber) | **Post** /v1/Services/{ServiceSid}/PhoneNumbers/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | +[**UpdateSession**](DefaultApi.md#UpdateSession) | **Post** /v1/Services/{ServiceSid}/Sessions/{Sid} | +[**UpdateShortCode**](DefaultApi.md#UpdateShortCode) | **Post** /v1/Services/{ServiceSid}/ShortCodes/{Sid} | + + + +## CreateMessageInteraction + +> ProxyV1ServiceSessionParticipantMessageInteraction CreateMessageInteraction(ctx, ServiceSid, SessionSid, ParticipantSid, optional) + + + +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. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource. | +**ParticipantSid** | **string**| The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. | + **optional** | ***CreateMessageInteractionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessageInteractionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Body** | **optional.String**| The message to send to the participant | + **MediaUrl** | [**optional.Interface of []string**](string.md)| Reserved. Not currently supported. | + +### Return type + +[**ProxyV1ServiceSessionParticipantMessageInteraction**](proxy.v1.service.session.participant.message_interaction.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateParticipant + +> ProxyV1ServiceSessionParticipant CreateParticipant(ctx, ServiceSid, SessionSid, optional) + + + +Add a new Participant to the Session + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource. | + **optional** | ***CreateParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FailOnParticipantConflict** | **optional.Bool**| [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. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.** | + **Identifier** | **optional.String**| The phone number of the Participant. | + **ProxyIdentifier** | **optional.String**| The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. | + **ProxyIdentifierSid** | **optional.String**| The SID of the Proxy Identifier to assign to the Participant. | + +### Return type + +[**ProxyV1ServiceSessionParticipant**](proxy.v1.service.session.participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePhoneNumber + +> ProxyV1ServicePhoneNumber CreatePhoneNumber(ctx, ServiceSid, optional) + + + +Add a Phone Number to a Service's Proxy Number Pool. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID parent [Service](https://www.twilio.com/docs/proxy/api/service) resource of the new PhoneNumber resource. | + **optional** | ***CreatePhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreatePhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **IsReserved** | **optional.Bool**| 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. | + **PhoneNumber** | **optional.String**| 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. | + **Sid** | **optional.String**| 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. | + +### Return type + +[**ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> ProxyV1Service CreateService(ctx, optional) + + + +Create a new Service for Twilio Proxy + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackUrl** | **optional.String**| The URL we should call when the interaction status changes. | + **ChatInstanceSid** | **optional.String**| 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. | + **DefaultTtl** | **optional.Int32**| 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. | + **GeoMatchLevel** | **optional.String**| 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. | + **InterceptCallbackUrl** | **optional.String**| The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. | + **NumberSelectionBehavior** | **optional.String**| 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. | + **OutOfSessionCallbackUrl** | **optional.String**| 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. | + **UniqueName** | **optional.String**| 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.** | + +### Return type + +[**ProxyV1Service**](proxy.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSession + +> ProxyV1ServiceSession CreateSession(ctx, ServiceSid, optional) + + + +Create a new Session + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. | + **optional** | ***CreateSessionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSessionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DateExpiry** | **optional.Time**| 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. | + **FailOnParticipantConflict** | **optional.Bool**| [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. | + **Mode** | **optional.String**| The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`. | + **Participants** | [**optional.Interface of []map[string]interface{}**](map[string]interface{}.md)| The Participant objects to include in the new session. | + **Status** | **optional.String**| The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create. | + **Ttl** | **optional.Int32**| The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. | + **UniqueName** | **optional.String**| 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.** | + +### Return type + +[**ProxyV1ServiceSession**](proxy.v1.service.session.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateShortCode + +> ProxyV1ServiceShortCode CreateShortCode(ctx, ServiceSid, optional) + + + +Add a Short Code to the Proxy Number Pool for the Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource. | + **optional** | ***CreateShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Sid** | **optional.String**| 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. | + +### Return type + +[**ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteInteraction + +> DeleteInteraction(ctx, ServiceSid, SessionSid, Sid) + + + +Delete a specific Interaction. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Interaction resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteParticipant + +> DeleteParticipant(ctx, ServiceSid, SessionSid, Sid) + + + +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. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Participant resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePhoneNumber + +> DeletePhoneNumber(ctx, ServiceSid, Sid) + + + +Delete a specific Phone Number from a Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +Delete a specific Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSession + +> DeleteSession(ctx, ServiceSid, Sid) + + + +Delete a specific Session. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Session resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteShortCode + +> DeleteShortCode(ctx, ServiceSid, Sid) + + + +Delete a specific Short Code from a Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource to delete the ShortCode resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ShortCode resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchInteraction + +> ProxyV1ServiceSessionInteraction FetchInteraction(ctx, ServiceSid, SessionSid, Sid) + + + +Retrieve a list of Interactions for a given [Session](https://www.twilio.com/docs/proxy/api/session). + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Interaction resource to fetch. | + +### Return type + +[**ProxyV1ServiceSessionInteraction**](proxy.v1.service.session.interaction.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessageInteraction + +> ProxyV1ServiceSessionParticipantMessageInteraction FetchMessageInteraction(ctx, ServiceSid, SessionSid, ParticipantSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. | +**ParticipantSid** | **string**| The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch. | + +### Return type + +[**ProxyV1ServiceSessionParticipantMessageInteraction**](proxy.v1.service.session.participant.message_interaction.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchParticipant + +> ProxyV1ServiceSessionParticipant FetchParticipant(ctx, ServiceSid, SessionSid, Sid) + + + +Fetch a specific Participant. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Participant resource to fetch. | + +### Return type + +[**ProxyV1ServiceSessionParticipant**](proxy.v1.service.session.participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchPhoneNumber + +> ProxyV1ServicePhoneNumber FetchPhoneNumber(ctx, ServiceSid, Sid) + + + +Fetch a specific Phone Number. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PhoneNumber resource to fetch. | + +### Return type + +[**ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> ProxyV1Service FetchService(ctx, Sid) + + + +Fetch a specific Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to fetch. | + +### Return type + +[**ProxyV1Service**](proxy.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSession + +> ProxyV1ServiceSession FetchSession(ctx, ServiceSid, Sid) + + + +Fetch a specific Session. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to fetch. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Session resource to fetch. | + +### Return type + +[**ProxyV1ServiceSession**](proxy.v1.service.session.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchShortCode + +> ProxyV1ServiceShortCode FetchShortCode(ctx, ServiceSid, Sid) + + + +Fetch a specific Short Code. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ShortCode resource to fetch. | + +### Return type + +[**ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListInteraction + +> ListInteractionResponse ListInteraction(ctx, ServiceSid, SessionSid, optional) + + + +Retrieve a list of all Interactions for a Session. A maximum of 100 records will be returned per page. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) to read the resources from. | + **optional** | ***ListInteractionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListInteractionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListInteractionResponse**](ListInteractionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessageInteraction + +> ListMessageInteractionResponse ListMessageInteraction(ctx, ServiceSid, SessionSid, ParticipantSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) to read the resources from. | +**ParticipantSid** | **string**| The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) to read the resources from. | + **optional** | ***ListMessageInteractionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessageInteractionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessageInteractionResponse**](ListMessageInteractionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListParticipant + +> ListParticipantResponse ListParticipant(ctx, ServiceSid, SessionSid, optional) + + + +Retrieve a list of all Participants in a Session. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resources to read. | +**SessionSid** | **string**| The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resources to read. | + **optional** | ***ListParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListParticipantResponse**](ListParticipantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPhoneNumber + +> ListPhoneNumberResponse ListPhoneNumber(ctx, ServiceSid, optional) + + + +Retrieve a list of all Phone Numbers in the Proxy Number Pool for a Service. A maximum of 100 records will be returned per page. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resources to read. | + **optional** | ***ListPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListPhoneNumberResponse**](ListPhoneNumberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +Retrieve a list of all Services for Twilio Proxy. A maximum of 100 records will be returned per page. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSession + +> ListSessionResponse ListSession(ctx, ServiceSid, optional) + + + +Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to read. | + **optional** | ***ListSessionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSessionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSessionResponse**](ListSessionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListShortCode + +> ListShortCodeResponse ListShortCode(ctx, ServiceSid, optional) + + + +Retrieve a list of all Short Codes in the Proxy Number Pool for the Service. A maximum of 100 records will be returned per page. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) to read the resources from. | + **optional** | ***ListShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListShortCodeResponse**](ListShortCodeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePhoneNumber + +> ProxyV1ServicePhoneNumber UpdatePhoneNumber(ctx, ServiceSid, Sid, optional) + + + +Update a specific Proxy Number. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the PhoneNumber resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the PhoneNumber resource to update. | + **optional** | ***UpdatePhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdatePhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IsReserved** | **optional.Bool**| 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. | + +### Return type + +[**ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ProxyV1Service UpdateService(ctx, Sid, optional) + + + +Update a specific Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CallbackUrl** | **optional.String**| The URL we should call when the interaction status changes. | + **ChatInstanceSid** | **optional.String**| 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. | + **DefaultTtl** | **optional.Int32**| 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. | + **GeoMatchLevel** | **optional.String**| 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. | + **InterceptCallbackUrl** | **optional.String**| The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. | + **NumberSelectionBehavior** | **optional.String**| 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. | + **OutOfSessionCallbackUrl** | **optional.String**| 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. | + **UniqueName** | **optional.String**| 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.** | + +### Return type + +[**ProxyV1Service**](proxy.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSession + +> ProxyV1ServiceSession UpdateSession(ctx, ServiceSid, Sid, optional) + + + +Update a specific Session. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Session resource to update. | + **optional** | ***UpdateSessionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSessionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DateExpiry** | **optional.Time**| 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. | + **FailOnParticipantConflict** | **optional.Bool**| [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. | + **Status** | **optional.String**| The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. | + **Ttl** | **optional.Int32**| The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. | + +### Return type + +[**ProxyV1ServiceSession**](proxy.v1.service.session.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateShortCode + +> ProxyV1ServiceShortCode UpdateShortCode(ctx, ServiceSid, Sid, optional) + + + +Update a specific Short Code. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to update. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the ShortCode resource to update. | + **optional** | ***UpdateShortCodeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateShortCodeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IsReserved** | **optional.Bool**| 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. | + +### Return type + +[**ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/proxy/v1/docs/ListInteractionResponse.md b/rest/proxy/v1/docs/ListInteractionResponse.md new file mode 100644 index 000000000..0c9835745 --- /dev/null +++ b/rest/proxy/v1/docs/ListInteractionResponse.md @@ -0,0 +1,12 @@ +# ListInteractionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interactions** | [**[]ProxyV1ServiceSessionInteraction**](proxy.v1.service.session.interaction.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListMessageInteractionResponse.md b/rest/proxy/v1/docs/ListMessageInteractionResponse.md new file mode 100644 index 000000000..152ba6bf2 --- /dev/null +++ b/rest/proxy/v1/docs/ListMessageInteractionResponse.md @@ -0,0 +1,12 @@ +# ListMessageInteractionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interactions** | [**[]ProxyV1ServiceSessionParticipantMessageInteraction**](proxy.v1.service.session.participant.message_interaction.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListParticipantResponse.md b/rest/proxy/v1/docs/ListParticipantResponse.md new file mode 100644 index 000000000..f0b993694 --- /dev/null +++ b/rest/proxy/v1/docs/ListParticipantResponse.md @@ -0,0 +1,12 @@ +# ListParticipantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Participants** | [**[]ProxyV1ServiceSessionParticipant**](proxy.v1.service.session.participant.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListPhoneNumberResponse.md b/rest/proxy/v1/docs/ListPhoneNumberResponse.md new file mode 100644 index 000000000..7a682c41c --- /dev/null +++ b/rest/proxy/v1/docs/ListPhoneNumberResponse.md @@ -0,0 +1,12 @@ +# ListPhoneNumberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**PhoneNumbers** | [**[]ProxyV1ServicePhoneNumber**](proxy.v1.service.phone_number.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListServiceResponse.md b/rest/proxy/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..acfc0e749 --- /dev/null +++ b/rest/proxy/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Services** | [**[]ProxyV1Service**](proxy.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListServiceResponseMeta.md b/rest/proxy/v1/docs/ListServiceResponseMeta.md new file mode 100644 index 000000000..010bc7d70 --- /dev/null +++ b/rest/proxy/v1/docs/ListServiceResponseMeta.md @@ -0,0 +1,17 @@ +# ListServiceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListSessionResponse.md b/rest/proxy/v1/docs/ListSessionResponse.md new file mode 100644 index 000000000..c6cb2e541 --- /dev/null +++ b/rest/proxy/v1/docs/ListSessionResponse.md @@ -0,0 +1,12 @@ +# ListSessionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Sessions** | [**[]ProxyV1ServiceSession**](proxy.v1.service.session.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ListShortCodeResponse.md b/rest/proxy/v1/docs/ListShortCodeResponse.md new file mode 100644 index 000000000..7b95c06e5 --- /dev/null +++ b/rest/proxy/v1/docs/ListShortCodeResponse.md @@ -0,0 +1,12 @@ +# ListShortCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**ShortCodes** | [**[]ProxyV1ServiceShortCode**](proxy.v1.service.short_code.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1Service.md b/rest/proxy/v1/docs/ProxyV1Service.md new file mode 100644 index 000000000..b64df70ca --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1Service.md @@ -0,0 +1,24 @@ +# ProxyV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CallbackUrl** | **string** | | [optional] +**ChatInstanceSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultTtl** | **int32** | | [optional] +**GeoMatchLevel** | **string** | | [optional] +**InterceptCallbackUrl** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**NumberSelectionBehavior** | **string** | | [optional] +**OutOfSessionCallbackUrl** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md b/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md new file mode 100644 index 000000000..582e1a2aa --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServicePhoneNumber.md @@ -0,0 +1,22 @@ +# ProxyV1ServicePhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**InUse** | **int32** | | [optional] +**IsReserved** | **bool** | | [optional] +**IsoCountry** | **string** | | [optional] +**PhoneNumber** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServiceSession.md b/rest/proxy/v1/docs/ProxyV1ServiceSession.md new file mode 100644 index 000000000..3d2acb4ca --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServiceSession.md @@ -0,0 +1,26 @@ +# ProxyV1ServiceSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ClosedReason** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateEnded** | [**time.Time**](time.Time.md) | | [optional] +**DateExpiry** | [**time.Time**](time.Time.md) | | [optional] +**DateLastInteraction** | [**time.Time**](time.Time.md) | | [optional] +**DateStarted** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Mode** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Ttl** | **int32** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md b/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md new file mode 100644 index 000000000..32d33c8c1 --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServiceSessionInteraction.md @@ -0,0 +1,29 @@ +# ProxyV1ServiceSessionInteraction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Data** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**InboundParticipantSid** | **string** | | [optional] +**InboundResourceSid** | **string** | | [optional] +**InboundResourceStatus** | **string** | | [optional] +**InboundResourceType** | **string** | | [optional] +**InboundResourceUrl** | **string** | | [optional] +**OutboundParticipantSid** | **string** | | [optional] +**OutboundResourceSid** | **string** | | [optional] +**OutboundResourceStatus** | **string** | | [optional] +**OutboundResourceType** | **string** | | [optional] +**OutboundResourceUrl** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**SessionSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md b/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md new file mode 100644 index 000000000..e6c12193b --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipant.md @@ -0,0 +1,23 @@ +# ProxyV1ServiceSessionParticipant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateDeleted** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Identifier** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ProxyIdentifier** | **string** | | [optional] +**ProxyIdentifierSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**SessionSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md b/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md new file mode 100644 index 000000000..cc4e0d44b --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServiceSessionParticipantMessageInteraction.md @@ -0,0 +1,30 @@ +# ProxyV1ServiceSessionParticipantMessageInteraction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Data** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**InboundParticipantSid** | **string** | | [optional] +**InboundResourceSid** | **string** | | [optional] +**InboundResourceStatus** | **string** | | [optional] +**InboundResourceType** | **string** | | [optional] +**InboundResourceUrl** | **string** | | [optional] +**OutboundParticipantSid** | **string** | | [optional] +**OutboundResourceSid** | **string** | | [optional] +**OutboundResourceStatus** | **string** | | [optional] +**OutboundResourceType** | **string** | | [optional] +**OutboundResourceUrl** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**SessionSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md b/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md new file mode 100644 index 000000000..2a046da1b --- /dev/null +++ b/rest/proxy/v1/docs/ProxyV1ServiceShortCode.md @@ -0,0 +1,20 @@ +# ProxyV1ServiceShortCode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**IsReserved** | **bool** | | [optional] +**IsoCountry** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**ShortCode** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/UpdatePhoneNumberRequest.md b/rest/proxy/v1/docs/UpdatePhoneNumberRequest.md new file mode 100644 index 000000000..526a8b03f --- /dev/null +++ b/rest/proxy/v1/docs/UpdatePhoneNumberRequest.md @@ -0,0 +1,11 @@ +# UpdatePhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsReserved** | **bool** | 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. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/UpdateServiceRequest.md b/rest/proxy/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..b04108447 --- /dev/null +++ b/rest/proxy/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,18 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackUrl** | **string** | The URL we should call when the interaction status changes. | [optional] +**ChatInstanceSid** | **string** | 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. | [optional] +**DefaultTtl** | **int32** | 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. | [optional] +**GeoMatchLevel** | **string** | 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. | [optional] +**InterceptCallbackUrl** | **string** | The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues. | [optional] +**NumberSelectionBehavior** | **string** | 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. | [optional] +**OutOfSessionCallbackUrl** | **string** | 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. | [optional] +**UniqueName** | **string** | 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.** | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/UpdateSessionRequest.md b/rest/proxy/v1/docs/UpdateSessionRequest.md new file mode 100644 index 000000000..fcc64ba07 --- /dev/null +++ b/rest/proxy/v1/docs/UpdateSessionRequest.md @@ -0,0 +1,14 @@ +# UpdateSessionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateExpiry** | [**time.Time**](time.Time.md) | 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. | [optional] +**FailOnParticipantConflict** | **bool** | [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. | [optional] +**Status** | **string** | The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session. | [optional] +**Ttl** | **int32** | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/docs/UpdateShortCodeRequest.md b/rest/proxy/v1/docs/UpdateShortCodeRequest.md new file mode 100644 index 000000000..4c6f151aa --- /dev/null +++ b/rest/proxy/v1/docs/UpdateShortCodeRequest.md @@ -0,0 +1,11 @@ +# UpdateShortCodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsReserved** | **bool** | 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. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/proxy/v1/model_create_message_interaction_request.go b/rest/proxy/v1/model_create_message_interaction_request.go new file mode 100644 index 000000000..b6c2a87a8 --- /dev/null +++ b/rest/proxy/v1/model_create_message_interaction_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMessageInteractionRequest struct for CreateMessageInteractionRequest +type CreateMessageInteractionRequest struct { + // The message to send to the participant + Body string `json:"Body,omitempty"` + // Reserved. Not currently supported. + MediaUrl []string `json:"MediaUrl,omitempty"` +} diff --git a/rest/proxy/v1/model_create_participant_request.go b/rest/proxy/v1/model_create_participant_request.go new file mode 100644 index 000000000..4e41089e7 --- /dev/null +++ b/rest/proxy/v1/model_create_participant_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateParticipantRequest struct for CreateParticipantRequest +type CreateParticipantRequest 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"` + // 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"` +} diff --git a/rest/proxy/v1/model_create_phone_number_request.go b/rest/proxy/v1/model_create_phone_number_request.go new file mode 100644 index 000000000..392f514da --- /dev/null +++ b/rest/proxy/v1/model_create_phone_number_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreatePhoneNumberRequest struct for CreatePhoneNumberRequest +type CreatePhoneNumberRequest 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"` +} diff --git a/rest/proxy/v1/model_create_service_request.go b/rest/proxy/v1/model_create_service_request.go new file mode 100644 index 000000000..a54a4faea --- /dev/null +++ b/rest/proxy/v1/model_create_service_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest 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 int32 `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"` +} diff --git a/rest/proxy/v1/model_create_session_request.go b/rest/proxy/v1/model_create_session_request.go new file mode 100644 index 000000000..7a3cd20f5 --- /dev/null +++ b/rest/proxy/v1/model_create_session_request.go @@ -0,0 +1,31 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateSessionRequest struct for CreateSessionRequest +type CreateSessionRequest 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 int32 `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"` +} diff --git a/rest/proxy/v1/model_create_short_code_request.go b/rest/proxy/v1/model_create_short_code_request.go new file mode 100644 index 000000000..1d4d7c57c --- /dev/null +++ b/rest/proxy/v1/model_create_short_code_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateShortCodeRequest struct for CreateShortCodeRequest +type CreateShortCodeRequest 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"` +} diff --git a/rest/proxy/v1/model_list_interaction_response.go b/rest/proxy/v1/model_list_interaction_response.go new file mode 100644 index 000000000..09ba69d85 --- /dev/null +++ b/rest/proxy/v1/model_list_interaction_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListInteractionResponse struct for ListInteractionResponse +type ListInteractionResponse struct { + Interactions []ProxyV1ServiceSessionInteraction `json:"Interactions,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/proxy/v1/model_list_message_interaction_response.go b/rest/proxy/v1/model_list_message_interaction_response.go new file mode 100644 index 000000000..e3b8dc43d --- /dev/null +++ b/rest/proxy/v1/model_list_message_interaction_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessageInteractionResponse struct for ListMessageInteractionResponse +type ListMessageInteractionResponse struct { + Interactions []ProxyV1ServiceSessionParticipantMessageInteraction `json:"Interactions,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/proxy/v1/model_list_participant_response.go b/rest/proxy/v1/model_list_participant_response.go new file mode 100644 index 000000000..94044fc99 --- /dev/null +++ b/rest/proxy/v1/model_list_participant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListParticipantResponse struct for ListParticipantResponse +type ListParticipantResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Participants []ProxyV1ServiceSessionParticipant `json:"Participants,omitempty"` +} diff --git a/rest/proxy/v1/model_list_phone_number_response.go b/rest/proxy/v1/model_list_phone_number_response.go new file mode 100644 index 000000000..0df625d57 --- /dev/null +++ b/rest/proxy/v1/model_list_phone_number_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListPhoneNumberResponse struct for ListPhoneNumberResponse +type ListPhoneNumberResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + PhoneNumbers []ProxyV1ServicePhoneNumber `json:"PhoneNumbers,omitempty"` +} diff --git a/rest/proxy/v1/model_list_service_response.go b/rest/proxy/v1/model_list_service_response.go new file mode 100644 index 000000000..7ee1f6ff4 --- /dev/null +++ b/rest/proxy/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ProxyV1Service `json:"Services,omitempty"` +} diff --git a/rest/proxy/v1/model_list_service_response_meta.go b/rest/proxy/v1/model_list_service_response_meta.go new file mode 100644 index 000000000..1988a13ba --- /dev/null +++ b/rest/proxy/v1/model_list_service_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponseMeta struct for ListServiceResponseMeta +type ListServiceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_list_session_response.go b/rest/proxy/v1/model_list_session_response.go new file mode 100644 index 000000000..9c95444b6 --- /dev/null +++ b/rest/proxy/v1/model_list_session_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSessionResponse struct for ListSessionResponse +type ListSessionResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Sessions []ProxyV1ServiceSession `json:"Sessions,omitempty"` +} diff --git a/rest/proxy/v1/model_list_short_code_response.go b/rest/proxy/v1/model_list_short_code_response.go new file mode 100644 index 000000000..c351314a8 --- /dev/null +++ b/rest/proxy/v1/model_list_short_code_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListShortCodeResponse struct for ListShortCodeResponse +type ListShortCodeResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + ShortCodes []ProxyV1ServiceShortCode `json:"ShortCodes,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service.go b/rest/proxy/v1/model_proxy_v1_service.go new file mode 100644 index 000000000..9e63f4333 --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service.go @@ -0,0 +1,31 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1Service struct for ProxyV1Service +type ProxyV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + CallbackUrl string `json:"CallbackUrl,omitempty"` + ChatInstanceSid string `json:"ChatInstanceSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultTtl int32 `json:"DefaultTtl,omitempty"` + GeoMatchLevel string `json:"GeoMatchLevel,omitempty"` + InterceptCallbackUrl string `json:"InterceptCallbackUrl,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + NumberSelectionBehavior string `json:"NumberSelectionBehavior,omitempty"` + OutOfSessionCallbackUrl string `json:"OutOfSessionCallbackUrl,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_phone_number.go b/rest/proxy/v1/model_proxy_v1_service_phone_number.go new file mode 100644 index 000000000..8a34f9ed9 --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_phone_number.go @@ -0,0 +1,29 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServicePhoneNumber struct for ProxyV1ServicePhoneNumber +type ProxyV1ServicePhoneNumber struct { + AccountSid string `json:"AccountSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InUse int32 `json:"InUse,omitempty"` + IsReserved bool `json:"IsReserved,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_session.go b/rest/proxy/v1/model_proxy_v1_service_session.go new file mode 100644 index 000000000..56190a256 --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_session.go @@ -0,0 +1,33 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServiceSession struct for ProxyV1ServiceSession +type ProxyV1ServiceSession struct { + AccountSid string `json:"AccountSid,omitempty"` + ClosedReason string `json:"ClosedReason,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateEnded time.Time `json:"DateEnded,omitempty"` + DateExpiry time.Time `json:"DateExpiry,omitempty"` + DateLastInteraction time.Time `json:"DateLastInteraction,omitempty"` + DateStarted time.Time `json:"DateStarted,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Mode string `json:"Mode,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Ttl int32 `json:"Ttl,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_session_interaction.go b/rest/proxy/v1/model_proxy_v1_service_session_interaction.go new file mode 100644 index 000000000..a65fb0f2d --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_session_interaction.go @@ -0,0 +1,36 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServiceSessionInteraction struct for ProxyV1ServiceSessionInteraction +type ProxyV1ServiceSessionInteraction struct { + AccountSid string `json:"AccountSid,omitempty"` + Data string `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + InboundParticipantSid string `json:"InboundParticipantSid,omitempty"` + InboundResourceSid string `json:"InboundResourceSid,omitempty"` + InboundResourceStatus string `json:"InboundResourceStatus,omitempty"` + InboundResourceType string `json:"InboundResourceType,omitempty"` + InboundResourceUrl string `json:"InboundResourceUrl,omitempty"` + OutboundParticipantSid string `json:"OutboundParticipantSid,omitempty"` + OutboundResourceSid string `json:"OutboundResourceSid,omitempty"` + OutboundResourceStatus string `json:"OutboundResourceStatus,omitempty"` + OutboundResourceType string `json:"OutboundResourceType,omitempty"` + OutboundResourceUrl string `json:"OutboundResourceUrl,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + SessionSid string `json:"SessionSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_session_participant.go b/rest/proxy/v1/model_proxy_v1_service_session_participant.go new file mode 100644 index 000000000..3fc72fdaa --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_session_participant.go @@ -0,0 +1,30 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServiceSessionParticipant struct for ProxyV1ServiceSessionParticipant +type ProxyV1ServiceSessionParticipant struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateDeleted time.Time `json:"DateDeleted,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identifier string `json:"Identifier,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ProxyIdentifier string `json:"ProxyIdentifier,omitempty"` + ProxyIdentifierSid string `json:"ProxyIdentifierSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + SessionSid string `json:"SessionSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go b/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go new file mode 100644 index 000000000..a5c821bc3 --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_session_participant_message_interaction.go @@ -0,0 +1,37 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServiceSessionParticipantMessageInteraction struct for ProxyV1ServiceSessionParticipantMessageInteraction +type ProxyV1ServiceSessionParticipantMessageInteraction struct { + AccountSid string `json:"AccountSid,omitempty"` + Data string `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + InboundParticipantSid string `json:"InboundParticipantSid,omitempty"` + InboundResourceSid string `json:"InboundResourceSid,omitempty"` + InboundResourceStatus string `json:"InboundResourceStatus,omitempty"` + InboundResourceType string `json:"InboundResourceType,omitempty"` + InboundResourceUrl string `json:"InboundResourceUrl,omitempty"` + OutboundParticipantSid string `json:"OutboundParticipantSid,omitempty"` + OutboundResourceSid string `json:"OutboundResourceSid,omitempty"` + OutboundResourceStatus string `json:"OutboundResourceStatus,omitempty"` + OutboundResourceType string `json:"OutboundResourceType,omitempty"` + OutboundResourceUrl string `json:"OutboundResourceUrl,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + SessionSid string `json:"SessionSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_proxy_v1_service_short_code.go b/rest/proxy/v1/model_proxy_v1_service_short_code.go new file mode 100644 index 000000000..fc2deff43 --- /dev/null +++ b/rest/proxy/v1/model_proxy_v1_service_short_code.go @@ -0,0 +1,27 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ProxyV1ServiceShortCode struct for ProxyV1ServiceShortCode +type ProxyV1ServiceShortCode struct { + AccountSid string `json:"AccountSid,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + IsReserved bool `json:"IsReserved,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + ShortCode string `json:"ShortCode,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/proxy/v1/model_update_phone_number_request.go b/rest/proxy/v1/model_update_phone_number_request.go new file mode 100644 index 000000000..2dd67a809 --- /dev/null +++ b/rest/proxy/v1/model_update_phone_number_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdatePhoneNumberRequest struct for UpdatePhoneNumberRequest +type UpdatePhoneNumberRequest 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"` +} diff --git a/rest/proxy/v1/model_update_service_request.go b/rest/proxy/v1/model_update_service_request.go new file mode 100644 index 000000000..54a453c7c --- /dev/null +++ b/rest/proxy/v1/model_update_service_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest 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 int32 `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"` +} diff --git a/rest/proxy/v1/model_update_session_request.go b/rest/proxy/v1/model_update_session_request.go new file mode 100644 index 000000000..4694d3a39 --- /dev/null +++ b/rest/proxy/v1/model_update_session_request.go @@ -0,0 +1,25 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// UpdateSessionRequest struct for UpdateSessionRequest +type UpdateSessionRequest 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 int32 `json:"Ttl,omitempty"` +} diff --git a/rest/proxy/v1/model_update_short_code_request.go b/rest/proxy/v1/model_update_short_code_request.go new file mode 100644 index 000000000..56ac29c1a --- /dev/null +++ b/rest/proxy/v1/model_update_short_code_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateShortCodeRequest struct for UpdateShortCodeRequest +type UpdateShortCodeRequest 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"` +} diff --git a/rest/proxy/v1/response.go b/rest/proxy/v1/response.go new file mode 100644 index 000000000..837e2ecc3 --- /dev/null +++ b/rest/proxy/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Proxy + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/serverless/v1/.openapi-generator-ignore b/rest/serverless/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/serverless/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/serverless/v1/README.md b/rest/serverless/v1/README.md new file mode 100644 index 000000000..e057f208f --- /dev/null +++ b/rest/serverless/v1/README.md @@ -0,0 +1,135 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAsset**](docs/DefaultApi.md#createasset) | **Post** /v1/Services/{ServiceSid}/Assets | +*DefaultApi* | [**CreateBuild**](docs/DefaultApi.md#createbuild) | **Post** /v1/Services/{ServiceSid}/Builds | +*DefaultApi* | [**CreateDeployment**](docs/DefaultApi.md#createdeployment) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments | +*DefaultApi* | [**CreateEnvironment**](docs/DefaultApi.md#createenvironment) | **Post** /v1/Services/{ServiceSid}/Environments | +*DefaultApi* | [**CreateFunction**](docs/DefaultApi.md#createfunction) | **Post** /v1/Services/{ServiceSid}/Functions | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateVariable**](docs/DefaultApi.md#createvariable) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables | +*DefaultApi* | [**DeleteAsset**](docs/DefaultApi.md#deleteasset) | **Delete** /v1/Services/{ServiceSid}/Assets/{Sid} | +*DefaultApi* | [**DeleteBuild**](docs/DefaultApi.md#deletebuild) | **Delete** /v1/Services/{ServiceSid}/Builds/{Sid} | +*DefaultApi* | [**DeleteEnvironment**](docs/DefaultApi.md#deleteenvironment) | **Delete** /v1/Services/{ServiceSid}/Environments/{Sid} | +*DefaultApi* | [**DeleteFunction**](docs/DefaultApi.md#deletefunction) | **Delete** /v1/Services/{ServiceSid}/Functions/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteVariable**](docs/DefaultApi.md#deletevariable) | **Delete** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | +*DefaultApi* | [**FetchAsset**](docs/DefaultApi.md#fetchasset) | **Get** /v1/Services/{ServiceSid}/Assets/{Sid} | +*DefaultApi* | [**FetchAssetVersion**](docs/DefaultApi.md#fetchassetversion) | **Get** /v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid} | +*DefaultApi* | [**FetchBuild**](docs/DefaultApi.md#fetchbuild) | **Get** /v1/Services/{ServiceSid}/Builds/{Sid} | +*DefaultApi* | [**FetchBuildStatus**](docs/DefaultApi.md#fetchbuildstatus) | **Get** /v1/Services/{ServiceSid}/Builds/{Sid}/Status | +*DefaultApi* | [**FetchDeployment**](docs/DefaultApi.md#fetchdeployment) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid} | +*DefaultApi* | [**FetchEnvironment**](docs/DefaultApi.md#fetchenvironment) | **Get** /v1/Services/{ServiceSid}/Environments/{Sid} | +*DefaultApi* | [**FetchFunction**](docs/DefaultApi.md#fetchfunction) | **Get** /v1/Services/{ServiceSid}/Functions/{Sid} | +*DefaultApi* | [**FetchFunctionVersion**](docs/DefaultApi.md#fetchfunctionversion) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid} | +*DefaultApi* | [**FetchFunctionVersionContent**](docs/DefaultApi.md#fetchfunctionversioncontent) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content | +*DefaultApi* | [**FetchLog**](docs/DefaultApi.md#fetchlog) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchVariable**](docs/DefaultApi.md#fetchvariable) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | +*DefaultApi* | [**ListAsset**](docs/DefaultApi.md#listasset) | **Get** /v1/Services/{ServiceSid}/Assets | +*DefaultApi* | [**ListAssetVersion**](docs/DefaultApi.md#listassetversion) | **Get** /v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions | +*DefaultApi* | [**ListBuild**](docs/DefaultApi.md#listbuild) | **Get** /v1/Services/{ServiceSid}/Builds | +*DefaultApi* | [**ListDeployment**](docs/DefaultApi.md#listdeployment) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments | +*DefaultApi* | [**ListEnvironment**](docs/DefaultApi.md#listenvironment) | **Get** /v1/Services/{ServiceSid}/Environments | +*DefaultApi* | [**ListFunction**](docs/DefaultApi.md#listfunction) | **Get** /v1/Services/{ServiceSid}/Functions | +*DefaultApi* | [**ListFunctionVersion**](docs/DefaultApi.md#listfunctionversion) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions | +*DefaultApi* | [**ListLog**](docs/DefaultApi.md#listlog) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListVariable**](docs/DefaultApi.md#listvariable) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables | +*DefaultApi* | [**UpdateAsset**](docs/DefaultApi.md#updateasset) | **Post** /v1/Services/{ServiceSid}/Assets/{Sid} | +*DefaultApi* | [**UpdateFunction**](docs/DefaultApi.md#updatefunction) | **Post** /v1/Services/{ServiceSid}/Functions/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | +*DefaultApi* | [**UpdateVariable**](docs/DefaultApi.md#updatevariable) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | + + +## Documentation For Models + + - [CreateAssetRequest](docs/CreateAssetRequest.md) + - [CreateBuildRequest](docs/CreateBuildRequest.md) + - [CreateDeploymentRequest](docs/CreateDeploymentRequest.md) + - [CreateEnvironmentRequest](docs/CreateEnvironmentRequest.md) + - [CreateFunctionRequest](docs/CreateFunctionRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateVariableRequest](docs/CreateVariableRequest.md) + - [ListAssetResponse](docs/ListAssetResponse.md) + - [ListAssetVersionResponse](docs/ListAssetVersionResponse.md) + - [ListBuildResponse](docs/ListBuildResponse.md) + - [ListDeploymentResponse](docs/ListDeploymentResponse.md) + - [ListEnvironmentResponse](docs/ListEnvironmentResponse.md) + - [ListFunctionResponse](docs/ListFunctionResponse.md) + - [ListFunctionVersionResponse](docs/ListFunctionVersionResponse.md) + - [ListLogResponse](docs/ListLogResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) + - [ListVariableResponse](docs/ListVariableResponse.md) + - [ServerlessV1Service](docs/ServerlessV1Service.md) + - [ServerlessV1ServiceAsset](docs/ServerlessV1ServiceAsset.md) + - [ServerlessV1ServiceAssetAssetVersion](docs/ServerlessV1ServiceAssetAssetVersion.md) + - [ServerlessV1ServiceBuild](docs/ServerlessV1ServiceBuild.md) + - [ServerlessV1ServiceBuildBuildStatus](docs/ServerlessV1ServiceBuildBuildStatus.md) + - [ServerlessV1ServiceEnvironment](docs/ServerlessV1ServiceEnvironment.md) + - [ServerlessV1ServiceEnvironmentDeployment](docs/ServerlessV1ServiceEnvironmentDeployment.md) + - [ServerlessV1ServiceEnvironmentLog](docs/ServerlessV1ServiceEnvironmentLog.md) + - [ServerlessV1ServiceEnvironmentVariable](docs/ServerlessV1ServiceEnvironmentVariable.md) + - [ServerlessV1ServiceFunction](docs/ServerlessV1ServiceFunction.md) + - [ServerlessV1ServiceFunctionFunctionVersion](docs/ServerlessV1ServiceFunctionFunctionVersion.md) + - [ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent](docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md) + - [UpdateAssetRequest](docs/UpdateAssetRequest.md) + - [UpdateFunctionRequest](docs/UpdateFunctionRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateVariableRequest](docs/UpdateVariableRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/serverless/v1/api_default.go b/rest/serverless/v1/api_default.go new file mode 100644 index 000000000..cbc60e737 --- /dev/null +++ b/rest/serverless/v1/api_default.go @@ -0,0 +1,1523 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://serverless.twilio.com"), + } +} +// CreateAssetParams Optional parameters for the method 'CreateAsset' +type CreateAssetParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateAsset Method for CreateAsset +Create a new Asset resource. + * @param ServiceSid The SID of the Service to create the Asset resource under. + * @param optional nil or *CreateAssetOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. +@return ServerlessV1ServiceAsset +*/ +func (c *DefaultApiService) CreateAsset(ServiceSid string, params *CreateAssetParams) (*ServerlessV1ServiceAsset, error) { + path := "/v1/Services/{ServiceSid}/Assets" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateBuildParams Optional parameters for the method 'CreateBuild' +type CreateBuildParams struct { + AssetVersions *[]string `json:"AssetVersions,omitempty"` + Dependencies *string `json:"Dependencies,omitempty"` + FunctionVersions *[]string `json:"FunctionVersions,omitempty"` +} + +/* +CreateBuild Method for CreateBuild +Create a new Build resource. At least one function version or asset version is required. + * @param ServiceSid The SID of the Service to create the Build resource under. + * @param optional nil or *CreateBuildOpts - Optional Parameters: + * @param "AssetVersions" ([]string) - The list of Asset Version resource SIDs to include in the Build. + * @param "Dependencies" (string) - A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency. + * @param "FunctionVersions" ([]string) - The list of the Function Version resource SIDs to include in the Build. +@return ServerlessV1ServiceBuild +*/ +func (c *DefaultApiService) CreateBuild(ServiceSid string, params *CreateBuildParams) (*ServerlessV1ServiceBuild, error) { + path := "/v1/Services/{ServiceSid}/Builds" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssetVersions != nil { + data.Set("AssetVersions", strings.Join(*params.AssetVersions, ",")) + } + if params != nil && params.Dependencies != nil { + data.Set("Dependencies", *params.Dependencies) + } + if params != nil && params.FunctionVersions != nil { + data.Set("FunctionVersions", strings.Join(*params.FunctionVersions, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateDeploymentParams Optional parameters for the method 'CreateDeployment' +type CreateDeploymentParams struct { + BuildSid *string `json:"BuildSid,omitempty"` +} + +/* +CreateDeployment Method for CreateDeployment +Create a new Deployment. + * @param ServiceSid The SID of the Service to create the Deployment resource under. + * @param EnvironmentSid The SID of the Environment for the Deployment. + * @param optional nil or *CreateDeploymentOpts - Optional Parameters: + * @param "BuildSid" (string) - The SID of the Build for the Deployment. +@return ServerlessV1ServiceEnvironmentDeployment +*/ +func (c *DefaultApiService) CreateDeployment(ServiceSid string, EnvironmentSid string, params *CreateDeploymentParams) (*ServerlessV1ServiceEnvironmentDeployment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BuildSid != nil { + data.Set("BuildSid", *params.BuildSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateEnvironmentParams Optional parameters for the method 'CreateEnvironment' +type CreateEnvironmentParams struct { + DomainSuffix *string `json:"DomainSuffix,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateEnvironment Method for CreateEnvironment +Create a new environment. + * @param ServiceSid The SID of the Service to create the Environment resource under. + * @param optional nil or *CreateEnvironmentOpts - Optional Parameters: + * @param "DomainSuffix" (string) - A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. + * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. +@return ServerlessV1ServiceEnvironment +*/ +func (c *DefaultApiService) CreateEnvironment(ServiceSid string, params *CreateEnvironmentParams) (*ServerlessV1ServiceEnvironment, error) { + path := "/v1/Services/{ServiceSid}/Environments" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DomainSuffix != nil { + data.Set("DomainSuffix", *params.DomainSuffix) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFunctionParams Optional parameters for the method 'CreateFunction' +type CreateFunctionParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateFunction Method for CreateFunction +Create a new Function resource. + * @param ServiceSid The SID of the Service to create the Function resource under. + * @param optional nil or *CreateFunctionOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. +@return ServerlessV1ServiceFunction +*/ +func (c *DefaultApiService) CreateFunction(ServiceSid string, params *CreateFunctionParams) (*ServerlessV1ServiceFunction, error) { + path := "/v1/Services/{ServiceSid}/Functions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateService Method for CreateService +Create a new Service resource. + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. + * @param "IncludeCredentials" (bool) - Whether to inject Account credentials into a function invocation context. The default value is `true`. + * @param "UiEditable" (bool) - Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. + * @param "UniqueName" (string) - A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. +@return ServerlessV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*ServerlessV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) + } + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateVariableParams Optional parameters for the method 'CreateVariable' +type CreateVariableParams struct { + Key *string `json:"Key,omitempty"` + Value *string `json:"Value,omitempty"` +} + +/* +CreateVariable Method for CreateVariable +Create a new Variable. + * @param ServiceSid The SID of the Service to create the Variable resource under. + * @param EnvironmentSid The SID of the Environment in which the Variable resource exists. + * @param optional nil or *CreateVariableOpts - Optional Parameters: + * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. + * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. +@return ServerlessV1ServiceEnvironmentVariable +*/ +func (c *DefaultApiService) CreateVariable(ServiceSid string, EnvironmentSid string, params *CreateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteAsset Method for DeleteAsset +Delete an Asset resource. + * @param ServiceSid The SID of the Service to delete the Asset resource from. + * @param Sid The SID that identifies the Asset resource to delete. +*/ +func (c *DefaultApiService) DeleteAsset(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteBuild Method for DeleteBuild +Delete a Build resource. + * @param ServiceSid The SID of the Service to delete the Build resource from. + * @param Sid The SID of the Build resource to delete. +*/ +func (c *DefaultApiService) DeleteBuild(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteEnvironment Method for DeleteEnvironment +Delete a specific environment. + * @param ServiceSid The SID of the Service to delete the Environment resource from. + * @param Sid The SID of the Environment resource to delete. +*/ +func (c *DefaultApiService) DeleteEnvironment(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFunction Method for DeleteFunction +Delete a Function resource. + * @param ServiceSid The SID of the Service to delete the Function resource from. + * @param Sid The SID of the Function resource to delete. +*/ +func (c *DefaultApiService) DeleteFunction(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService +Delete a Service resource. + * @param Sid The `sid` or `unique_name` of the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteVariable Method for DeleteVariable +Delete a specific Variable. + * @param ServiceSid The SID of the Service to delete the Variable resource from. + * @param EnvironmentSid The SID of the Environment with the Variables to delete. + * @param Sid The SID of the Variable resource to delete. +*/ +func (c *DefaultApiService) DeleteVariable(ServiceSid string, EnvironmentSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchAsset Method for FetchAsset +Retrieve a specific Asset resource. + * @param ServiceSid The SID of the Service to fetch the Asset resource from. + * @param Sid The SID that identifies the Asset resource to fetch. +@return ServerlessV1ServiceAsset +*/ +func (c *DefaultApiService) FetchAsset(ServiceSid string, Sid string) (*ServerlessV1ServiceAsset, error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchAssetVersion Method for FetchAssetVersion +Retrieve a specific Asset Version. + * @param ServiceSid The SID of the Service to fetch the Asset Version resource from. + * @param AssetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch. + * @param Sid The SID of the Asset Version resource to fetch. +@return ServerlessV1ServiceAssetAssetVersion +*/ +func (c *DefaultApiService) FetchAssetVersion(ServiceSid string, AssetSid string, Sid string) (*ServerlessV1ServiceAssetAssetVersion, error) { + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceAssetAssetVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchBuild Method for FetchBuild +Retrieve a specific Build resource. + * @param ServiceSid The SID of the Service to fetch the Build resource from. + * @param Sid The SID of the Build resource to fetch. +@return ServerlessV1ServiceBuild +*/ +func (c *DefaultApiService) FetchBuild(ServiceSid string, Sid string) (*ServerlessV1ServiceBuild, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceBuild{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchBuildStatus Method for FetchBuildStatus +Retrieve a specific Build resource. + * @param ServiceSid The SID of the Service to fetch the Build resource from. + * @param Sid The SID of the Build resource to fetch. +@return ServerlessV1ServiceBuildBuildStatus +*/ +func (c *DefaultApiService) FetchBuildStatus(ServiceSid string, Sid string) (*ServerlessV1ServiceBuildBuildStatus, error) { + path := "/v1/Services/{ServiceSid}/Builds/{Sid}/Status" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceBuildBuildStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDeployment Method for FetchDeployment +Retrieve a specific Deployment. + * @param ServiceSid The SID of the Service to fetch the Deployment resource from. + * @param EnvironmentSid The SID of the Environment used by the Deployment to fetch. + * @param Sid The SID that identifies the Deployment resource to fetch. +@return ServerlessV1ServiceEnvironmentDeployment +*/ +func (c *DefaultApiService) FetchDeployment(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentDeployment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentDeployment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEnvironment Method for FetchEnvironment +Retrieve a specific environment. + * @param ServiceSid The SID of the Service to fetch the Environment resource from. + * @param Sid The SID of the Environment resource to fetch. +@return ServerlessV1ServiceEnvironment +*/ +func (c *DefaultApiService) FetchEnvironment(ServiceSid string, Sid string) (*ServerlessV1ServiceEnvironment, error) { + path := "/v1/Services/{ServiceSid}/Environments/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFunction Method for FetchFunction +Retrieve a specific Function resource. + * @param ServiceSid The SID of the Service to fetch the Function resource from. + * @param Sid The SID of the Function resource to fetch. +@return ServerlessV1ServiceFunction +*/ +func (c *DefaultApiService) FetchFunction(ServiceSid string, Sid string) (*ServerlessV1ServiceFunction, error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFunctionVersion Method for FetchFunctionVersion +Retrieve a specific Function Version resource. + * @param ServiceSid The SID of the Service to fetch the Function Version resource from. + * @param FunctionSid The SID of the function that is the parent of the Function Version resource to fetch. + * @param Sid The SID of the Function Version resource to fetch. +@return ServerlessV1ServiceFunctionFunctionVersion +*/ +func (c *DefaultApiService) FetchFunctionVersion(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersion, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunctionFunctionVersion{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFunctionVersionContent Method for FetchFunctionVersionContent +Retrieve a the content of a specific Function Version resource. + * @param ServiceSid The SID of the Service to fetch the Function Version content from. + * @param FunctionSid The SID of the Function that is the parent of the Function Version content to fetch. + * @param Sid The SID of the Function Version content to fetch. +@return ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent +*/ +func (c *DefaultApiService) FetchFunctionVersionContent(ServiceSid string, FunctionSid string, Sid string) (*ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchLog Method for FetchLog +Retrieve a specific log. + * @param ServiceSid The SID of the Service to fetch the Log resource from. + * @param EnvironmentSid The SID of the environment with the Log resource to fetch. + * @param Sid The SID of the Log resource to fetch. +@return ServerlessV1ServiceEnvironmentLog +*/ +func (c *DefaultApiService) FetchLog(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentLog, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentLog{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService +Retrieve a specific Service resource. + * @param Sid The `sid` or `unique_name` of the Service resource to fetch. +@return ServerlessV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*ServerlessV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVariable Method for FetchVariable +Retrieve a specific Variable. + * @param ServiceSid The SID of the Service to fetch the Variable resource from. + * @param EnvironmentSid The SID of the Environment with the Variable resource to fetch. + * @param Sid The SID of the Variable resource to fetch. +@return ServerlessV1ServiceEnvironmentVariable +*/ +func (c *DefaultApiService) FetchVariable(ServiceSid string, EnvironmentSid string, Sid string) (*ServerlessV1ServiceEnvironmentVariable, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAssetParams Optional parameters for the method 'ListAsset' +type ListAssetParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAsset Method for ListAsset +Retrieve a list of all Assets. + * @param ServiceSid The SID of the Service to read the Asset resources from. + * @param optional nil or *ListAssetOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAssetResponse +*/ +func (c *DefaultApiService) ListAsset(ServiceSid string, params *ListAssetParams) (*ListAssetResponse, error) { + path := "/v1/Services/{ServiceSid}/Assets" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAssetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAssetVersionParams Optional parameters for the method 'ListAssetVersion' +type ListAssetVersionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAssetVersion Method for ListAssetVersion +Retrieve a list of all Asset Versions. + * @param ServiceSid The SID of the Service to read the Asset Version resource from. + * @param AssetSid The SID of the Asset resource that is the parent of the Asset Version resources to read. + * @param optional nil or *ListAssetVersionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAssetVersionResponse +*/ +func (c *DefaultApiService) ListAssetVersion(ServiceSid string, AssetSid string, params *ListAssetVersionParams) (*ListAssetVersionResponse, error) { + path := "/v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"AssetSid"+"}", AssetSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAssetVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBuildParams Optional parameters for the method 'ListBuild' +type ListBuildParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBuild Method for ListBuild +Retrieve a list of all Builds. + * @param ServiceSid The SID of the Service to read the Build resources from. + * @param optional nil or *ListBuildOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBuildResponse +*/ +func (c *DefaultApiService) ListBuild(ServiceSid string, params *ListBuildParams) (*ListBuildResponse, error) { + path := "/v1/Services/{ServiceSid}/Builds" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBuildResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDeploymentParams Optional parameters for the method 'ListDeployment' +type ListDeploymentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDeployment Method for ListDeployment +Retrieve a list of all Deployments. + * @param ServiceSid The SID of the Service to read the Deployment resources from. + * @param EnvironmentSid The SID of the Environment used by the Deployment resources to read. + * @param optional nil or *ListDeploymentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDeploymentResponse +*/ +func (c *DefaultApiService) ListDeployment(ServiceSid string, EnvironmentSid string, params *ListDeploymentParams) (*ListDeploymentResponse, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDeploymentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEnvironmentParams Optional parameters for the method 'ListEnvironment' +type ListEnvironmentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEnvironment Method for ListEnvironment +Retrieve a list of all environments. + * @param ServiceSid The SID of the Service to read the Environment resources from. + * @param optional nil or *ListEnvironmentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEnvironmentResponse +*/ +func (c *DefaultApiService) ListEnvironment(ServiceSid string, params *ListEnvironmentParams) (*ListEnvironmentResponse, error) { + path := "/v1/Services/{ServiceSid}/Environments" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEnvironmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFunctionParams Optional parameters for the method 'ListFunction' +type ListFunctionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFunction Method for ListFunction +Retrieve a list of all Functions. + * @param ServiceSid The SID of the Service to read the Function resources from. + * @param optional nil or *ListFunctionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFunctionResponse +*/ +func (c *DefaultApiService) ListFunction(ServiceSid string, params *ListFunctionParams) (*ListFunctionResponse, error) { + path := "/v1/Services/{ServiceSid}/Functions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFunctionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFunctionVersionParams Optional parameters for the method 'ListFunctionVersion' +type ListFunctionVersionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFunctionVersion Method for ListFunctionVersion +Retrieve a list of all Function Version resources. + * @param ServiceSid The SID of the Service to read the Function Version resources from. + * @param FunctionSid The SID of the function that is the parent of the Function Version resources to read. + * @param optional nil or *ListFunctionVersionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFunctionVersionResponse +*/ +func (c *DefaultApiService) ListFunctionVersion(ServiceSid string, FunctionSid string, params *ListFunctionVersionParams) (*ListFunctionVersionResponse, error) { + path := "/v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"FunctionSid"+"}", FunctionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFunctionVersionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListLogParams Optional parameters for the method 'ListLog' +type ListLogParams struct { + FunctionSid *string `json:"FunctionSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListLog Method for ListLog +Retrieve a list of all logs. + * @param ServiceSid The SID of the Service to read the Log resource from. + * @param EnvironmentSid The SID of the environment with the Log resources to read. + * @param optional nil or *ListLogOpts - Optional Parameters: + * @param "FunctionSid" (string) - The SID of the function whose invocation produced the Log resources to read. + * @param "StartDate" (time.Time) - The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time. + * @param "EndDate" (time.Time) - The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListLogResponse +*/ +func (c *DefaultApiService) ListLog(ServiceSid string, EnvironmentSid string, params *ListLogParams) (*ListLogResponse, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FunctionSid != nil { + data.Set("FunctionSid", *params.FunctionSid) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListLogResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService +Retrieve a list of all Services. + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListVariableParams Optional parameters for the method 'ListVariable' +type ListVariableParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListVariable Method for ListVariable +Retrieve a list of all Variables. + * @param ServiceSid The SID of the Service to read the Variable resources from. + * @param EnvironmentSid The SID of the Environment with the Variable resources to read. + * @param optional nil or *ListVariableOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListVariableResponse +*/ +func (c *DefaultApiService) ListVariable(ServiceSid string, EnvironmentSid string, params *ListVariableParams) (*ListVariableResponse, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListVariableResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateAssetParams Optional parameters for the method 'UpdateAsset' +type UpdateAssetParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateAsset Method for UpdateAsset +Update a specific Asset resource. + * @param ServiceSid The SID of the Service to update the Asset resource from. + * @param Sid The SID that identifies the Asset resource to update. + * @param optional nil or *UpdateAssetOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. +@return ServerlessV1ServiceAsset +*/ +func (c *DefaultApiService) UpdateAsset(ServiceSid string, Sid string, params *UpdateAssetParams) (*ServerlessV1ServiceAsset, error) { + path := "/v1/Services/{ServiceSid}/Assets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceAsset{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFunctionParams Optional parameters for the method 'UpdateFunction' +type UpdateFunctionParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateFunction Method for UpdateFunction +Update a specific Function resource. + * @param ServiceSid The SID of the Service to update the Function resource from. + * @param Sid The SID of the Function resource to update. + * @param optional nil or *UpdateFunctionOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. +@return ServerlessV1ServiceFunction +*/ +func (c *DefaultApiService) UpdateFunction(ServiceSid string, Sid string, params *UpdateFunctionParams) (*ServerlessV1ServiceFunction, error) { + path := "/v1/Services/{ServiceSid}/Functions/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceFunction{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + IncludeCredentials *bool `json:"IncludeCredentials,omitempty"` + UiEditable *bool `json:"UiEditable,omitempty"` +} + +/* +UpdateService Method for UpdateService +Update a specific Service resource. + * @param Sid The `sid` or `unique_name` of the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. + * @param "IncludeCredentials" (bool) - Whether to inject Account credentials into a function invocation context. + * @param "UiEditable" (bool) - Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. +@return ServerlessV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*ServerlessV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IncludeCredentials != nil { + data.Set("IncludeCredentials", fmt.Sprint(*params.IncludeCredentials)) + } + if params != nil && params.UiEditable != nil { + data.Set("UiEditable", fmt.Sprint(*params.UiEditable)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateVariableParams Optional parameters for the method 'UpdateVariable' +type UpdateVariableParams struct { + Key *string `json:"Key,omitempty"` + Value *string `json:"Value,omitempty"` +} + +/* +UpdateVariable Method for UpdateVariable +Update a specific Variable. + * @param ServiceSid The SID of the Service to update the Variable resource under. + * @param EnvironmentSid The SID of the Environment with the Variable resource to update. + * @param Sid The SID of the Variable resource to update. + * @param optional nil or *UpdateVariableOpts - Optional Parameters: + * @param "Key" (string) - A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. + * @param "Value" (string) - A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. +@return ServerlessV1ServiceEnvironmentVariable +*/ +func (c *DefaultApiService) UpdateVariable(ServiceSid string, EnvironmentSid string, Sid string, params *UpdateVariableParams) (*ServerlessV1ServiceEnvironmentVariable, error) { + path := "/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"EnvironmentSid"+"}", EnvironmentSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Value != nil { + data.Set("Value", *params.Value) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ServerlessV1ServiceEnvironmentVariable{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/serverless/v1/docs/CreateAssetRequest.md b/rest/serverless/v1/docs/CreateAssetRequest.md new file mode 100644 index 000000000..0ca45da7e --- /dev/null +++ b/rest/serverless/v1/docs/CreateAssetRequest.md @@ -0,0 +1,11 @@ +# CreateAssetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateBuildRequest.md b/rest/serverless/v1/docs/CreateBuildRequest.md new file mode 100644 index 000000000..0bb0a8387 --- /dev/null +++ b/rest/serverless/v1/docs/CreateBuildRequest.md @@ -0,0 +1,13 @@ +# CreateBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetVersions** | **[]string** | The list of Asset Version resource SIDs to include in the Build. | [optional] +**Dependencies** | **string** | A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency. | [optional] +**FunctionVersions** | **[]string** | The list of the Function Version resource SIDs to include in the Build. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateDeploymentRequest.md b/rest/serverless/v1/docs/CreateDeploymentRequest.md new file mode 100644 index 000000000..67735dbf0 --- /dev/null +++ b/rest/serverless/v1/docs/CreateDeploymentRequest.md @@ -0,0 +1,11 @@ +# CreateDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BuildSid** | **string** | The SID of the Build for the Deployment. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateEnvironmentRequest.md b/rest/serverless/v1/docs/CreateEnvironmentRequest.md new file mode 100644 index 000000000..55d6c6900 --- /dev/null +++ b/rest/serverless/v1/docs/CreateEnvironmentRequest.md @@ -0,0 +1,12 @@ +# CreateEnvironmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainSuffix** | **string** | A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. | [optional] +**UniqueName** | **string** | A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateFunctionRequest.md b/rest/serverless/v1/docs/CreateFunctionRequest.md new file mode 100644 index 000000000..39ad78f3b --- /dev/null +++ b/rest/serverless/v1/docs/CreateFunctionRequest.md @@ -0,0 +1,11 @@ +# CreateFunctionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateServiceRequest.md b/rest/serverless/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..0aa116985 --- /dev/null +++ b/rest/serverless/v1/docs/CreateServiceRequest.md @@ -0,0 +1,14 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. | +**IncludeCredentials** | **bool** | Whether to inject Account credentials into a function invocation context. The default value is `true`. | [optional] +**UiEditable** | **bool** | Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. | [optional] +**UniqueName** | **string** | A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/CreateVariableRequest.md b/rest/serverless/v1/docs/CreateVariableRequest.md new file mode 100644 index 000000000..cc5e9610a --- /dev/null +++ b/rest/serverless/v1/docs/CreateVariableRequest.md @@ -0,0 +1,12 @@ +# CreateVariableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. | +**Value** | **string** | A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/DefaultApi.md b/rest/serverless/v1/docs/DefaultApi.md new file mode 100644 index 000000000..f446d760c --- /dev/null +++ b/rest/serverless/v1/docs/DefaultApi.md @@ -0,0 +1,1658 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAsset**](DefaultApi.md#CreateAsset) | **Post** /v1/Services/{ServiceSid}/Assets | +[**CreateBuild**](DefaultApi.md#CreateBuild) | **Post** /v1/Services/{ServiceSid}/Builds | +[**CreateDeployment**](DefaultApi.md#CreateDeployment) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments | +[**CreateEnvironment**](DefaultApi.md#CreateEnvironment) | **Post** /v1/Services/{ServiceSid}/Environments | +[**CreateFunction**](DefaultApi.md#CreateFunction) | **Post** /v1/Services/{ServiceSid}/Functions | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateVariable**](DefaultApi.md#CreateVariable) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables | +[**DeleteAsset**](DefaultApi.md#DeleteAsset) | **Delete** /v1/Services/{ServiceSid}/Assets/{Sid} | +[**DeleteBuild**](DefaultApi.md#DeleteBuild) | **Delete** /v1/Services/{ServiceSid}/Builds/{Sid} | +[**DeleteEnvironment**](DefaultApi.md#DeleteEnvironment) | **Delete** /v1/Services/{ServiceSid}/Environments/{Sid} | +[**DeleteFunction**](DefaultApi.md#DeleteFunction) | **Delete** /v1/Services/{ServiceSid}/Functions/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteVariable**](DefaultApi.md#DeleteVariable) | **Delete** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | +[**FetchAsset**](DefaultApi.md#FetchAsset) | **Get** /v1/Services/{ServiceSid}/Assets/{Sid} | +[**FetchAssetVersion**](DefaultApi.md#FetchAssetVersion) | **Get** /v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions/{Sid} | +[**FetchBuild**](DefaultApi.md#FetchBuild) | **Get** /v1/Services/{ServiceSid}/Builds/{Sid} | +[**FetchBuildStatus**](DefaultApi.md#FetchBuildStatus) | **Get** /v1/Services/{ServiceSid}/Builds/{Sid}/Status | +[**FetchDeployment**](DefaultApi.md#FetchDeployment) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments/{Sid} | +[**FetchEnvironment**](DefaultApi.md#FetchEnvironment) | **Get** /v1/Services/{ServiceSid}/Environments/{Sid} | +[**FetchFunction**](DefaultApi.md#FetchFunction) | **Get** /v1/Services/{ServiceSid}/Functions/{Sid} | +[**FetchFunctionVersion**](DefaultApi.md#FetchFunctionVersion) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid} | +[**FetchFunctionVersionContent**](DefaultApi.md#FetchFunctionVersionContent) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions/{Sid}/Content | +[**FetchLog**](DefaultApi.md#FetchLog) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchVariable**](DefaultApi.md#FetchVariable) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | +[**ListAsset**](DefaultApi.md#ListAsset) | **Get** /v1/Services/{ServiceSid}/Assets | +[**ListAssetVersion**](DefaultApi.md#ListAssetVersion) | **Get** /v1/Services/{ServiceSid}/Assets/{AssetSid}/Versions | +[**ListBuild**](DefaultApi.md#ListBuild) | **Get** /v1/Services/{ServiceSid}/Builds | +[**ListDeployment**](DefaultApi.md#ListDeployment) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Deployments | +[**ListEnvironment**](DefaultApi.md#ListEnvironment) | **Get** /v1/Services/{ServiceSid}/Environments | +[**ListFunction**](DefaultApi.md#ListFunction) | **Get** /v1/Services/{ServiceSid}/Functions | +[**ListFunctionVersion**](DefaultApi.md#ListFunctionVersion) | **Get** /v1/Services/{ServiceSid}/Functions/{FunctionSid}/Versions | +[**ListLog**](DefaultApi.md#ListLog) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Logs | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListVariable**](DefaultApi.md#ListVariable) | **Get** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables | +[**UpdateAsset**](DefaultApi.md#UpdateAsset) | **Post** /v1/Services/{ServiceSid}/Assets/{Sid} | +[**UpdateFunction**](DefaultApi.md#UpdateFunction) | **Post** /v1/Services/{ServiceSid}/Functions/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | +[**UpdateVariable**](DefaultApi.md#UpdateVariable) | **Post** /v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables/{Sid} | + + + +## CreateAsset + +> ServerlessV1ServiceAsset CreateAsset(ctx, ServiceSid, optional) + + + +Create a new Asset resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Asset resource under. | + **optional** | ***CreateAssetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAssetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. | + +### Return type + +[**ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateBuild + +> ServerlessV1ServiceBuild CreateBuild(ctx, ServiceSid, optional) + + + +Create a new Build resource. At least one function version or asset version is required. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Build resource under. | + **optional** | ***CreateBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AssetVersions** | [**optional.Interface of []string**](string.md)| The list of Asset Version resource SIDs to include in the Build. | + **Dependencies** | **optional.String**| A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency. | + **FunctionVersions** | [**optional.Interface of []string**](string.md)| The list of the Function Version resource SIDs to include in the Build. | + +### Return type + +[**ServerlessV1ServiceBuild**](serverless.v1.service.build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDeployment + +> ServerlessV1ServiceEnvironmentDeployment CreateDeployment(ctx, ServiceSid, EnvironmentSid, optional) + + + +Create a new Deployment. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Deployment resource under. | +**EnvironmentSid** | **string**| The SID of the Environment for the Deployment. | + **optional** | ***CreateDeploymentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDeploymentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **BuildSid** | **optional.String**| The SID of the Build for the Deployment. | + +### Return type + +[**ServerlessV1ServiceEnvironmentDeployment**](serverless.v1.service.environment.deployment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEnvironment + +> ServerlessV1ServiceEnvironment CreateEnvironment(ctx, ServiceSid, optional) + + + +Create a new environment. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Environment resource under. | + **optional** | ***CreateEnvironmentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateEnvironmentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DomainSuffix** | **optional.String**| A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. | + **UniqueName** | **optional.String**| A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. | + +### Return type + +[**ServerlessV1ServiceEnvironment**](serverless.v1.service.environment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFunction + +> ServerlessV1ServiceFunction CreateFunction(ctx, ServiceSid, optional) + + + +Create a new Function resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Function resource under. | + **optional** | ***CreateFunctionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFunctionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. | + +### Return type + +[**ServerlessV1ServiceFunction**](serverless.v1.service.function.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> ServerlessV1Service CreateService(ctx, optional) + + + +Create a new Service resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. | + **IncludeCredentials** | **optional.Bool**| Whether to inject Account credentials into a function invocation context. The default value is `true`. | + **UiEditable** | **optional.Bool**| Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. | + **UniqueName** | **optional.String**| A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. | + +### Return type + +[**ServerlessV1Service**](serverless.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateVariable + +> ServerlessV1ServiceEnvironmentVariable CreateVariable(ctx, ServiceSid, EnvironmentSid, optional) + + + +Create a new Variable. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to create the Variable resource under. | +**EnvironmentSid** | **string**| The SID of the Environment in which the Variable resource exists. | + **optional** | ***CreateVariableOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateVariableOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Key** | **optional.String**| A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. | + **Value** | **optional.String**| A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. | + +### Return type + +[**ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAsset + +> DeleteAsset(ctx, ServiceSid, Sid) + + + +Delete an Asset resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to delete the Asset resource from. | +**Sid** | **string**| The SID that identifies the Asset resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBuild + +> DeleteBuild(ctx, ServiceSid, Sid) + + + +Delete a Build resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to delete the Build resource from. | +**Sid** | **string**| The SID of the Build resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEnvironment + +> DeleteEnvironment(ctx, ServiceSid, Sid) + + + +Delete a specific environment. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to delete the Environment resource from. | +**Sid** | **string**| The SID of the Environment resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFunction + +> DeleteFunction(ctx, ServiceSid, Sid) + + + +Delete a Function resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to delete the Function resource from. | +**Sid** | **string**| The SID of the Function resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +Delete a Service resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The `sid` or `unique_name` of the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteVariable + +> DeleteVariable(ctx, ServiceSid, EnvironmentSid, Sid) + + + +Delete a specific Variable. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to delete the Variable resource from. | +**EnvironmentSid** | **string**| The SID of the Environment with the Variables to delete. | +**Sid** | **string**| The SID of the Variable resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAsset + +> ServerlessV1ServiceAsset FetchAsset(ctx, ServiceSid, Sid) + + + +Retrieve a specific Asset resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Asset resource from. | +**Sid** | **string**| The SID that identifies the Asset resource to fetch. | + +### Return type + +[**ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchAssetVersion + +> ServerlessV1ServiceAssetAssetVersion FetchAssetVersion(ctx, ServiceSid, AssetSid, Sid) + + + +Retrieve a specific Asset Version. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Asset Version resource from. | +**AssetSid** | **string**| The SID of the Asset resource that is the parent of the Asset Version resource to fetch. | +**Sid** | **string**| The SID of the Asset Version resource to fetch. | + +### Return type + +[**ServerlessV1ServiceAssetAssetVersion**](serverless.v1.service.asset.asset_version.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBuild + +> ServerlessV1ServiceBuild FetchBuild(ctx, ServiceSid, Sid) + + + +Retrieve a specific Build resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Build resource from. | +**Sid** | **string**| The SID of the Build resource to fetch. | + +### Return type + +[**ServerlessV1ServiceBuild**](serverless.v1.service.build.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBuildStatus + +> ServerlessV1ServiceBuildBuildStatus FetchBuildStatus(ctx, ServiceSid, Sid) + + + +Retrieve a specific Build resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Build resource from. | +**Sid** | **string**| The SID of the Build resource to fetch. | + +### Return type + +[**ServerlessV1ServiceBuildBuildStatus**](serverless.v1.service.build.build_status.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDeployment + +> ServerlessV1ServiceEnvironmentDeployment FetchDeployment(ctx, ServiceSid, EnvironmentSid, Sid) + + + +Retrieve a specific Deployment. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Deployment resource from. | +**EnvironmentSid** | **string**| The SID of the Environment used by the Deployment to fetch. | +**Sid** | **string**| The SID that identifies the Deployment resource to fetch. | + +### Return type + +[**ServerlessV1ServiceEnvironmentDeployment**](serverless.v1.service.environment.deployment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEnvironment + +> ServerlessV1ServiceEnvironment FetchEnvironment(ctx, ServiceSid, Sid) + + + +Retrieve a specific environment. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Environment resource from. | +**Sid** | **string**| The SID of the Environment resource to fetch. | + +### Return type + +[**ServerlessV1ServiceEnvironment**](serverless.v1.service.environment.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFunction + +> ServerlessV1ServiceFunction FetchFunction(ctx, ServiceSid, Sid) + + + +Retrieve a specific Function resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Function resource from. | +**Sid** | **string**| The SID of the Function resource to fetch. | + +### Return type + +[**ServerlessV1ServiceFunction**](serverless.v1.service.function.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFunctionVersion + +> ServerlessV1ServiceFunctionFunctionVersion FetchFunctionVersion(ctx, ServiceSid, FunctionSid, Sid) + + + +Retrieve a specific Function Version resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Function Version resource from. | +**FunctionSid** | **string**| The SID of the function that is the parent of the Function Version resource to fetch. | +**Sid** | **string**| The SID of the Function Version resource to fetch. | + +### Return type + +[**ServerlessV1ServiceFunctionFunctionVersion**](serverless.v1.service.function.function_version.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFunctionVersionContent + +> ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent FetchFunctionVersionContent(ctx, ServiceSid, FunctionSid, Sid) + + + +Retrieve a the content of a specific Function Version resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Function Version content from. | +**FunctionSid** | **string**| The SID of the Function that is the parent of the Function Version content to fetch. | +**Sid** | **string**| The SID of the Function Version content to fetch. | + +### Return type + +[**ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent**](serverless.v1.service.function.function_version.function_version_content.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchLog + +> ServerlessV1ServiceEnvironmentLog FetchLog(ctx, ServiceSid, EnvironmentSid, Sid) + + + +Retrieve a specific log. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Log resource from. | +**EnvironmentSid** | **string**| The SID of the environment with the Log resource to fetch. | +**Sid** | **string**| The SID of the Log resource to fetch. | + +### Return type + +[**ServerlessV1ServiceEnvironmentLog**](serverless.v1.service.environment.log.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> ServerlessV1Service FetchService(ctx, Sid) + + + +Retrieve a specific Service resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The `sid` or `unique_name` of the Service resource to fetch. | + +### Return type + +[**ServerlessV1Service**](serverless.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVariable + +> ServerlessV1ServiceEnvironmentVariable FetchVariable(ctx, ServiceSid, EnvironmentSid, Sid) + + + +Retrieve a specific Variable. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to fetch the Variable resource from. | +**EnvironmentSid** | **string**| The SID of the Environment with the Variable resource to fetch. | +**Sid** | **string**| The SID of the Variable resource to fetch. | + +### Return type + +[**ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAsset + +> ListAssetResponse ListAsset(ctx, ServiceSid, optional) + + + +Retrieve a list of all Assets. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Asset resources from. | + **optional** | ***ListAssetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAssetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAssetResponse**](ListAssetResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAssetVersion + +> ListAssetVersionResponse ListAssetVersion(ctx, ServiceSid, AssetSid, optional) + + + +Retrieve a list of all Asset Versions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Asset Version resource from. | +**AssetSid** | **string**| The SID of the Asset resource that is the parent of the Asset Version resources to read. | + **optional** | ***ListAssetVersionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAssetVersionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAssetVersionResponse**](ListAssetVersionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBuild + +> ListBuildResponse ListBuild(ctx, ServiceSid, optional) + + + +Retrieve a list of all Builds. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Build resources from. | + **optional** | ***ListBuildOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBuildOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBuildResponse**](ListBuildResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDeployment + +> ListDeploymentResponse ListDeployment(ctx, ServiceSid, EnvironmentSid, optional) + + + +Retrieve a list of all Deployments. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Deployment resources from. | +**EnvironmentSid** | **string**| The SID of the Environment used by the Deployment resources to read. | + **optional** | ***ListDeploymentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDeploymentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDeploymentResponse**](ListDeploymentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEnvironment + +> ListEnvironmentResponse ListEnvironment(ctx, ServiceSid, optional) + + + +Retrieve a list of all environments. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Environment resources from. | + **optional** | ***ListEnvironmentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEnvironmentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEnvironmentResponse**](ListEnvironmentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFunction + +> ListFunctionResponse ListFunction(ctx, ServiceSid, optional) + + + +Retrieve a list of all Functions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Function resources from. | + **optional** | ***ListFunctionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFunctionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFunctionResponse**](ListFunctionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFunctionVersion + +> ListFunctionVersionResponse ListFunctionVersion(ctx, ServiceSid, FunctionSid, optional) + + + +Retrieve a list of all Function Version resources. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Function Version resources from. | +**FunctionSid** | **string**| The SID of the function that is the parent of the Function Version resources to read. | + **optional** | ***ListFunctionVersionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFunctionVersionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFunctionVersionResponse**](ListFunctionVersionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListLog + +> ListLogResponse ListLog(ctx, ServiceSid, EnvironmentSid, optional) + + + +Retrieve a list of all logs. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Log resource from. | +**EnvironmentSid** | **string**| The SID of the environment with the Log resources to read. | + **optional** | ***ListLogOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListLogOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FunctionSid** | **optional.String**| The SID of the function whose invocation produced the Log resources to read. | + **StartDate** | **optional.Time**| The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time. | + **EndDate** | **optional.Time**| The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListLogResponse**](ListLogResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +Retrieve a list of all Services. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListVariable + +> ListVariableResponse ListVariable(ctx, ServiceSid, EnvironmentSid, optional) + + + +Retrieve a list of all Variables. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to read the Variable resources from. | +**EnvironmentSid** | **string**| The SID of the Environment with the Variable resources to read. | + **optional** | ***ListVariableOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListVariableOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListVariableResponse**](ListVariableResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAsset + +> ServerlessV1ServiceAsset UpdateAsset(ctx, ServiceSid, Sid, optional) + + + +Update a specific Asset resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to update the Asset resource from. | +**Sid** | **string**| The SID that identifies the Asset resource to update. | + **optional** | ***UpdateAssetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateAssetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. | + +### Return type + +[**ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFunction + +> ServerlessV1ServiceFunction UpdateFunction(ctx, ServiceSid, Sid, optional) + + + +Update a specific Function resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to update the Function resource from. | +**Sid** | **string**| The SID of the Function resource to update. | + **optional** | ***UpdateFunctionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFunctionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. | + +### Return type + +[**ServerlessV1ServiceFunction**](serverless.v1.service.function.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ServerlessV1Service UpdateService(ctx, Sid, optional) + + + +Update a specific Service resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The `sid` or `unique_name` of the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. | + **IncludeCredentials** | **optional.Bool**| Whether to inject Account credentials into a function invocation context. | + **UiEditable** | **optional.Bool**| Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. | + +### Return type + +[**ServerlessV1Service**](serverless.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateVariable + +> ServerlessV1ServiceEnvironmentVariable UpdateVariable(ctx, ServiceSid, EnvironmentSid, Sid, optional) + + + +Update a specific Variable. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the Service to update the Variable resource under. | +**EnvironmentSid** | **string**| The SID of the Environment with the Variable resource to update. | +**Sid** | **string**| The SID of the Variable resource to update. | + **optional** | ***UpdateVariableOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateVariableOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Key** | **optional.String**| A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. | + **Value** | **optional.String**| A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. | + +### Return type + +[**ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/serverless/v1/docs/ListAssetResponse.md b/rest/serverless/v1/docs/ListAssetResponse.md new file mode 100644 index 000000000..af9a45800 --- /dev/null +++ b/rest/serverless/v1/docs/ListAssetResponse.md @@ -0,0 +1,12 @@ +# ListAssetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Assets** | [**[]ServerlessV1ServiceAsset**](serverless.v1.service.asset.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListAssetVersionResponse.md b/rest/serverless/v1/docs/ListAssetVersionResponse.md new file mode 100644 index 000000000..e75dac1a0 --- /dev/null +++ b/rest/serverless/v1/docs/ListAssetVersionResponse.md @@ -0,0 +1,12 @@ +# ListAssetVersionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssetVersions** | [**[]ServerlessV1ServiceAssetAssetVersion**](serverless.v1.service.asset.asset_version.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListBuildResponse.md b/rest/serverless/v1/docs/ListBuildResponse.md new file mode 100644 index 000000000..147530b12 --- /dev/null +++ b/rest/serverless/v1/docs/ListBuildResponse.md @@ -0,0 +1,12 @@ +# ListBuildResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Builds** | [**[]ServerlessV1ServiceBuild**](serverless.v1.service.build.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListDeploymentResponse.md b/rest/serverless/v1/docs/ListDeploymentResponse.md new file mode 100644 index 000000000..383c5c744 --- /dev/null +++ b/rest/serverless/v1/docs/ListDeploymentResponse.md @@ -0,0 +1,12 @@ +# ListDeploymentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployments** | [**[]ServerlessV1ServiceEnvironmentDeployment**](serverless.v1.service.environment.deployment.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListEnvironmentResponse.md b/rest/serverless/v1/docs/ListEnvironmentResponse.md new file mode 100644 index 000000000..7da9b9aac --- /dev/null +++ b/rest/serverless/v1/docs/ListEnvironmentResponse.md @@ -0,0 +1,12 @@ +# ListEnvironmentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Environments** | [**[]ServerlessV1ServiceEnvironment**](serverless.v1.service.environment.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListFunctionResponse.md b/rest/serverless/v1/docs/ListFunctionResponse.md new file mode 100644 index 000000000..9f93ba962 --- /dev/null +++ b/rest/serverless/v1/docs/ListFunctionResponse.md @@ -0,0 +1,12 @@ +# ListFunctionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Functions** | [**[]ServerlessV1ServiceFunction**](serverless.v1.service.function.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListFunctionVersionResponse.md b/rest/serverless/v1/docs/ListFunctionVersionResponse.md new file mode 100644 index 000000000..4397ce7fd --- /dev/null +++ b/rest/serverless/v1/docs/ListFunctionVersionResponse.md @@ -0,0 +1,12 @@ +# ListFunctionVersionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FunctionVersions** | [**[]ServerlessV1ServiceFunctionFunctionVersion**](serverless.v1.service.function.function_version.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListLogResponse.md b/rest/serverless/v1/docs/ListLogResponse.md new file mode 100644 index 000000000..b9081a10c --- /dev/null +++ b/rest/serverless/v1/docs/ListLogResponse.md @@ -0,0 +1,12 @@ +# ListLogResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Logs** | [**[]ServerlessV1ServiceEnvironmentLog**](serverless.v1.service.environment.log.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListServiceResponse.md b/rest/serverless/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..5af456488 --- /dev/null +++ b/rest/serverless/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Services** | [**[]ServerlessV1Service**](serverless.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListServiceResponseMeta.md b/rest/serverless/v1/docs/ListServiceResponseMeta.md new file mode 100644 index 000000000..010bc7d70 --- /dev/null +++ b/rest/serverless/v1/docs/ListServiceResponseMeta.md @@ -0,0 +1,17 @@ +# ListServiceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ListVariableResponse.md b/rest/serverless/v1/docs/ListVariableResponse.md new file mode 100644 index 000000000..3ae362c1a --- /dev/null +++ b/rest/serverless/v1/docs/ListVariableResponse.md @@ -0,0 +1,12 @@ +# ListVariableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Variables** | [**[]ServerlessV1ServiceEnvironmentVariable**](serverless.v1.service.environment.variable.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1Service.md b/rest/serverless/v1/docs/ServerlessV1Service.md new file mode 100644 index 000000000..761ff5de0 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1Service.md @@ -0,0 +1,20 @@ +# ServerlessV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IncludeCredentials** | **bool** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UiEditable** | **bool** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md b/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md new file mode 100644 index 000000000..9c8f11bcc --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceAsset.md @@ -0,0 +1,18 @@ +# ServerlessV1ServiceAsset + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md b/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md new file mode 100644 index 000000000..caedcf5aa --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceAssetAssetVersion.md @@ -0,0 +1,18 @@ +# ServerlessV1ServiceAssetAssetVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssetSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**Path** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Visibility** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md b/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md new file mode 100644 index 000000000..697107924 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceBuild.md @@ -0,0 +1,21 @@ +# ServerlessV1ServiceBuild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssetVersions** | **[]map[string]interface{}** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Dependencies** | **[]map[string]interface{}** | | [optional] +**FunctionVersions** | **[]map[string]interface{}** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md b/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md new file mode 100644 index 000000000..4d4729f04 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceBuildBuildStatus.md @@ -0,0 +1,15 @@ +# ServerlessV1ServiceBuildBuildStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md new file mode 100644 index 000000000..97bc6d912 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironment.md @@ -0,0 +1,21 @@ +# ServerlessV1ServiceEnvironment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BuildSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DomainName** | **string** | | [optional] +**DomainSuffix** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md new file mode 100644 index 000000000..99aa028ba --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentDeployment.md @@ -0,0 +1,18 @@ +# ServerlessV1ServiceEnvironmentDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BuildSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**EnvironmentSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md new file mode 100644 index 000000000..fec1d680e --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentLog.md @@ -0,0 +1,22 @@ +# ServerlessV1ServiceEnvironmentLog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**BuildSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DeploymentSid** | **string** | | [optional] +**EnvironmentSid** | **string** | | [optional] +**FunctionSid** | **string** | | [optional] +**Level** | **string** | | [optional] +**Message** | **string** | | [optional] +**RequestSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md new file mode 100644 index 000000000..eefd8cba2 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceEnvironmentVariable.md @@ -0,0 +1,19 @@ +# ServerlessV1ServiceEnvironmentVariable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**EnvironmentSid** | **string** | | [optional] +**Key** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Value** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md b/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md new file mode 100644 index 000000000..bf1a4f647 --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceFunction.md @@ -0,0 +1,18 @@ +# ServerlessV1ServiceFunction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md b/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md new file mode 100644 index 000000000..5064c88cb --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersion.md @@ -0,0 +1,19 @@ +# ServerlessV1ServiceFunctionFunctionVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**FunctionSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Path** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Visibility** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md b/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md new file mode 100644 index 000000000..839dae29e --- /dev/null +++ b/rest/serverless/v1/docs/ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent.md @@ -0,0 +1,16 @@ +# ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Content** | **string** | | [optional] +**FunctionSid** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/UpdateAssetRequest.md b/rest/serverless/v1/docs/UpdateAssetRequest.md new file mode 100644 index 000000000..6c75ad5d9 --- /dev/null +++ b/rest/serverless/v1/docs/UpdateAssetRequest.md @@ -0,0 +1,11 @@ +# UpdateAssetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/UpdateFunctionRequest.md b/rest/serverless/v1/docs/UpdateFunctionRequest.md new file mode 100644 index 000000000..cdf6c1dfb --- /dev/null +++ b/rest/serverless/v1/docs/UpdateFunctionRequest.md @@ -0,0 +1,11 @@ +# UpdateFunctionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/UpdateServiceRequest.md b/rest/serverless/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..bbf5f4682 --- /dev/null +++ b/rest/serverless/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,13 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. | [optional] +**IncludeCredentials** | **bool** | Whether to inject Account credentials into a function invocation context. | [optional] +**UiEditable** | **bool** | Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/docs/UpdateVariableRequest.md b/rest/serverless/v1/docs/UpdateVariableRequest.md new file mode 100644 index 000000000..d2f4c9a65 --- /dev/null +++ b/rest/serverless/v1/docs/UpdateVariableRequest.md @@ -0,0 +1,12 @@ +# UpdateVariableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. | [optional] +**Value** | **string** | A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/serverless/v1/model_create_asset_request.go b/rest/serverless/v1/model_create_asset_request.go new file mode 100644 index 000000000..b5f5d2e99 --- /dev/null +++ b/rest/serverless/v1/model_create_asset_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAssetRequest struct for CreateAssetRequest +type CreateAssetRequest struct { + // A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/serverless/v1/model_create_build_request.go b/rest/serverless/v1/model_create_build_request.go new file mode 100644 index 000000000..27d64fccb --- /dev/null +++ b/rest/serverless/v1/model_create_build_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateBuildRequest struct for CreateBuildRequest +type CreateBuildRequest struct { + // The list of Asset Version resource SIDs to include in the Build. + AssetVersions []string `json:"AssetVersions,omitempty"` + // A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency. + Dependencies string `json:"Dependencies,omitempty"` + // The list of the Function Version resource SIDs to include in the Build. + FunctionVersions []string `json:"FunctionVersions,omitempty"` +} diff --git a/rest/serverless/v1/model_create_deployment_request.go b/rest/serverless/v1/model_create_deployment_request.go new file mode 100644 index 000000000..1c434f3ad --- /dev/null +++ b/rest/serverless/v1/model_create_deployment_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDeploymentRequest struct for CreateDeploymentRequest +type CreateDeploymentRequest struct { + // The SID of the Build for the Deployment. + BuildSid string `json:"BuildSid,omitempty"` +} diff --git a/rest/serverless/v1/model_create_environment_request.go b/rest/serverless/v1/model_create_environment_request.go new file mode 100644 index 000000000..f45429923 --- /dev/null +++ b/rest/serverless/v1/model_create_environment_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateEnvironmentRequest struct for CreateEnvironmentRequest +type CreateEnvironmentRequest struct { + // A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters. + DomainSuffix string `json:"DomainSuffix,omitempty"` + // A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/serverless/v1/model_create_function_request.go b/rest/serverless/v1/model_create_function_request.go new file mode 100644 index 000000000..bd05a3f24 --- /dev/null +++ b/rest/serverless/v1/model_create_function_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFunctionRequest struct for CreateFunctionRequest +type CreateFunctionRequest struct { + // A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/serverless/v1/model_create_service_request.go b/rest/serverless/v1/model_create_service_request.go new file mode 100644 index 000000000..131244719 --- /dev/null +++ b/rest/serverless/v1/model_create_service_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName"` + // Whether to inject Account credentials into a function invocation context. The default value is `true`. + IncludeCredentials bool `json:"IncludeCredentials,omitempty"` + // Whether the Service's properties and subresources can be edited via the UI. The default value is `false`. + UiEditable bool `json:"UiEditable,omitempty"` + // A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/serverless/v1/model_create_variable_request.go b/rest/serverless/v1/model_create_variable_request.go new file mode 100644 index 000000000..c65c21199 --- /dev/null +++ b/rest/serverless/v1/model_create_variable_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateVariableRequest struct for CreateVariableRequest +type CreateVariableRequest struct { + // A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. + Key string `json:"Key"` + // A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. + Value string `json:"Value"` +} diff --git a/rest/serverless/v1/model_list_asset_response.go b/rest/serverless/v1/model_list_asset_response.go new file mode 100644 index 000000000..d898d0dab --- /dev/null +++ b/rest/serverless/v1/model_list_asset_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAssetResponse struct for ListAssetResponse +type ListAssetResponse struct { + Assets []ServerlessV1ServiceAsset `json:"Assets,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_asset_version_response.go b/rest/serverless/v1/model_list_asset_version_response.go new file mode 100644 index 000000000..d21c23f44 --- /dev/null +++ b/rest/serverless/v1/model_list_asset_version_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAssetVersionResponse struct for ListAssetVersionResponse +type ListAssetVersionResponse struct { + AssetVersions []ServerlessV1ServiceAssetAssetVersion `json:"AssetVersions,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_build_response.go b/rest/serverless/v1/model_list_build_response.go new file mode 100644 index 000000000..828600631 --- /dev/null +++ b/rest/serverless/v1/model_list_build_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBuildResponse struct for ListBuildResponse +type ListBuildResponse struct { + Builds []ServerlessV1ServiceBuild `json:"Builds,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_deployment_response.go b/rest/serverless/v1/model_list_deployment_response.go new file mode 100644 index 000000000..1ea4d9d26 --- /dev/null +++ b/rest/serverless/v1/model_list_deployment_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDeploymentResponse struct for ListDeploymentResponse +type ListDeploymentResponse struct { + Deployments []ServerlessV1ServiceEnvironmentDeployment `json:"Deployments,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_environment_response.go b/rest/serverless/v1/model_list_environment_response.go new file mode 100644 index 000000000..a686b3d11 --- /dev/null +++ b/rest/serverless/v1/model_list_environment_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEnvironmentResponse struct for ListEnvironmentResponse +type ListEnvironmentResponse struct { + Environments []ServerlessV1ServiceEnvironment `json:"Environments,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_function_response.go b/rest/serverless/v1/model_list_function_response.go new file mode 100644 index 000000000..e370fdd55 --- /dev/null +++ b/rest/serverless/v1/model_list_function_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFunctionResponse struct for ListFunctionResponse +type ListFunctionResponse struct { + Functions []ServerlessV1ServiceFunction `json:"Functions,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_function_version_response.go b/rest/serverless/v1/model_list_function_version_response.go new file mode 100644 index 000000000..476c4e9b6 --- /dev/null +++ b/rest/serverless/v1/model_list_function_version_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFunctionVersionResponse struct for ListFunctionVersionResponse +type ListFunctionVersionResponse struct { + FunctionVersions []ServerlessV1ServiceFunctionFunctionVersion `json:"FunctionVersions,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_log_response.go b/rest/serverless/v1/model_list_log_response.go new file mode 100644 index 000000000..71e207db9 --- /dev/null +++ b/rest/serverless/v1/model_list_log_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListLogResponse struct for ListLogResponse +type ListLogResponse struct { + Logs []ServerlessV1ServiceEnvironmentLog `json:"Logs,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/serverless/v1/model_list_service_response.go b/rest/serverless/v1/model_list_service_response.go new file mode 100644 index 000000000..c530b0f2c --- /dev/null +++ b/rest/serverless/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []ServerlessV1Service `json:"Services,omitempty"` +} diff --git a/rest/serverless/v1/model_list_service_response_meta.go b/rest/serverless/v1/model_list_service_response_meta.go new file mode 100644 index 000000000..1161a2969 --- /dev/null +++ b/rest/serverless/v1/model_list_service_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponseMeta struct for ListServiceResponseMeta +type ListServiceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_list_variable_response.go b/rest/serverless/v1/model_list_variable_response.go new file mode 100644 index 000000000..63ba50218 --- /dev/null +++ b/rest/serverless/v1/model_list_variable_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListVariableResponse struct for ListVariableResponse +type ListVariableResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Variables []ServerlessV1ServiceEnvironmentVariable `json:"Variables,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service.go b/rest/serverless/v1/model_serverless_v1_service.go new file mode 100644 index 000000000..4734f5a8a --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service.go @@ -0,0 +1,27 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1Service struct for ServerlessV1Service +type ServerlessV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IncludeCredentials bool `json:"IncludeCredentials,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UiEditable bool `json:"UiEditable,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_asset.go b/rest/serverless/v1/model_serverless_v1_service_asset.go new file mode 100644 index 000000000..99b7226fa --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_asset.go @@ -0,0 +1,25 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceAsset struct for ServerlessV1ServiceAsset +type ServerlessV1ServiceAsset struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go b/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go new file mode 100644 index 000000000..06e6bacc3 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_asset_asset_version.go @@ -0,0 +1,25 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceAssetAssetVersion struct for ServerlessV1ServiceAssetAssetVersion +type ServerlessV1ServiceAssetAssetVersion struct { + AccountSid string `json:"AccountSid,omitempty"` + AssetSid string `json:"AssetSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + Path string `json:"Path,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + Visibility string `json:"Visibility,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_build.go b/rest/serverless/v1/model_serverless_v1_service_build.go new file mode 100644 index 000000000..5d29a7e46 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_build.go @@ -0,0 +1,28 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceBuild struct for ServerlessV1ServiceBuild +type ServerlessV1ServiceBuild struct { + AccountSid string `json:"AccountSid,omitempty"` + AssetVersions []map[string]interface{} `json:"AssetVersions,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Dependencies []map[string]interface{} `json:"Dependencies,omitempty"` + FunctionVersions []map[string]interface{} `json:"FunctionVersions,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_build_build_status.go b/rest/serverless/v1/model_serverless_v1_service_build_build_status.go new file mode 100644 index 000000000..b28771f9f --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_build_build_status.go @@ -0,0 +1,19 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ServerlessV1ServiceBuildBuildStatus struct for ServerlessV1ServiceBuildBuildStatus +type ServerlessV1ServiceBuildBuildStatus struct { + AccountSid string `json:"AccountSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_environment.go b/rest/serverless/v1/model_serverless_v1_service_environment.go new file mode 100644 index 000000000..55c647470 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_environment.go @@ -0,0 +1,28 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceEnvironment struct for ServerlessV1ServiceEnvironment +type ServerlessV1ServiceEnvironment struct { + AccountSid string `json:"AccountSid,omitempty"` + BuildSid string `json:"BuildSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DomainName string `json:"DomainName,omitempty"` + DomainSuffix string `json:"DomainSuffix,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go b/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go new file mode 100644 index 000000000..e18a81473 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_environment_deployment.go @@ -0,0 +1,25 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceEnvironmentDeployment struct for ServerlessV1ServiceEnvironmentDeployment +type ServerlessV1ServiceEnvironmentDeployment struct { + AccountSid string `json:"AccountSid,omitempty"` + BuildSid string `json:"BuildSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EnvironmentSid string `json:"EnvironmentSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_environment_log.go b/rest/serverless/v1/model_serverless_v1_service_environment_log.go new file mode 100644 index 000000000..6f963b733 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_environment_log.go @@ -0,0 +1,29 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceEnvironmentLog struct for ServerlessV1ServiceEnvironmentLog +type ServerlessV1ServiceEnvironmentLog struct { + AccountSid string `json:"AccountSid,omitempty"` + BuildSid string `json:"BuildSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DeploymentSid string `json:"DeploymentSid,omitempty"` + EnvironmentSid string `json:"EnvironmentSid,omitempty"` + FunctionSid string `json:"FunctionSid,omitempty"` + Level string `json:"Level,omitempty"` + Message string `json:"Message,omitempty"` + RequestSid string `json:"RequestSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_environment_variable.go b/rest/serverless/v1/model_serverless_v1_service_environment_variable.go new file mode 100644 index 000000000..6ef14a9da --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_environment_variable.go @@ -0,0 +1,26 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceEnvironmentVariable struct for ServerlessV1ServiceEnvironmentVariable +type ServerlessV1ServiceEnvironmentVariable struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EnvironmentSid string `json:"EnvironmentSid,omitempty"` + Key string `json:"Key,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + Value string `json:"Value,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_function.go b/rest/serverless/v1/model_serverless_v1_service_function.go new file mode 100644 index 000000000..d1c358b0c --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_function.go @@ -0,0 +1,25 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceFunction struct for ServerlessV1ServiceFunction +type ServerlessV1ServiceFunction struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_function_function_version.go b/rest/serverless/v1/model_serverless_v1_service_function_function_version.go new file mode 100644 index 000000000..f788dd70a --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_function_function_version.go @@ -0,0 +1,26 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// ServerlessV1ServiceFunctionFunctionVersion struct for ServerlessV1ServiceFunctionFunctionVersion +type ServerlessV1ServiceFunctionFunctionVersion struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + FunctionSid string `json:"FunctionSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Path string `json:"Path,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + Visibility string `json:"Visibility,omitempty"` +} diff --git a/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go b/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go new file mode 100644 index 000000000..25ff238c3 --- /dev/null +++ b/rest/serverless/v1/model_serverless_v1_service_function_function_version_function_version_content.go @@ -0,0 +1,20 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct for ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent +type ServerlessV1ServiceFunctionFunctionVersionFunctionVersionContent struct { + AccountSid string `json:"AccountSid,omitempty"` + Content string `json:"Content,omitempty"` + FunctionSid string `json:"FunctionSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/serverless/v1/model_update_asset_request.go b/rest/serverless/v1/model_update_asset_request.go new file mode 100644 index 000000000..90defdfd9 --- /dev/null +++ b/rest/serverless/v1/model_update_asset_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateAssetRequest struct for UpdateAssetRequest +type UpdateAssetRequest struct { + // A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/serverless/v1/model_update_function_request.go b/rest/serverless/v1/model_update_function_request.go new file mode 100644 index 000000000..bb8d12739 --- /dev/null +++ b/rest/serverless/v1/model_update_function_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFunctionRequest struct for UpdateFunctionRequest +type UpdateFunctionRequest struct { + // A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/serverless/v1/model_update_service_request.go b/rest/serverless/v1/model_update_service_request.go new file mode 100644 index 000000000..394badce1 --- /dev/null +++ b/rest/serverless/v1/model_update_service_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether to inject Account credentials into a function invocation context. + IncludeCredentials bool `json:"IncludeCredentials,omitempty"` + // Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`. + UiEditable bool `json:"UiEditable,omitempty"` +} diff --git a/rest/serverless/v1/model_update_variable_request.go b/rest/serverless/v1/model_update_variable_request.go new file mode 100644 index 000000000..bb57e2a7c --- /dev/null +++ b/rest/serverless/v1/model_update_variable_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateVariableRequest struct for UpdateVariableRequest +type UpdateVariableRequest struct { + // A string by which the Variable resource can be referenced. It can be a maximum of 128 characters. + Key string `json:"Key,omitempty"` + // A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size. + Value string `json:"Value,omitempty"` +} diff --git a/rest/serverless/v1/response.go b/rest/serverless/v1/response.go new file mode 100644 index 000000000..132da729c --- /dev/null +++ b/rest/serverless/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Serverless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/studio/v1/.openapi-generator-ignore b/rest/studio/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/studio/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/studio/v1/README.md b/rest/studio/v1/README.md new file mode 100644 index 000000000..e70bbb467 --- /dev/null +++ b/rest/studio/v1/README.md @@ -0,0 +1,100 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateEngagement**](docs/DefaultApi.md#createengagement) | **Post** /v1/Flows/{FlowSid}/Engagements | +*DefaultApi* | [**CreateExecution**](docs/DefaultApi.md#createexecution) | **Post** /v1/Flows/{FlowSid}/Executions | +*DefaultApi* | [**DeleteEngagement**](docs/DefaultApi.md#deleteengagement) | **Delete** /v1/Flows/{FlowSid}/Engagements/{Sid} | +*DefaultApi* | [**DeleteExecution**](docs/DefaultApi.md#deleteexecution) | **Delete** /v1/Flows/{FlowSid}/Executions/{Sid} | +*DefaultApi* | [**DeleteFlow**](docs/DefaultApi.md#deleteflow) | **Delete** /v1/Flows/{Sid} | +*DefaultApi* | [**FetchEngagement**](docs/DefaultApi.md#fetchengagement) | **Get** /v1/Flows/{FlowSid}/Engagements/{Sid} | +*DefaultApi* | [**FetchEngagementContext**](docs/DefaultApi.md#fetchengagementcontext) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context | +*DefaultApi* | [**FetchExecution**](docs/DefaultApi.md#fetchexecution) | **Get** /v1/Flows/{FlowSid}/Executions/{Sid} | +*DefaultApi* | [**FetchExecutionContext**](docs/DefaultApi.md#fetchexecutioncontext) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context | +*DefaultApi* | [**FetchExecutionStep**](docs/DefaultApi.md#fetchexecutionstep) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid} | +*DefaultApi* | [**FetchExecutionStepContext**](docs/DefaultApi.md#fetchexecutionstepcontext) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context | +*DefaultApi* | [**FetchFlow**](docs/DefaultApi.md#fetchflow) | **Get** /v1/Flows/{Sid} | +*DefaultApi* | [**FetchStep**](docs/DefaultApi.md#fetchstep) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid} | +*DefaultApi* | [**FetchStepContext**](docs/DefaultApi.md#fetchstepcontext) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context | +*DefaultApi* | [**ListEngagement**](docs/DefaultApi.md#listengagement) | **Get** /v1/Flows/{FlowSid}/Engagements | +*DefaultApi* | [**ListExecution**](docs/DefaultApi.md#listexecution) | **Get** /v1/Flows/{FlowSid}/Executions | +*DefaultApi* | [**ListExecutionStep**](docs/DefaultApi.md#listexecutionstep) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps | +*DefaultApi* | [**ListFlow**](docs/DefaultApi.md#listflow) | **Get** /v1/Flows | +*DefaultApi* | [**ListStep**](docs/DefaultApi.md#liststep) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps | +*DefaultApi* | [**UpdateExecution**](docs/DefaultApi.md#updateexecution) | **Post** /v1/Flows/{FlowSid}/Executions/{Sid} | + + +## Documentation For Models + + - [CreateEngagementRequest](docs/CreateEngagementRequest.md) + - [CreateExecutionRequest](docs/CreateExecutionRequest.md) + - [ListEngagementResponse](docs/ListEngagementResponse.md) + - [ListExecutionResponse](docs/ListExecutionResponse.md) + - [ListExecutionStepResponse](docs/ListExecutionStepResponse.md) + - [ListFlowResponse](docs/ListFlowResponse.md) + - [ListFlowResponseMeta](docs/ListFlowResponseMeta.md) + - [ListStepResponse](docs/ListStepResponse.md) + - [StudioV1Flow](docs/StudioV1Flow.md) + - [StudioV1FlowEngagement](docs/StudioV1FlowEngagement.md) + - [StudioV1FlowEngagementEngagementContext](docs/StudioV1FlowEngagementEngagementContext.md) + - [StudioV1FlowEngagementStep](docs/StudioV1FlowEngagementStep.md) + - [StudioV1FlowEngagementStepStepContext](docs/StudioV1FlowEngagementStepStepContext.md) + - [StudioV1FlowExecution](docs/StudioV1FlowExecution.md) + - [StudioV1FlowExecutionExecutionContext](docs/StudioV1FlowExecutionExecutionContext.md) + - [StudioV1FlowExecutionExecutionStep](docs/StudioV1FlowExecutionExecutionStep.md) + - [StudioV1FlowExecutionExecutionStepExecutionStepContext](docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md) + - [UpdateExecutionRequest](docs/UpdateExecutionRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/studio/v1/api_default.go b/rest/studio/v1/api_default.go new file mode 100644 index 000000000..ec516d7a8 --- /dev/null +++ b/rest/studio/v1/api_default.go @@ -0,0 +1,780 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://studio.twilio.com"), + } +} +// CreateEngagementParams Optional parameters for the method 'CreateEngagement' +type CreateEngagementParams struct { + From *string `json:"From,omitempty"` + Parameters *map[string]interface{} `json:"Parameters,omitempty"` + To *string `json:"To,omitempty"` +} + +/* +CreateEngagement Method for CreateEngagement +Triggers a new Engagement for the Flow + * @param FlowSid The SID of the Flow. + * @param optional nil or *CreateEngagementOpts - Optional Parameters: + * @param "From" (string) - The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}` + * @param "Parameters" (map[string]interface{}) - A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. + * @param "To" (string) - The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. +@return StudioV1FlowEngagement +*/ +func (c *DefaultApiService) CreateEngagement(FlowSid string, params *CreateEngagementParams) (*StudioV1FlowEngagement, error) { + path := "/v1/Flows/{FlowSid}/Engagements" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) + + if err != nil { + return nil, err + } + + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateExecutionParams Optional parameters for the method 'CreateExecution' +type CreateExecutionParams struct { + From *string `json:"From,omitempty"` + Parameters *map[string]interface{} `json:"Parameters,omitempty"` + To *string `json:"To,omitempty"` +} + +/* +CreateExecution Method for CreateExecution +Triggers a new Execution for the Flow + * @param FlowSid The SID of the Excecution's Flow. + * @param optional nil or *CreateExecutionOpts - Optional Parameters: + * @param "From" (string) - The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. + * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. + * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. +@return StudioV1FlowExecution +*/ +func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV1FlowExecution, error) { + path := "/v1/Flows/{FlowSid}/Executions" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) + + if err != nil { + return nil, err + } + + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteEngagement Method for DeleteEngagement +Delete this Engagement and all Steps relating to it. + * @param FlowSid The SID of the Flow to delete Engagements from. + * @param Sid The SID of the Engagement resource to delete. +*/ +func (c *DefaultApiService) DeleteEngagement(FlowSid string, Sid string) (error) { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteExecution Method for DeleteExecution +Delete the Execution and all Steps relating to it. + * @param FlowSid The SID of the Flow with the Execution resources to delete. + * @param Sid The SID of the Execution resource to delete. +*/ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) (error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFlow Method for DeleteFlow +Delete a specific Flow. + * @param Sid The SID of the Flow resource to delete. +*/ +func (c *DefaultApiService) DeleteFlow(Sid string) (error) { + path := "/v1/Flows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchEngagement Method for FetchEngagement +Retrieve an Engagement + * @param FlowSid The SID of the Flow. + * @param Sid The SID of the Engagement resource to fetch. +@return StudioV1FlowEngagement +*/ +func (c *DefaultApiService) FetchEngagement(FlowSid string, Sid string) (*StudioV1FlowEngagement, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagement{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEngagementContext Method for FetchEngagementContext +Retrieve the most recent context for an Engagement. + * @param FlowSid The SID of the Flow. + * @param EngagementSid The SID of the Engagement. +@return StudioV1FlowEngagementEngagementContext +*/ +func (c *DefaultApiService) FetchEngagementContext(FlowSid string, EngagementSid string) (*StudioV1FlowEngagementEngagementContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagementEngagementContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecution Method for FetchExecution +Retrieve an Execution + * @param FlowSid The SID of the Flow with the Execution resource to fetch + * @param Sid The SID of the Execution resource to fetch. +@return StudioV1FlowExecution +*/ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV1FlowExecution, error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionContext Method for FetchExecutionContext +Retrieve the most recent context for an Execution. + * @param FlowSid The SID of the Flow with the Execution context to fetch. + * @param ExecutionSid The SID of the Execution context to fetch. +@return StudioV1FlowExecutionExecutionContext +*/ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV1FlowExecutionExecutionContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionStep Method for FetchExecutionStep +Retrieve a Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param ExecutionSid The SID of the Execution resource with the Step to fetch. + * @param Sid The SID of the ExecutionStep resource to fetch. +@return StudioV1FlowExecutionExecutionStep +*/ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV1FlowExecutionExecutionStep, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionStepContext Method for FetchExecutionStepContext +Retrieve the context for an Execution Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param ExecutionSid The SID of the Execution resource with the Step to fetch. + * @param StepSid The SID of the Step to fetch. +@return StudioV1FlowExecutionExecutionStepExecutionStepContext +*/ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV1FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFlow Method for FetchFlow +Retrieve a specific Flow. + * @param Sid The SID of the Flow resource to fetch. +@return StudioV1Flow +*/ +func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV1Flow, error) { + path := "/v1/Flows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchStep Method for FetchStep +Retrieve a Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param EngagementSid The SID of the Engagement with the Step to fetch. + * @param Sid The SID of the Step resource to fetch. +@return StudioV1FlowEngagementStep +*/ +func (c *DefaultApiService) FetchStep(FlowSid string, EngagementSid string, Sid string) (*StudioV1FlowEngagementStep, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagementStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchStepContext Method for FetchStepContext +Retrieve the context for an Engagement Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param EngagementSid The SID of the Engagement with the Step to fetch. + * @param StepSid The SID of the Step to fetch +@return StudioV1FlowEngagementStepStepContext +*/ +func (c *DefaultApiService) FetchStepContext(FlowSid string, EngagementSid string, StepSid string) (*StudioV1FlowEngagementStepStepContext, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) + path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowEngagementStepStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEngagementParams Optional parameters for the method 'ListEngagement' +type ListEngagementParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEngagement Method for ListEngagement +Retrieve a list of all Engagements for the Flow. + * @param FlowSid The SID of the Flow to read Engagements from. + * @param optional nil or *ListEngagementOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEngagementResponse +*/ +func (c *DefaultApiService) ListEngagement(FlowSid string, params *ListEngagementParams) (*ListEngagementResponse, error) { + path := "/v1/Flows/{FlowSid}/Engagements" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEngagementResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExecutionParams Optional parameters for the method 'ListExecution' +type ListExecutionParams struct { + DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExecution Method for ListExecution +Retrieve a list of all Executions for the Flow. + * @param FlowSid The SID of the Flow with the Execution resources to read. + * @param optional nil or *ListExecutionOpts - Optional Parameters: + * @param "DateCreatedFrom" (time.Time) - Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. + * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExecutionResponse +*/ +func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { + path := "/v1/Flows/{FlowSid}/Executions" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) + } + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' +type ListExecutionStepParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExecutionStep Method for ListExecutionStep +Retrieve a list of all Steps for an Execution. + * @param FlowSid The SID of the Flow with the Steps to read. + * @param ExecutionSid The SID of the Execution with the Steps to read. + * @param optional nil or *ListExecutionStepOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExecutionStepResponse +*/ +func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { + path := "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFlowParams Optional parameters for the method 'ListFlow' +type ListFlowParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFlow Method for ListFlow +Retrieve a list of all Flows. + * @param optional nil or *ListFlowOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFlowResponse +*/ +func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { + path := "/v1/Flows" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListStepParams Optional parameters for the method 'ListStep' +type ListStepParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListStep Method for ListStep +Retrieve a list of all Steps for an Engagement. + * @param FlowSid The SID of the Flow with the Step to read. + * @param EngagementSid The SID of the Engagement with the Step to read. + * @param optional nil or *ListStepOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListStepResponse +*/ +func (c *DefaultApiService) ListStep(FlowSid string, EngagementSid string, params *ListStepParams) (*ListStepResponse, error) { + path := "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"EngagementSid"+"}", EngagementSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateExecutionParams Optional parameters for the method 'UpdateExecution' +type UpdateExecutionParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateExecution Method for UpdateExecution +Update the status of an Execution to `ended`. + * @param FlowSid The SID of the Flow with the Execution resources to update. + * @param Sid The SID of the Execution resource to update. + * @param optional nil or *UpdateExecutionOpts - Optional Parameters: + * @param "Status" (string) - The status of the Execution. Can only be `ended`. +@return StudioV1FlowExecution +*/ +func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV1FlowExecution, error) { + path := "/v1/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV1FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/studio/v1/docs/CreateEngagementRequest.md b/rest/studio/v1/docs/CreateEngagementRequest.md new file mode 100644 index 000000000..60ba763b0 --- /dev/null +++ b/rest/studio/v1/docs/CreateEngagementRequest.md @@ -0,0 +1,13 @@ +# CreateEngagementRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}` | +**Parameters** | [**map[string]interface{}**](.md) | A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. | [optional] +**To** | **string** | The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/CreateExecutionRequest.md b/rest/studio/v1/docs/CreateExecutionRequest.md new file mode 100644 index 000000000..8c95f1f5b --- /dev/null +++ b/rest/studio/v1/docs/CreateExecutionRequest.md @@ -0,0 +1,13 @@ +# CreateExecutionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. | +**Parameters** | [**map[string]interface{}**](.md) | JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. | [optional] +**To** | **string** | The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/DefaultApi.md b/rest/studio/v1/docs/DefaultApi.md new file mode 100644 index 000000000..fbb4d546a --- /dev/null +++ b/rest/studio/v1/docs/DefaultApi.md @@ -0,0 +1,820 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateEngagement**](DefaultApi.md#CreateEngagement) | **Post** /v1/Flows/{FlowSid}/Engagements | +[**CreateExecution**](DefaultApi.md#CreateExecution) | **Post** /v1/Flows/{FlowSid}/Executions | +[**DeleteEngagement**](DefaultApi.md#DeleteEngagement) | **Delete** /v1/Flows/{FlowSid}/Engagements/{Sid} | +[**DeleteExecution**](DefaultApi.md#DeleteExecution) | **Delete** /v1/Flows/{FlowSid}/Executions/{Sid} | +[**DeleteFlow**](DefaultApi.md#DeleteFlow) | **Delete** /v1/Flows/{Sid} | +[**FetchEngagement**](DefaultApi.md#FetchEngagement) | **Get** /v1/Flows/{FlowSid}/Engagements/{Sid} | +[**FetchEngagementContext**](DefaultApi.md#FetchEngagementContext) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context | +[**FetchExecution**](DefaultApi.md#FetchExecution) | **Get** /v1/Flows/{FlowSid}/Executions/{Sid} | +[**FetchExecutionContext**](DefaultApi.md#FetchExecutionContext) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context | +[**FetchExecutionStep**](DefaultApi.md#FetchExecutionStep) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid} | +[**FetchExecutionStepContext**](DefaultApi.md#FetchExecutionStepContext) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context | +[**FetchFlow**](DefaultApi.md#FetchFlow) | **Get** /v1/Flows/{Sid} | +[**FetchStep**](DefaultApi.md#FetchStep) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid} | +[**FetchStepContext**](DefaultApi.md#FetchStepContext) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context | +[**ListEngagement**](DefaultApi.md#ListEngagement) | **Get** /v1/Flows/{FlowSid}/Engagements | +[**ListExecution**](DefaultApi.md#ListExecution) | **Get** /v1/Flows/{FlowSid}/Executions | +[**ListExecutionStep**](DefaultApi.md#ListExecutionStep) | **Get** /v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps | +[**ListFlow**](DefaultApi.md#ListFlow) | **Get** /v1/Flows | +[**ListStep**](DefaultApi.md#ListStep) | **Get** /v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps | +[**UpdateExecution**](DefaultApi.md#UpdateExecution) | **Post** /v1/Flows/{FlowSid}/Executions/{Sid} | + + + +## CreateEngagement + +> StudioV1FlowEngagement CreateEngagement(ctx, FlowSid, optional) + + + +Triggers a new Engagement for the Flow + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow. | + **optional** | ***CreateEngagementOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateEngagementOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **From** | **optional.String**| The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}` | + **Parameters** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. | + **To** | **optional.String**| The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. | + +### Return type + +[**StudioV1FlowEngagement**](studio.v1.flow.engagement.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateExecution + +> StudioV1FlowExecution CreateExecution(ctx, FlowSid, optional) + + + +Triggers a new Execution for the Flow + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Excecution's Flow. | + **optional** | ***CreateExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **From** | **optional.String**| The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. | + **Parameters** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. | + **To** | **optional.String**| The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. | + +### Return type + +[**StudioV1FlowExecution**](studio.v1.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEngagement + +> DeleteEngagement(ctx, FlowSid, Sid) + + + +Delete this Engagement and all Steps relating to it. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow to delete Engagements from. | +**Sid** | **string**| The SID of the Engagement resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteExecution + +> DeleteExecution(ctx, FlowSid, Sid) + + + +Delete the Execution and all Steps relating to it. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to delete. | +**Sid** | **string**| The SID of the Execution resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFlow + +> DeleteFlow(ctx, Sid) + + + +Delete a specific Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEngagement + +> StudioV1FlowEngagement FetchEngagement(ctx, FlowSid, Sid) + + + +Retrieve an Engagement + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow. | +**Sid** | **string**| The SID of the Engagement resource to fetch. | + +### Return type + +[**StudioV1FlowEngagement**](studio.v1.flow.engagement.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEngagementContext + +> StudioV1FlowEngagementEngagementContext FetchEngagementContext(ctx, FlowSid, EngagementSid) + + + +Retrieve the most recent context for an Engagement. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow. | +**EngagementSid** | **string**| The SID of the Engagement. | + +### Return type + +[**StudioV1FlowEngagementEngagementContext**](studio.v1.flow.engagement.engagement_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecution + +> StudioV1FlowExecution FetchExecution(ctx, FlowSid, Sid) + + + +Retrieve an Execution + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resource to fetch | +**Sid** | **string**| The SID of the Execution resource to fetch. | + +### Return type + +[**StudioV1FlowExecution**](studio.v1.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionContext + +> StudioV1FlowExecutionExecutionContext FetchExecutionContext(ctx, FlowSid, ExecutionSid) + + + +Retrieve the most recent context for an Execution. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution context to fetch. | +**ExecutionSid** | **string**| The SID of the Execution context to fetch. | + +### Return type + +[**StudioV1FlowExecutionExecutionContext**](studio.v1.flow.execution.execution_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionStep + +> StudioV1FlowExecutionExecutionStep FetchExecutionStep(ctx, FlowSid, ExecutionSid, Sid) + + + +Retrieve a Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**ExecutionSid** | **string**| The SID of the Execution resource with the Step to fetch. | +**Sid** | **string**| The SID of the ExecutionStep resource to fetch. | + +### Return type + +[**StudioV1FlowExecutionExecutionStep**](studio.v1.flow.execution.execution_step.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionStepContext + +> StudioV1FlowExecutionExecutionStepExecutionStepContext FetchExecutionStepContext(ctx, FlowSid, ExecutionSid, StepSid) + + + +Retrieve the context for an Execution Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**ExecutionSid** | **string**| The SID of the Execution resource with the Step to fetch. | +**StepSid** | **string**| The SID of the Step to fetch. | + +### Return type + +[**StudioV1FlowExecutionExecutionStepExecutionStepContext**](studio.v1.flow.execution.execution_step.execution_step_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFlow + +> StudioV1Flow FetchFlow(ctx, Sid) + + + +Retrieve a specific Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to fetch. | + +### Return type + +[**StudioV1Flow**](studio.v1.flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchStep + +> StudioV1FlowEngagementStep FetchStep(ctx, FlowSid, EngagementSid, Sid) + + + +Retrieve a Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**EngagementSid** | **string**| The SID of the Engagement with the Step to fetch. | +**Sid** | **string**| The SID of the Step resource to fetch. | + +### Return type + +[**StudioV1FlowEngagementStep**](studio.v1.flow.engagement.step.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchStepContext + +> StudioV1FlowEngagementStepStepContext FetchStepContext(ctx, FlowSid, EngagementSid, StepSid) + + + +Retrieve the context for an Engagement Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**EngagementSid** | **string**| The SID of the Engagement with the Step to fetch. | +**StepSid** | **string**| The SID of the Step to fetch | + +### Return type + +[**StudioV1FlowEngagementStepStepContext**](studio.v1.flow.engagement.step.step_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEngagement + +> ListEngagementResponse ListEngagement(ctx, FlowSid, optional) + + + +Retrieve a list of all Engagements for the Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow to read Engagements from. | + **optional** | ***ListEngagementOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEngagementOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEngagementResponse**](ListEngagementResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExecution + +> ListExecutionResponse ListExecution(ctx, FlowSid, optional) + + + +Retrieve a list of all Executions for the Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to read. | + **optional** | ***ListExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DateCreatedFrom** | **optional.Time**| Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. | + **DateCreatedTo** | **optional.Time**| Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExecutionResponse**](ListExecutionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExecutionStep + +> ListExecutionStepResponse ListExecutionStep(ctx, FlowSid, ExecutionSid, optional) + + + +Retrieve a list of all Steps for an Execution. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Steps to read. | +**ExecutionSid** | **string**| The SID of the Execution with the Steps to read. | + **optional** | ***ListExecutionStepOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExecutionStepOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExecutionStepResponse**](ListExecutionStepResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFlow + +> ListFlowResponse ListFlow(ctx, optional) + + + +Retrieve a list of all Flows. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFlowResponse**](ListFlowResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListStep + +> ListStepResponse ListStep(ctx, FlowSid, EngagementSid, optional) + + + +Retrieve a list of all Steps for an Engagement. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to read. | +**EngagementSid** | **string**| The SID of the Engagement with the Step to read. | + **optional** | ***ListStepOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListStepOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListStepResponse**](ListStepResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExecution + +> StudioV1FlowExecution UpdateExecution(ctx, FlowSid, Sid, optional) + + + +Update the status of an Execution to `ended`. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to update. | +**Sid** | **string**| The SID of the Execution resource to update. | + **optional** | ***UpdateExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Status** | **optional.String**| The status of the Execution. Can only be `ended`. | + +### Return type + +[**StudioV1FlowExecution**](studio.v1.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/studio/v1/docs/ListEngagementResponse.md b/rest/studio/v1/docs/ListEngagementResponse.md new file mode 100644 index 000000000..c8b110201 --- /dev/null +++ b/rest/studio/v1/docs/ListEngagementResponse.md @@ -0,0 +1,12 @@ +# ListEngagementResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Engagements** | [**[]StudioV1FlowEngagement**](studio.v1.flow.engagement.md) | | [optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/ListExecutionResponse.md b/rest/studio/v1/docs/ListExecutionResponse.md new file mode 100644 index 000000000..325069f08 --- /dev/null +++ b/rest/studio/v1/docs/ListExecutionResponse.md @@ -0,0 +1,12 @@ +# ListExecutionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Executions** | [**[]StudioV1FlowExecution**](studio.v1.flow.execution.md) | | [optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/ListExecutionStepResponse.md b/rest/studio/v1/docs/ListExecutionStepResponse.md new file mode 100644 index 000000000..f5860216a --- /dev/null +++ b/rest/studio/v1/docs/ListExecutionStepResponse.md @@ -0,0 +1,12 @@ +# ListExecutionStepResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] +**Steps** | [**[]StudioV1FlowExecutionExecutionStep**](studio.v1.flow.execution.execution_step.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/ListFlowResponse.md b/rest/studio/v1/docs/ListFlowResponse.md new file mode 100644 index 000000000..6e8ae13bd --- /dev/null +++ b/rest/studio/v1/docs/ListFlowResponse.md @@ -0,0 +1,12 @@ +# ListFlowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flows** | [**[]StudioV1Flow**](studio.v1.flow.md) | | [optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/ListFlowResponseMeta.md b/rest/studio/v1/docs/ListFlowResponseMeta.md new file mode 100644 index 000000000..c0868ff93 --- /dev/null +++ b/rest/studio/v1/docs/ListFlowResponseMeta.md @@ -0,0 +1,17 @@ +# ListFlowResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/ListStepResponse.md b/rest/studio/v1/docs/ListStepResponse.md new file mode 100644 index 000000000..5bc063d5a --- /dev/null +++ b/rest/studio/v1/docs/ListStepResponse.md @@ -0,0 +1,12 @@ +# ListStepResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] +**Steps** | [**[]StudioV1FlowEngagementStep**](studio.v1.flow.engagement.step.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1Flow.md b/rest/studio/v1/docs/StudioV1Flow.md new file mode 100644 index 000000000..0892978e7 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1Flow.md @@ -0,0 +1,19 @@ +# StudioV1Flow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] +**Version** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowEngagement.md b/rest/studio/v1/docs/StudioV1FlowEngagement.md new file mode 100644 index 000000000..5f84ea459 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowEngagement.md @@ -0,0 +1,21 @@ +# StudioV1FlowEngagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ContactChannelAddress** | **string** | | [optional] +**ContactSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md b/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md new file mode 100644 index 000000000..9f26008cd --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowEngagementEngagementContext.md @@ -0,0 +1,15 @@ +# StudioV1FlowEngagementEngagementContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**EngagementSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowEngagementStep.md b/rest/studio/v1/docs/StudioV1FlowEngagementStep.md new file mode 100644 index 000000000..39b84bebe --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowEngagementStep.md @@ -0,0 +1,22 @@ +# StudioV1FlowEngagementStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**EngagementSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TransitionedFrom** | **string** | | [optional] +**TransitionedTo** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md b/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md new file mode 100644 index 000000000..0ef567eb3 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowEngagementStepStepContext.md @@ -0,0 +1,16 @@ +# StudioV1FlowEngagementStepStepContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**EngagementSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**StepSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowExecution.md b/rest/studio/v1/docs/StudioV1FlowExecution.md new file mode 100644 index 000000000..768adcb97 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowExecution.md @@ -0,0 +1,21 @@ +# StudioV1FlowExecution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ContactChannelAddress** | **string** | | [optional] +**ContactSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md new file mode 100644 index 000000000..8294dc110 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionContext.md @@ -0,0 +1,15 @@ +# StudioV1FlowExecutionExecutionContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md new file mode 100644 index 000000000..04dd924e8 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStep.md @@ -0,0 +1,22 @@ +# StudioV1FlowExecutionExecutionStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TransitionedFrom** | **string** | | [optional] +**TransitionedTo** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md new file mode 100644 index 000000000..2ee94a572 --- /dev/null +++ b/rest/studio/v1/docs/StudioV1FlowExecutionExecutionStepExecutionStepContext.md @@ -0,0 +1,16 @@ +# StudioV1FlowExecutionExecutionStepExecutionStepContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**StepSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/docs/UpdateExecutionRequest.md b/rest/studio/v1/docs/UpdateExecutionRequest.md new file mode 100644 index 000000000..06aa5497f --- /dev/null +++ b/rest/studio/v1/docs/UpdateExecutionRequest.md @@ -0,0 +1,11 @@ +# UpdateExecutionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The status of the Execution. Can only be `ended`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v1/model_create_engagement_request.go b/rest/studio/v1/model_create_engagement_request.go new file mode 100644 index 000000000..c630bad0e --- /dev/null +++ b/rest/studio/v1/model_create_engagement_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateEngagementRequest struct for CreateEngagementRequest +type CreateEngagementRequest struct { + // The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}` + From string `json:"From"` + // A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string. + Parameters map[string]interface{} `json:"Parameters,omitempty"` + // The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`. + To string `json:"To"` +} diff --git a/rest/studio/v1/model_create_execution_request.go b/rest/studio/v1/model_create_execution_request.go new file mode 100644 index 000000000..0a9c1d66a --- /dev/null +++ b/rest/studio/v1/model_create_execution_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateExecutionRequest struct for CreateExecutionRequest +type CreateExecutionRequest struct { + // The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. + From string `json:"From"` + // JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. + Parameters map[string]interface{} `json:"Parameters,omitempty"` + // The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. + To string `json:"To"` +} diff --git a/rest/studio/v1/model_list_engagement_response.go b/rest/studio/v1/model_list_engagement_response.go new file mode 100644 index 000000000..ceb55cfce --- /dev/null +++ b/rest/studio/v1/model_list_engagement_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEngagementResponse struct for ListEngagementResponse +type ListEngagementResponse struct { + Engagements []StudioV1FlowEngagement `json:"Engagements,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/studio/v1/model_list_execution_response.go b/rest/studio/v1/model_list_execution_response.go new file mode 100644 index 000000000..eb5cf4a14 --- /dev/null +++ b/rest/studio/v1/model_list_execution_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExecutionResponse struct for ListExecutionResponse +type ListExecutionResponse struct { + Executions []StudioV1FlowExecution `json:"Executions,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/studio/v1/model_list_execution_step_response.go b/rest/studio/v1/model_list_execution_step_response.go new file mode 100644 index 000000000..18a7616c5 --- /dev/null +++ b/rest/studio/v1/model_list_execution_step_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExecutionStepResponse struct for ListExecutionStepResponse +type ListExecutionStepResponse struct { + Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Steps []StudioV1FlowExecutionExecutionStep `json:"Steps,omitempty"` +} diff --git a/rest/studio/v1/model_list_flow_response.go b/rest/studio/v1/model_list_flow_response.go new file mode 100644 index 000000000..fd8c5354c --- /dev/null +++ b/rest/studio/v1/model_list_flow_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlowResponse struct for ListFlowResponse +type ListFlowResponse struct { + Flows []StudioV1Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/studio/v1/model_list_flow_response_meta.go b/rest/studio/v1/model_list_flow_response_meta.go new file mode 100644 index 000000000..e1a201290 --- /dev/null +++ b/rest/studio/v1/model_list_flow_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlowResponseMeta struct for ListFlowResponseMeta +type ListFlowResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_list_step_response.go b/rest/studio/v1/model_list_step_response.go new file mode 100644 index 000000000..718161fc4 --- /dev/null +++ b/rest/studio/v1/model_list_step_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListStepResponse struct for ListStepResponse +type ListStepResponse struct { + Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Steps []StudioV1FlowEngagementStep `json:"Steps,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow.go b/rest/studio/v1/model_studio_v1_flow.go new file mode 100644 index 000000000..ee7840f5e --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow.go @@ -0,0 +1,26 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV1Flow struct for StudioV1Flow +type StudioV1Flow struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` + Version int32 `json:"Version,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_engagement.go b/rest/studio/v1/model_studio_v1_flow_engagement.go new file mode 100644 index 000000000..58ce77050 --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_engagement.go @@ -0,0 +1,28 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV1FlowEngagement struct for StudioV1FlowEngagement +type StudioV1FlowEngagement struct { + AccountSid string `json:"AccountSid,omitempty"` + ContactChannelAddress string `json:"ContactChannelAddress,omitempty"` + ContactSid string `json:"ContactSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go b/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go new file mode 100644 index 000000000..50c7c0a68 --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_engagement_engagement_context.go @@ -0,0 +1,19 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV1FlowEngagementEngagementContext struct for StudioV1FlowEngagementEngagementContext +type StudioV1FlowEngagementEngagementContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + EngagementSid string `json:"EngagementSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_engagement_step.go b/rest/studio/v1/model_studio_v1_flow_engagement_step.go new file mode 100644 index 000000000..5ebdbba2d --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_engagement_step.go @@ -0,0 +1,29 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV1FlowEngagementStep struct for StudioV1FlowEngagementStep +type StudioV1FlowEngagementStep struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EngagementSid string `json:"EngagementSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Sid string `json:"Sid,omitempty"` + TransitionedFrom string `json:"TransitionedFrom,omitempty"` + TransitionedTo string `json:"TransitionedTo,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go b/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go new file mode 100644 index 000000000..facafe45b --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_engagement_step_step_context.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV1FlowEngagementStepStepContext struct for StudioV1FlowEngagementStepStepContext +type StudioV1FlowEngagementStepStepContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + EngagementSid string `json:"EngagementSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + StepSid string `json:"StepSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_execution.go b/rest/studio/v1/model_studio_v1_flow_execution.go new file mode 100644 index 000000000..cdeaa03aa --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_execution.go @@ -0,0 +1,28 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV1FlowExecution struct for StudioV1FlowExecution +type StudioV1FlowExecution struct { + AccountSid string `json:"AccountSid,omitempty"` + ContactChannelAddress string `json:"ContactChannelAddress,omitempty"` + ContactSid string `json:"ContactSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go b/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go new file mode 100644 index 000000000..dea9d5697 --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_execution_execution_context.go @@ -0,0 +1,19 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV1FlowExecutionExecutionContext struct for StudioV1FlowExecutionExecutionContext +type StudioV1FlowExecutionExecutionContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go b/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go new file mode 100644 index 000000000..abeb238c5 --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_execution_execution_step.go @@ -0,0 +1,29 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV1FlowExecutionExecutionStep struct for StudioV1FlowExecutionExecutionStep +type StudioV1FlowExecutionExecutionStep struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Sid string `json:"Sid,omitempty"` + TransitionedFrom string `json:"TransitionedFrom,omitempty"` + TransitionedTo string `json:"TransitionedTo,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go b/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go new file mode 100644 index 000000000..55ec8506b --- /dev/null +++ b/rest/studio/v1/model_studio_v1_flow_execution_execution_step_execution_step_context.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV1FlowExecutionExecutionStepExecutionStepContext struct for StudioV1FlowExecutionExecutionStepExecutionStepContext +type StudioV1FlowExecutionExecutionStepExecutionStepContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + StepSid string `json:"StepSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v1/model_update_execution_request.go b/rest/studio/v1/model_update_execution_request.go new file mode 100644 index 000000000..a1c3b3301 --- /dev/null +++ b/rest/studio/v1/model_update_execution_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateExecutionRequest struct for UpdateExecutionRequest +type UpdateExecutionRequest struct { + // The status of the Execution. Can only be `ended`. + Status string `json:"Status"` +} diff --git a/rest/studio/v1/response.go b/rest/studio/v1/response.go new file mode 100644 index 000000000..d2c742ccf --- /dev/null +++ b/rest/studio/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/studio/v2/.openapi-generator-ignore b/rest/studio/v2/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/studio/v2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/studio/v2/README.md b/rest/studio/v2/README.md new file mode 100644 index 000000000..ad58eacc9 --- /dev/null +++ b/rest/studio/v2/README.md @@ -0,0 +1,100 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateExecution**](docs/DefaultApi.md#createexecution) | **Post** /v2/Flows/{FlowSid}/Executions | +*DefaultApi* | [**CreateFlow**](docs/DefaultApi.md#createflow) | **Post** /v2/Flows | +*DefaultApi* | [**DeleteExecution**](docs/DefaultApi.md#deleteexecution) | **Delete** /v2/Flows/{FlowSid}/Executions/{Sid} | +*DefaultApi* | [**DeleteFlow**](docs/DefaultApi.md#deleteflow) | **Delete** /v2/Flows/{Sid} | +*DefaultApi* | [**FetchExecution**](docs/DefaultApi.md#fetchexecution) | **Get** /v2/Flows/{FlowSid}/Executions/{Sid} | +*DefaultApi* | [**FetchExecutionContext**](docs/DefaultApi.md#fetchexecutioncontext) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context | +*DefaultApi* | [**FetchExecutionStep**](docs/DefaultApi.md#fetchexecutionstep) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid} | +*DefaultApi* | [**FetchExecutionStepContext**](docs/DefaultApi.md#fetchexecutionstepcontext) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context | +*DefaultApi* | [**FetchFlow**](docs/DefaultApi.md#fetchflow) | **Get** /v2/Flows/{Sid} | +*DefaultApi* | [**FetchFlowRevision**](docs/DefaultApi.md#fetchflowrevision) | **Get** /v2/Flows/{Sid}/Revisions/{Revision} | +*DefaultApi* | [**FetchTestUser**](docs/DefaultApi.md#fetchtestuser) | **Get** /v2/Flows/{Sid}/TestUsers | +*DefaultApi* | [**ListExecution**](docs/DefaultApi.md#listexecution) | **Get** /v2/Flows/{FlowSid}/Executions | +*DefaultApi* | [**ListExecutionStep**](docs/DefaultApi.md#listexecutionstep) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps | +*DefaultApi* | [**ListFlow**](docs/DefaultApi.md#listflow) | **Get** /v2/Flows | +*DefaultApi* | [**ListFlowRevision**](docs/DefaultApi.md#listflowrevision) | **Get** /v2/Flows/{Sid}/Revisions | +*DefaultApi* | [**UpdateExecution**](docs/DefaultApi.md#updateexecution) | **Post** /v2/Flows/{FlowSid}/Executions/{Sid} | +*DefaultApi* | [**UpdateFlow**](docs/DefaultApi.md#updateflow) | **Post** /v2/Flows/{Sid} | +*DefaultApi* | [**UpdateFlowValidate**](docs/DefaultApi.md#updateflowvalidate) | **Post** /v2/Flows/Validate | +*DefaultApi* | [**UpdateTestUser**](docs/DefaultApi.md#updatetestuser) | **Post** /v2/Flows/{Sid}/TestUsers | + + +## Documentation For Models + + - [CreateExecutionRequest](docs/CreateExecutionRequest.md) + - [CreateFlowRequest](docs/CreateFlowRequest.md) + - [ListExecutionResponse](docs/ListExecutionResponse.md) + - [ListExecutionStepResponse](docs/ListExecutionStepResponse.md) + - [ListFlowResponse](docs/ListFlowResponse.md) + - [ListFlowResponseMeta](docs/ListFlowResponseMeta.md) + - [ListFlowRevisionResponse](docs/ListFlowRevisionResponse.md) + - [StudioV2Flow](docs/StudioV2Flow.md) + - [StudioV2FlowExecution](docs/StudioV2FlowExecution.md) + - [StudioV2FlowExecutionExecutionContext](docs/StudioV2FlowExecutionExecutionContext.md) + - [StudioV2FlowExecutionExecutionStep](docs/StudioV2FlowExecutionExecutionStep.md) + - [StudioV2FlowExecutionExecutionStepExecutionStepContext](docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md) + - [StudioV2FlowFlowRevision](docs/StudioV2FlowFlowRevision.md) + - [StudioV2FlowTestUser](docs/StudioV2FlowTestUser.md) + - [StudioV2FlowValidate](docs/StudioV2FlowValidate.md) + - [UpdateExecutionRequest](docs/UpdateExecutionRequest.md) + - [UpdateFlowRequest](docs/UpdateFlowRequest.md) + - [UpdateFlowValidateRequest](docs/UpdateFlowValidateRequest.md) + - [UpdateTestUserRequest](docs/UpdateTestUserRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/studio/v2/api_default.go b/rest/studio/v2/api_default.go new file mode 100644 index 000000000..d156c09a2 --- /dev/null +++ b/rest/studio/v2/api_default.go @@ -0,0 +1,802 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://studio.twilio.com"), + } +} +// CreateExecutionParams Optional parameters for the method 'CreateExecution' +type CreateExecutionParams struct { + From *string `json:"From,omitempty"` + Parameters *map[string]interface{} `json:"Parameters,omitempty"` + To *string `json:"To,omitempty"` +} + +/* +CreateExecution Method for CreateExecution +Triggers a new Execution for the Flow + * @param FlowSid The SID of the Excecution's Flow. + * @param optional nil or *CreateExecutionOpts - Optional Parameters: + * @param "From" (string) - The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. + * @param "Parameters" (map[string]interface{}) - JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. + * @param "To" (string) - The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. +@return StudioV2FlowExecution +*/ +func (c *DefaultApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV2FlowExecution, error) { + path := "/v2/Flows/{FlowSid}/Executions" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Parameters != nil { + v, err := json.Marshal(params.Parameters) + + if err != nil { + return nil, err + } + + data.Set("Parameters", fmt.Sprint(v)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFlowParams Optional parameters for the method 'CreateFlow' +type CreateFlowParams struct { + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +CreateFlow Method for CreateFlow +Create a Flow. + * @param optional nil or *CreateFlowOpts - Optional Parameters: + * @param "CommitMessage" (string) - Description of change made in the revision. + * @param "Definition" (map[string]interface{}) - JSON representation of flow definition. + * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. + * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. +@return StudioV2Flow +*/ +func (c *DefaultApiService) CreateFlow(params *CreateFlowParams) (*StudioV2Flow, error) { + path := "/v2/Flows" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) + } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) + + if err != nil { + return nil, err + } + + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteExecution Method for DeleteExecution +Delete the Execution and all Steps relating to it. + * @param FlowSid The SID of the Flow with the Execution resources to delete. + * @param Sid The SID of the Execution resource to delete. +*/ +func (c *DefaultApiService) DeleteExecution(FlowSid string, Sid string) (error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFlow Method for DeleteFlow +Delete a specific Flow. + * @param Sid The SID of the Flow resource to delete. +*/ +func (c *DefaultApiService) DeleteFlow(Sid string) (error) { + path := "/v2/Flows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchExecution Method for FetchExecution +Retrieve an Execution + * @param FlowSid The SID of the Flow with the Execution resource to fetch + * @param Sid The SID of the Execution resource to fetch. +@return StudioV2FlowExecution +*/ +func (c *DefaultApiService) FetchExecution(FlowSid string, Sid string) (*StudioV2FlowExecution, error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionContext Method for FetchExecutionContext +Retrieve the most recent context for an Execution. + * @param FlowSid The SID of the Flow with the Execution context to fetch. + * @param ExecutionSid The SID of the Execution context to fetch. +@return StudioV2FlowExecutionExecutionContext +*/ +func (c *DefaultApiService) FetchExecutionContext(FlowSid string, ExecutionSid string) (*StudioV2FlowExecutionExecutionContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecutionExecutionContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionStep Method for FetchExecutionStep +Retrieve a Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param ExecutionSid The SID of the Execution resource with the Step to fetch. + * @param Sid The SID of the ExecutionStep resource to fetch. +@return StudioV2FlowExecutionExecutionStep +*/ +func (c *DefaultApiService) FetchExecutionStep(FlowSid string, ExecutionSid string, Sid string) (*StudioV2FlowExecutionExecutionStep, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecutionExecutionStep{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchExecutionStepContext Method for FetchExecutionStepContext +Retrieve the context for an Execution Step. + * @param FlowSid The SID of the Flow with the Step to fetch. + * @param ExecutionSid The SID of the Execution resource with the Step to fetch. + * @param StepSid The SID of the Step to fetch. +@return StudioV2FlowExecutionExecutionStepExecutionStepContext +*/ +func (c *DefaultApiService) FetchExecutionStepContext(FlowSid string, ExecutionSid string, StepSid string) (*StudioV2FlowExecutionExecutionStepExecutionStepContext, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + path = strings.Replace(path, "{"+"StepSid"+"}", StepSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecutionExecutionStepExecutionStepContext{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFlow Method for FetchFlow +Retrieve a specific Flow. + * @param Sid The SID of the Flow resource to fetch. +@return StudioV2Flow +*/ +func (c *DefaultApiService) FetchFlow(Sid string) (*StudioV2Flow, error) { + path := "/v2/Flows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFlowRevision Method for FetchFlowRevision +Retrieve a specific Flow revision. + * @param Sid The SID of the Flow resource to fetch. + * @param Revision Specific Revision number or can be `LatestPublished` and `LatestRevision`. +@return StudioV2FlowFlowRevision +*/ +func (c *DefaultApiService) FetchFlowRevision(Sid string, Revision string) (*StudioV2FlowFlowRevision, error) { + path := "/v2/Flows/{Sid}/Revisions/{Revision}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + path = strings.Replace(path, "{"+"Revision"+"}", Revision, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowFlowRevision{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTestUser Method for FetchTestUser +Fetch flow test users + * @param Sid Unique identifier of the flow. +@return StudioV2FlowTestUser +*/ +func (c *DefaultApiService) FetchTestUser(Sid string) (*StudioV2FlowTestUser, error) { + path := "/v2/Flows/{Sid}/TestUsers" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExecutionParams Optional parameters for the method 'ListExecution' +type ListExecutionParams struct { + DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"` + DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExecution Method for ListExecution +Retrieve a list of all Executions for the Flow. + * @param FlowSid The SID of the Flow with the Execution resources to read. + * @param optional nil or *ListExecutionOpts - Optional Parameters: + * @param "DateCreatedFrom" (time.Time) - Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. + * @param "DateCreatedTo" (time.Time) - Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExecutionResponse +*/ +func (c *DefaultApiService) ListExecution(FlowSid string, params *ListExecutionParams) (*ListExecutionResponse, error) { + path := "/v2/Flows/{FlowSid}/Executions" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DateCreatedFrom != nil { + data.Set("DateCreatedFrom", fmt.Sprint(*params.DateCreatedFrom)) + } + if params != nil && params.DateCreatedTo != nil { + data.Set("DateCreatedTo", fmt.Sprint(*params.DateCreatedTo)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExecutionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListExecutionStepParams Optional parameters for the method 'ListExecutionStep' +type ListExecutionStepParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListExecutionStep Method for ListExecutionStep +Retrieve a list of all Steps for an Execution. + * @param FlowSid The SID of the Flow with the Steps to read. + * @param ExecutionSid The SID of the Execution with the Steps to read. + * @param optional nil or *ListExecutionStepOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListExecutionStepResponse +*/ +func (c *DefaultApiService) ListExecutionStep(FlowSid string, ExecutionSid string, params *ListExecutionStepParams) (*ListExecutionStepResponse, error) { + path := "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"ExecutionSid"+"}", ExecutionSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListExecutionStepResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFlowParams Optional parameters for the method 'ListFlow' +type ListFlowParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFlow Method for ListFlow +Retrieve a list of all Flows. + * @param optional nil or *ListFlowOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFlowResponse +*/ +func (c *DefaultApiService) ListFlow(params *ListFlowParams) (*ListFlowResponse, error) { + path := "/v2/Flows" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFlowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFlowRevisionParams Optional parameters for the method 'ListFlowRevision' +type ListFlowRevisionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFlowRevision Method for ListFlowRevision +Retrieve a list of all Flows revisions. + * @param Sid The SID of the Flow resource to fetch. + * @param optional nil or *ListFlowRevisionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFlowRevisionResponse +*/ +func (c *DefaultApiService) ListFlowRevision(Sid string, params *ListFlowRevisionParams) (*ListFlowRevisionResponse, error) { + path := "/v2/Flows/{Sid}/Revisions" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFlowRevisionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateExecutionParams Optional parameters for the method 'UpdateExecution' +type UpdateExecutionParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateExecution Method for UpdateExecution +Update the status of an Execution to `ended`. + * @param FlowSid The SID of the Flow with the Execution resources to update. + * @param Sid The SID of the Execution resource to update. + * @param optional nil or *UpdateExecutionOpts - Optional Parameters: + * @param "Status" (string) - The status of the Execution. Can only be `ended`. +@return StudioV2FlowExecution +*/ +func (c *DefaultApiService) UpdateExecution(FlowSid string, Sid string, params *UpdateExecutionParams) (*StudioV2FlowExecution, error) { + path := "/v2/Flows/{FlowSid}/Executions/{Sid}" + path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowExecution{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFlowParams Optional parameters for the method 'UpdateFlow' +type UpdateFlowParams struct { + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateFlow Method for UpdateFlow +Update a Flow. + * @param Sid The SID of the Flow resource to fetch. + * @param optional nil or *UpdateFlowOpts - Optional Parameters: + * @param "CommitMessage" (string) - Description of change made in the revision. + * @param "Definition" (map[string]interface{}) - JSON representation of flow definition. + * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. + * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. +@return StudioV2Flow +*/ +func (c *DefaultApiService) UpdateFlow(Sid string, params *UpdateFlowParams) (*StudioV2Flow, error) { + path := "/v2/Flows/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) + } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) + + if err != nil { + return nil, err + } + + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2Flow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFlowValidateParams Optional parameters for the method 'UpdateFlowValidate' +type UpdateFlowValidateParams struct { + CommitMessage *string `json:"CommitMessage,omitempty"` + Definition *map[string]interface{} `json:"Definition,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` +} + +/* +UpdateFlowValidate Method for UpdateFlowValidate +Validate flow JSON definition + * @param optional nil or *UpdateFlowValidateOpts - Optional Parameters: + * @param "CommitMessage" (string) - Description of change made in the revision. + * @param "Definition" (map[string]interface{}) - JSON representation of flow definition. + * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. + * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. +@return StudioV2FlowValidate +*/ +func (c *DefaultApiService) UpdateFlowValidate(params *UpdateFlowValidateParams) (*StudioV2FlowValidate, error) { + path := "/v2/Flows/Validate" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommitMessage != nil { + data.Set("CommitMessage", *params.CommitMessage) + } + if params != nil && params.Definition != nil { + v, err := json.Marshal(params.Definition) + + if err != nil { + return nil, err + } + + data.Set("Definition", fmt.Sprint(v)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowValidate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTestUserParams Optional parameters for the method 'UpdateTestUser' +type UpdateTestUserParams struct { + TestUsers *[]string `json:"TestUsers,omitempty"` +} + +/* +UpdateTestUser Method for UpdateTestUser +Update flow test users + * @param Sid Unique identifier of the flow. + * @param optional nil or *UpdateTestUserOpts - Optional Parameters: + * @param "TestUsers" ([]string) - List of test user identities that can test draft versions of the flow. +@return StudioV2FlowTestUser +*/ +func (c *DefaultApiService) UpdateTestUser(Sid string, params *UpdateTestUserParams) (*StudioV2FlowTestUser, error) { + path := "/v2/Flows/{Sid}/TestUsers" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TestUsers != nil { + data.Set("TestUsers", strings.Join(*params.TestUsers, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &StudioV2FlowTestUser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/studio/v2/docs/CreateExecutionRequest.md b/rest/studio/v2/docs/CreateExecutionRequest.md new file mode 100644 index 000000000..8c95f1f5b --- /dev/null +++ b/rest/studio/v2/docs/CreateExecutionRequest.md @@ -0,0 +1,13 @@ +# CreateExecutionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. | +**Parameters** | [**map[string]interface{}**](.md) | JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. | [optional] +**To** | **string** | The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/CreateFlowRequest.md b/rest/studio/v2/docs/CreateFlowRequest.md new file mode 100644 index 000000000..d7408ff41 --- /dev/null +++ b/rest/studio/v2/docs/CreateFlowRequest.md @@ -0,0 +1,14 @@ +# CreateFlowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommitMessage** | **string** | Description of change made in the revision. | [optional] +**Definition** | [**map[string]interface{}**](.md) | JSON representation of flow definition. | +**FriendlyName** | **string** | The string that you assigned to describe the Flow. | +**Status** | **string** | The status of the Flow. Can be: `draft` or `published`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/DefaultApi.md b/rest/studio/v2/docs/DefaultApi.md new file mode 100644 index 000000000..9cba32bf9 --- /dev/null +++ b/rest/studio/v2/docs/DefaultApi.md @@ -0,0 +1,802 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateExecution**](DefaultApi.md#CreateExecution) | **Post** /v2/Flows/{FlowSid}/Executions | +[**CreateFlow**](DefaultApi.md#CreateFlow) | **Post** /v2/Flows | +[**DeleteExecution**](DefaultApi.md#DeleteExecution) | **Delete** /v2/Flows/{FlowSid}/Executions/{Sid} | +[**DeleteFlow**](DefaultApi.md#DeleteFlow) | **Delete** /v2/Flows/{Sid} | +[**FetchExecution**](DefaultApi.md#FetchExecution) | **Get** /v2/Flows/{FlowSid}/Executions/{Sid} | +[**FetchExecutionContext**](DefaultApi.md#FetchExecutionContext) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context | +[**FetchExecutionStep**](DefaultApi.md#FetchExecutionStep) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid} | +[**FetchExecutionStepContext**](DefaultApi.md#FetchExecutionStepContext) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context | +[**FetchFlow**](DefaultApi.md#FetchFlow) | **Get** /v2/Flows/{Sid} | +[**FetchFlowRevision**](DefaultApi.md#FetchFlowRevision) | **Get** /v2/Flows/{Sid}/Revisions/{Revision} | +[**FetchTestUser**](DefaultApi.md#FetchTestUser) | **Get** /v2/Flows/{Sid}/TestUsers | +[**ListExecution**](DefaultApi.md#ListExecution) | **Get** /v2/Flows/{FlowSid}/Executions | +[**ListExecutionStep**](DefaultApi.md#ListExecutionStep) | **Get** /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps | +[**ListFlow**](DefaultApi.md#ListFlow) | **Get** /v2/Flows | +[**ListFlowRevision**](DefaultApi.md#ListFlowRevision) | **Get** /v2/Flows/{Sid}/Revisions | +[**UpdateExecution**](DefaultApi.md#UpdateExecution) | **Post** /v2/Flows/{FlowSid}/Executions/{Sid} | +[**UpdateFlow**](DefaultApi.md#UpdateFlow) | **Post** /v2/Flows/{Sid} | +[**UpdateFlowValidate**](DefaultApi.md#UpdateFlowValidate) | **Post** /v2/Flows/Validate | +[**UpdateTestUser**](DefaultApi.md#UpdateTestUser) | **Post** /v2/Flows/{Sid}/TestUsers | + + + +## CreateExecution + +> StudioV2FlowExecution CreateExecution(ctx, FlowSid, optional) + + + +Triggers a new Execution for the Flow + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Excecution's Flow. | + **optional** | ***CreateExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **From** | **optional.String**| The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. | + **Parameters** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. | + **To** | **optional.String**| The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. | + +### Return type + +[**StudioV2FlowExecution**](studio.v2.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFlow + +> StudioV2Flow CreateFlow(ctx, optional) + + + +Create a Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CommitMessage** | **optional.String**| Description of change made in the revision. | + **Definition** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON representation of flow definition. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the Flow. | + **Status** | **optional.String**| The status of the Flow. Can be: `draft` or `published`. | + +### Return type + +[**StudioV2Flow**](studio.v2.flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteExecution + +> DeleteExecution(ctx, FlowSid, Sid) + + + +Delete the Execution and all Steps relating to it. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to delete. | +**Sid** | **string**| The SID of the Execution resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFlow + +> DeleteFlow(ctx, Sid) + + + +Delete a specific Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecution + +> StudioV2FlowExecution FetchExecution(ctx, FlowSid, Sid) + + + +Retrieve an Execution + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resource to fetch | +**Sid** | **string**| The SID of the Execution resource to fetch. | + +### Return type + +[**StudioV2FlowExecution**](studio.v2.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionContext + +> StudioV2FlowExecutionExecutionContext FetchExecutionContext(ctx, FlowSid, ExecutionSid) + + + +Retrieve the most recent context for an Execution. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution context to fetch. | +**ExecutionSid** | **string**| The SID of the Execution context to fetch. | + +### Return type + +[**StudioV2FlowExecutionExecutionContext**](studio.v2.flow.execution.execution_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionStep + +> StudioV2FlowExecutionExecutionStep FetchExecutionStep(ctx, FlowSid, ExecutionSid, Sid) + + + +Retrieve a Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**ExecutionSid** | **string**| The SID of the Execution resource with the Step to fetch. | +**Sid** | **string**| The SID of the ExecutionStep resource to fetch. | + +### Return type + +[**StudioV2FlowExecutionExecutionStep**](studio.v2.flow.execution.execution_step.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchExecutionStepContext + +> StudioV2FlowExecutionExecutionStepExecutionStepContext FetchExecutionStepContext(ctx, FlowSid, ExecutionSid, StepSid) + + + +Retrieve the context for an Execution Step. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Step to fetch. | +**ExecutionSid** | **string**| The SID of the Execution resource with the Step to fetch. | +**StepSid** | **string**| The SID of the Step to fetch. | + +### Return type + +[**StudioV2FlowExecutionExecutionStepExecutionStepContext**](studio.v2.flow.execution.execution_step.execution_step_context.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFlow + +> StudioV2Flow FetchFlow(ctx, Sid) + + + +Retrieve a specific Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to fetch. | + +### Return type + +[**StudioV2Flow**](studio.v2.flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFlowRevision + +> StudioV2FlowFlowRevision FetchFlowRevision(ctx, Sid, Revision) + + + +Retrieve a specific Flow revision. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to fetch. | +**Revision** | **string**| Specific Revision number or can be `LatestPublished` and `LatestRevision`. | + +### Return type + +[**StudioV2FlowFlowRevision**](studio.v2.flow.flow_revision.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTestUser + +> StudioV2FlowTestUser FetchTestUser(ctx, Sid) + + + +Fetch flow test users + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| Unique identifier of the flow. | + +### Return type + +[**StudioV2FlowTestUser**](studio.v2.flow.test_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExecution + +> ListExecutionResponse ListExecution(ctx, FlowSid, optional) + + + +Retrieve a list of all Executions for the Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to read. | + **optional** | ***ListExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DateCreatedFrom** | **optional.Time**| Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. | + **DateCreatedTo** | **optional.Time**| Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExecutionResponse**](ListExecutionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExecutionStep + +> ListExecutionStepResponse ListExecutionStep(ctx, FlowSid, ExecutionSid, optional) + + + +Retrieve a list of all Steps for an Execution. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Steps to read. | +**ExecutionSid** | **string**| The SID of the Execution with the Steps to read. | + **optional** | ***ListExecutionStepOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListExecutionStepOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListExecutionStepResponse**](ListExecutionStepResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFlow + +> ListFlowResponse ListFlow(ctx, optional) + + + +Retrieve a list of all Flows. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFlowResponse**](ListFlowResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFlowRevision + +> ListFlowRevisionResponse ListFlowRevision(ctx, Sid, optional) + + + +Retrieve a list of all Flows revisions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to fetch. | + **optional** | ***ListFlowRevisionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFlowRevisionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFlowRevisionResponse**](ListFlowRevisionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExecution + +> StudioV2FlowExecution UpdateExecution(ctx, FlowSid, Sid, optional) + + + +Update the status of an Execution to `ended`. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FlowSid** | **string**| The SID of the Flow with the Execution resources to update. | +**Sid** | **string**| The SID of the Execution resource to update. | + **optional** | ***UpdateExecutionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateExecutionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Status** | **optional.String**| The status of the Execution. Can only be `ended`. | + +### Return type + +[**StudioV2FlowExecution**](studio.v2.flow.execution.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFlow + +> StudioV2Flow UpdateFlow(ctx, Sid, optional) + + + +Update a Flow. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Flow resource to fetch. | + **optional** | ***UpdateFlowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFlowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CommitMessage** | **optional.String**| Description of change made in the revision. | + **Definition** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON representation of flow definition. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the Flow. | + **Status** | **optional.String**| The status of the Flow. Can be: `draft` or `published`. | + +### Return type + +[**StudioV2Flow**](studio.v2.flow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFlowValidate + +> StudioV2FlowValidate UpdateFlowValidate(ctx, optional) + + + +Validate flow JSON definition + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***UpdateFlowValidateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFlowValidateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CommitMessage** | **optional.String**| Description of change made in the revision. | + **Definition** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON representation of flow definition. | + **FriendlyName** | **optional.String**| The string that you assigned to describe the Flow. | + **Status** | **optional.String**| The status of the Flow. Can be: `draft` or `published`. | + +### Return type + +[**StudioV2FlowValidate**](studio.v2.flow_validate.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTestUser + +> StudioV2FlowTestUser UpdateTestUser(ctx, Sid, optional) + + + +Update flow test users + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| Unique identifier of the flow. | + **optional** | ***UpdateTestUserOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTestUserOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **TestUsers** | [**optional.Interface of []string**](string.md)| List of test user identities that can test draft versions of the flow. | + +### Return type + +[**StudioV2FlowTestUser**](studio.v2.flow.test_user.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/studio/v2/docs/ListExecutionResponse.md b/rest/studio/v2/docs/ListExecutionResponse.md new file mode 100644 index 000000000..9a3f94a5c --- /dev/null +++ b/rest/studio/v2/docs/ListExecutionResponse.md @@ -0,0 +1,12 @@ +# ListExecutionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Executions** | [**[]StudioV2FlowExecution**](studio.v2.flow.execution.md) | | [optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/ListExecutionStepResponse.md b/rest/studio/v2/docs/ListExecutionStepResponse.md new file mode 100644 index 000000000..7c4026e11 --- /dev/null +++ b/rest/studio/v2/docs/ListExecutionStepResponse.md @@ -0,0 +1,12 @@ +# ListExecutionStepResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] +**Steps** | [**[]StudioV2FlowExecutionExecutionStep**](studio.v2.flow.execution.execution_step.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/ListFlowResponse.md b/rest/studio/v2/docs/ListFlowResponse.md new file mode 100644 index 000000000..da25856ae --- /dev/null +++ b/rest/studio/v2/docs/ListFlowResponse.md @@ -0,0 +1,12 @@ +# ListFlowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Flows** | [**[]StudioV2Flow**](studio.v2.flow.md) | | [optional] +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/ListFlowResponseMeta.md b/rest/studio/v2/docs/ListFlowResponseMeta.md new file mode 100644 index 000000000..c0868ff93 --- /dev/null +++ b/rest/studio/v2/docs/ListFlowResponseMeta.md @@ -0,0 +1,17 @@ +# ListFlowResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/ListFlowRevisionResponse.md b/rest/studio/v2/docs/ListFlowRevisionResponse.md new file mode 100644 index 000000000..eae1b8468 --- /dev/null +++ b/rest/studio/v2/docs/ListFlowRevisionResponse.md @@ -0,0 +1,12 @@ +# ListFlowRevisionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListFlowResponseMeta**](ListFlowResponse_meta.md) | | [optional] +**Revisions** | [**[]StudioV2FlowFlowRevision**](studio.v2.flow.flow_revision.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/studio/v2/docs/StudioV2Flow.md b/rest/studio/v2/docs/StudioV2Flow.md similarity index 87% rename from studio/v2/docs/StudioV2Flow.md rename to rest/studio/v2/docs/StudioV2Flow.md index 9b646bac4..0b9504397 100644 --- a/studio/v2/docs/StudioV2Flow.md +++ b/rest/studio/v2/docs/StudioV2Flow.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **CommitMessage** | **string** | | [optional] **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] -**Definition** | **map[string]interface{}** | | [optional] +**Definition** | [**map[string]interface{}**](.md) | | [optional] **Errors** | **[]map[string]interface{}** | | [optional] **FriendlyName** | **string** | | [optional] -**Links** | **map[string]interface{}** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] **Revision** | **int32** | | [optional] **Sid** | **string** | | [optional] **Status** | **string** | | [optional] diff --git a/rest/studio/v2/docs/StudioV2FlowExecution.md b/rest/studio/v2/docs/StudioV2FlowExecution.md new file mode 100644 index 000000000..7f73d872a --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowExecution.md @@ -0,0 +1,20 @@ +# StudioV2FlowExecution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ContactChannelAddress** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md new file mode 100644 index 000000000..e75a1a506 --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionContext.md @@ -0,0 +1,15 @@ +# StudioV2FlowExecutionExecutionContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md new file mode 100644 index 000000000..7c56cfc7b --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStep.md @@ -0,0 +1,22 @@ +# StudioV2FlowExecutionExecutionStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Name** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TransitionedFrom** | **string** | | [optional] +**TransitionedTo** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md new file mode 100644 index 000000000..71e712692 --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowExecutionExecutionStepExecutionStepContext.md @@ -0,0 +1,16 @@ +# StudioV2FlowExecutionExecutionStepExecutionStepContext + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Context** | [**map[string]interface{}**](.md) | | [optional] +**ExecutionSid** | **string** | | [optional] +**FlowSid** | **string** | | [optional] +**StepSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowFlowRevision.md b/rest/studio/v2/docs/StudioV2FlowFlowRevision.md new file mode 100644 index 000000000..8e949e07e --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowFlowRevision.md @@ -0,0 +1,22 @@ +# StudioV2FlowFlowRevision + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CommitMessage** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Definition** | [**map[string]interface{}**](.md) | | [optional] +**Errors** | **[]map[string]interface{}** | | [optional] +**FriendlyName** | **string** | | [optional] +**Revision** | **int32** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] +**Valid** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowTestUser.md b/rest/studio/v2/docs/StudioV2FlowTestUser.md new file mode 100644 index 000000000..485dc6f28 --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowTestUser.md @@ -0,0 +1,13 @@ +# StudioV2FlowTestUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sid** | **string** | | [optional] +**TestUsers** | **[]string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/StudioV2FlowValidate.md b/rest/studio/v2/docs/StudioV2FlowValidate.md new file mode 100644 index 000000000..bfbe49294 --- /dev/null +++ b/rest/studio/v2/docs/StudioV2FlowValidate.md @@ -0,0 +1,11 @@ +# StudioV2FlowValidate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/UpdateExecutionRequest.md b/rest/studio/v2/docs/UpdateExecutionRequest.md new file mode 100644 index 000000000..06aa5497f --- /dev/null +++ b/rest/studio/v2/docs/UpdateExecutionRequest.md @@ -0,0 +1,11 @@ +# UpdateExecutionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The status of the Execution. Can only be `ended`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/UpdateFlowRequest.md b/rest/studio/v2/docs/UpdateFlowRequest.md new file mode 100644 index 000000000..49585c8b3 --- /dev/null +++ b/rest/studio/v2/docs/UpdateFlowRequest.md @@ -0,0 +1,14 @@ +# UpdateFlowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommitMessage** | **string** | Description of change made in the revision. | [optional] +**Definition** | [**map[string]interface{}**](.md) | JSON representation of flow definition. | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the Flow. | [optional] +**Status** | **string** | The status of the Flow. Can be: `draft` or `published`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/UpdateFlowValidateRequest.md b/rest/studio/v2/docs/UpdateFlowValidateRequest.md new file mode 100644 index 000000000..9a7af4a88 --- /dev/null +++ b/rest/studio/v2/docs/UpdateFlowValidateRequest.md @@ -0,0 +1,14 @@ +# UpdateFlowValidateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommitMessage** | **string** | Description of change made in the revision. | [optional] +**Definition** | [**map[string]interface{}**](.md) | JSON representation of flow definition. | +**FriendlyName** | **string** | The string that you assigned to describe the Flow. | +**Status** | **string** | The status of the Flow. Can be: `draft` or `published`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/docs/UpdateTestUserRequest.md b/rest/studio/v2/docs/UpdateTestUserRequest.md new file mode 100644 index 000000000..7fac59f2d --- /dev/null +++ b/rest/studio/v2/docs/UpdateTestUserRequest.md @@ -0,0 +1,11 @@ +# UpdateTestUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TestUsers** | **[]string** | List of test user identities that can test draft versions of the flow. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/studio/v2/model_create_execution_request.go b/rest/studio/v2/model_create_execution_request.go new file mode 100644 index 000000000..0a9c1d66a --- /dev/null +++ b/rest/studio/v2/model_create_execution_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateExecutionRequest struct for CreateExecutionRequest +type CreateExecutionRequest struct { + // The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. + From string `json:"From"` + // JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string. + Parameters map[string]interface{} `json:"Parameters,omitempty"` + // The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`. + To string `json:"To"` +} diff --git a/rest/studio/v2/model_create_flow_request.go b/rest/studio/v2/model_create_flow_request.go new file mode 100644 index 000000000..b65b75d03 --- /dev/null +++ b/rest/studio/v2/model_create_flow_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFlowRequest struct for CreateFlowRequest +type CreateFlowRequest struct { + // Description of change made in the revision. + CommitMessage string `json:"CommitMessage,omitempty"` + // JSON representation of flow definition. + Definition map[string]interface{} `json:"Definition"` + // The string that you assigned to describe the Flow. + FriendlyName string `json:"FriendlyName"` + // The status of the Flow. Can be: `draft` or `published`. + Status string `json:"Status"` +} diff --git a/rest/studio/v2/model_list_execution_response.go b/rest/studio/v2/model_list_execution_response.go new file mode 100644 index 000000000..3ca0e960a --- /dev/null +++ b/rest/studio/v2/model_list_execution_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExecutionResponse struct for ListExecutionResponse +type ListExecutionResponse struct { + Executions []StudioV2FlowExecution `json:"Executions,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/studio/v2/model_list_execution_step_response.go b/rest/studio/v2/model_list_execution_step_response.go new file mode 100644 index 000000000..2117dcc9d --- /dev/null +++ b/rest/studio/v2/model_list_execution_step_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListExecutionStepResponse struct for ListExecutionStepResponse +type ListExecutionStepResponse struct { + Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Steps []StudioV2FlowExecutionExecutionStep `json:"Steps,omitempty"` +} diff --git a/rest/studio/v2/model_list_flow_response.go b/rest/studio/v2/model_list_flow_response.go new file mode 100644 index 000000000..d58e7fef2 --- /dev/null +++ b/rest/studio/v2/model_list_flow_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlowResponse struct for ListFlowResponse +type ListFlowResponse struct { + Flows []StudioV2Flow `json:"Flows,omitempty"` + Meta ListFlowResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/studio/v2/model_list_flow_response_meta.go b/rest/studio/v2/model_list_flow_response_meta.go new file mode 100644 index 000000000..e1a201290 --- /dev/null +++ b/rest/studio/v2/model_list_flow_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlowResponseMeta struct for ListFlowResponseMeta +type ListFlowResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_list_flow_revision_response.go b/rest/studio/v2/model_list_flow_revision_response.go new file mode 100644 index 000000000..1fa563187 --- /dev/null +++ b/rest/studio/v2/model_list_flow_revision_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFlowRevisionResponse struct for ListFlowRevisionResponse +type ListFlowRevisionResponse struct { + Meta ListFlowResponseMeta `json:"Meta,omitempty"` + Revisions []StudioV2FlowFlowRevision `json:"Revisions,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow.go b/rest/studio/v2/model_studio_v2_flow.go new file mode 100644 index 000000000..e3caabeff --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow.go @@ -0,0 +1,32 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV2Flow struct for StudioV2Flow +type StudioV2Flow struct { + AccountSid string `json:"AccountSid,omitempty"` + CommitMessage string `json:"CommitMessage,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Definition map[string]interface{} `json:"Definition,omitempty"` + Errors []map[string]interface{} `json:"Errors,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision int32 `json:"Revision,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` + Valid bool `json:"Valid,omitempty"` + Warnings []map[string]interface{} `json:"Warnings,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_execution.go b/rest/studio/v2/model_studio_v2_flow_execution.go new file mode 100644 index 000000000..fb1d80227 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_execution.go @@ -0,0 +1,27 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV2FlowExecution struct for StudioV2FlowExecution +type StudioV2FlowExecution struct { + AccountSid string `json:"AccountSid,omitempty"` + ContactChannelAddress string `json:"ContactChannelAddress,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go b/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go new file mode 100644 index 000000000..866433807 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_execution_execution_context.go @@ -0,0 +1,19 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV2FlowExecutionExecutionContext struct for StudioV2FlowExecutionExecutionContext +type StudioV2FlowExecutionExecutionContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go b/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go new file mode 100644 index 000000000..bfe9f3b2f --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_execution_execution_step.go @@ -0,0 +1,29 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV2FlowExecutionExecutionStep struct for StudioV2FlowExecutionExecutionStep +type StudioV2FlowExecutionExecutionStep struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Name string `json:"Name,omitempty"` + Sid string `json:"Sid,omitempty"` + TransitionedFrom string `json:"TransitionedFrom,omitempty"` + TransitionedTo string `json:"TransitionedTo,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go b/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go new file mode 100644 index 000000000..dcd94e4b6 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_execution_execution_step_execution_step_context.go @@ -0,0 +1,20 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV2FlowExecutionExecutionStepExecutionStepContext struct for StudioV2FlowExecutionExecutionStepExecutionStepContext +type StudioV2FlowExecutionExecutionStepExecutionStepContext struct { + AccountSid string `json:"AccountSid,omitempty"` + Context map[string]interface{} `json:"Context,omitempty"` + ExecutionSid string `json:"ExecutionSid,omitempty"` + FlowSid string `json:"FlowSid,omitempty"` + StepSid string `json:"StepSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_flow_revision.go b/rest/studio/v2/model_studio_v2_flow_flow_revision.go new file mode 100644 index 000000000..5929711e3 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_flow_revision.go @@ -0,0 +1,29 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// StudioV2FlowFlowRevision struct for StudioV2FlowFlowRevision +type StudioV2FlowFlowRevision struct { + AccountSid string `json:"AccountSid,omitempty"` + CommitMessage string `json:"CommitMessage,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Definition map[string]interface{} `json:"Definition,omitempty"` + Errors []map[string]interface{} `json:"Errors,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Revision int32 `json:"Revision,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` + Valid bool `json:"Valid,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_test_user.go b/rest/studio/v2/model_studio_v2_flow_test_user.go new file mode 100644 index 000000000..a2d985069 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_test_user.go @@ -0,0 +1,17 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV2FlowTestUser struct for StudioV2FlowTestUser +type StudioV2FlowTestUser struct { + Sid string `json:"Sid,omitempty"` + TestUsers []string `json:"TestUsers,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/studio/v2/model_studio_v2_flow_validate.go b/rest/studio/v2/model_studio_v2_flow_validate.go new file mode 100644 index 000000000..8eb9568b9 --- /dev/null +++ b/rest/studio/v2/model_studio_v2_flow_validate.go @@ -0,0 +1,15 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// StudioV2FlowValidate struct for StudioV2FlowValidate +type StudioV2FlowValidate struct { + Valid bool `json:"Valid,omitempty"` +} diff --git a/rest/studio/v2/model_update_execution_request.go b/rest/studio/v2/model_update_execution_request.go new file mode 100644 index 000000000..a1c3b3301 --- /dev/null +++ b/rest/studio/v2/model_update_execution_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateExecutionRequest struct for UpdateExecutionRequest +type UpdateExecutionRequest struct { + // The status of the Execution. Can only be `ended`. + Status string `json:"Status"` +} diff --git a/rest/studio/v2/model_update_flow_request.go b/rest/studio/v2/model_update_flow_request.go new file mode 100644 index 000000000..6c4ae6e6d --- /dev/null +++ b/rest/studio/v2/model_update_flow_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFlowRequest struct for UpdateFlowRequest +type UpdateFlowRequest struct { + // Description of change made in the revision. + CommitMessage string `json:"CommitMessage,omitempty"` + // JSON representation of flow definition. + Definition map[string]interface{} `json:"Definition,omitempty"` + // The string that you assigned to describe the Flow. + FriendlyName string `json:"FriendlyName,omitempty"` + // The status of the Flow. Can be: `draft` or `published`. + Status string `json:"Status"` +} diff --git a/rest/studio/v2/model_update_flow_validate_request.go b/rest/studio/v2/model_update_flow_validate_request.go new file mode 100644 index 000000000..b58102935 --- /dev/null +++ b/rest/studio/v2/model_update_flow_validate_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFlowValidateRequest struct for UpdateFlowValidateRequest +type UpdateFlowValidateRequest struct { + // Description of change made in the revision. + CommitMessage string `json:"CommitMessage,omitempty"` + // JSON representation of flow definition. + Definition map[string]interface{} `json:"Definition"` + // The string that you assigned to describe the Flow. + FriendlyName string `json:"FriendlyName"` + // The status of the Flow. Can be: `draft` or `published`. + Status string `json:"Status"` +} diff --git a/rest/studio/v2/model_update_test_user_request.go b/rest/studio/v2/model_update_test_user_request.go new file mode 100644 index 000000000..911f847ae --- /dev/null +++ b/rest/studio/v2/model_update_test_user_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTestUserRequest struct for UpdateTestUserRequest +type UpdateTestUserRequest struct { + // List of test user identities that can test draft versions of the flow. + TestUsers []string `json:"TestUsers"` +} diff --git a/rest/studio/v2/response.go b/rest/studio/v2/response.go new file mode 100644 index 000000000..d2c742ccf --- /dev/null +++ b/rest/studio/v2/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Studio + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/supersim/v1/.openapi-generator-ignore b/rest/supersim/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/supersim/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/supersim/v1/README.md b/rest/supersim/v1/README.md new file mode 100644 index 000000000..f3a098740 --- /dev/null +++ b/rest/supersim/v1/README.md @@ -0,0 +1,105 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateCommand**](docs/DefaultApi.md#createcommand) | **Post** /v1/Commands | +*DefaultApi* | [**CreateFleet**](docs/DefaultApi.md#createfleet) | **Post** /v1/Fleets | +*DefaultApi* | [**CreateNetworkAccessProfile**](docs/DefaultApi.md#createnetworkaccessprofile) | **Post** /v1/NetworkAccessProfiles | +*DefaultApi* | [**CreateNetworkAccessProfileNetwork**](docs/DefaultApi.md#createnetworkaccessprofilenetwork) | **Post** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks | +*DefaultApi* | [**DeleteNetworkAccessProfileNetwork**](docs/DefaultApi.md#deletenetworkaccessprofilenetwork) | **Delete** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid} | +*DefaultApi* | [**FetchCommand**](docs/DefaultApi.md#fetchcommand) | **Get** /v1/Commands/{Sid} | +*DefaultApi* | [**FetchFleet**](docs/DefaultApi.md#fetchfleet) | **Get** /v1/Fleets/{Sid} | +*DefaultApi* | [**FetchNetwork**](docs/DefaultApi.md#fetchnetwork) | **Get** /v1/Networks/{Sid} | +*DefaultApi* | [**FetchNetworkAccessProfile**](docs/DefaultApi.md#fetchnetworkaccessprofile) | **Get** /v1/NetworkAccessProfiles/{Sid} | +*DefaultApi* | [**FetchNetworkAccessProfileNetwork**](docs/DefaultApi.md#fetchnetworkaccessprofilenetwork) | **Get** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid} | +*DefaultApi* | [**FetchSim**](docs/DefaultApi.md#fetchsim) | **Get** /v1/Sims/{Sid} | +*DefaultApi* | [**ListCommand**](docs/DefaultApi.md#listcommand) | **Get** /v1/Commands | +*DefaultApi* | [**ListFleet**](docs/DefaultApi.md#listfleet) | **Get** /v1/Fleets | +*DefaultApi* | [**ListNetwork**](docs/DefaultApi.md#listnetwork) | **Get** /v1/Networks | +*DefaultApi* | [**ListNetworkAccessProfile**](docs/DefaultApi.md#listnetworkaccessprofile) | **Get** /v1/NetworkAccessProfiles | +*DefaultApi* | [**ListNetworkAccessProfileNetwork**](docs/DefaultApi.md#listnetworkaccessprofilenetwork) | **Get** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks | +*DefaultApi* | [**ListSim**](docs/DefaultApi.md#listsim) | **Get** /v1/Sims | +*DefaultApi* | [**ListUsageRecord**](docs/DefaultApi.md#listusagerecord) | **Get** /v1/UsageRecords | +*DefaultApi* | [**UpdateFleet**](docs/DefaultApi.md#updatefleet) | **Post** /v1/Fleets/{Sid} | +*DefaultApi* | [**UpdateNetworkAccessProfile**](docs/DefaultApi.md#updatenetworkaccessprofile) | **Post** /v1/NetworkAccessProfiles/{Sid} | +*DefaultApi* | [**UpdateSim**](docs/DefaultApi.md#updatesim) | **Post** /v1/Sims/{Sid} | + + +## Documentation For Models + + - [CreateCommandRequest](docs/CreateCommandRequest.md) + - [CreateFleetRequest](docs/CreateFleetRequest.md) + - [CreateNetworkAccessProfileNetworkRequest](docs/CreateNetworkAccessProfileNetworkRequest.md) + - [CreateNetworkAccessProfileRequest](docs/CreateNetworkAccessProfileRequest.md) + - [ListCommandResponse](docs/ListCommandResponse.md) + - [ListCommandResponseMeta](docs/ListCommandResponseMeta.md) + - [ListFleetResponse](docs/ListFleetResponse.md) + - [ListNetworkAccessProfileNetworkResponse](docs/ListNetworkAccessProfileNetworkResponse.md) + - [ListNetworkAccessProfileResponse](docs/ListNetworkAccessProfileResponse.md) + - [ListNetworkResponse](docs/ListNetworkResponse.md) + - [ListSimResponse](docs/ListSimResponse.md) + - [ListUsageRecordResponse](docs/ListUsageRecordResponse.md) + - [SupersimV1Command](docs/SupersimV1Command.md) + - [SupersimV1Fleet](docs/SupersimV1Fleet.md) + - [SupersimV1Network](docs/SupersimV1Network.md) + - [SupersimV1NetworkAccessProfile](docs/SupersimV1NetworkAccessProfile.md) + - [SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork](docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md) + - [SupersimV1Sim](docs/SupersimV1Sim.md) + - [SupersimV1UsageRecord](docs/SupersimV1UsageRecord.md) + - [UpdateFleetRequest](docs/UpdateFleetRequest.md) + - [UpdateNetworkAccessProfileRequest](docs/UpdateNetworkAccessProfileRequest.md) + - [UpdateSimRequest](docs/UpdateSimRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/supersim/v1/api_default.go b/rest/supersim/v1/api_default.go new file mode 100644 index 000000000..df6267eb0 --- /dev/null +++ b/rest/supersim/v1/api_default.go @@ -0,0 +1,969 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://supersim.twilio.com"), + } +} +// CreateCommandParams Optional parameters for the method 'CreateCommand' +type CreateCommandParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + Sim *string `json:"Sim,omitempty"` +} + +/* +CreateCommand Method for CreateCommand +Send a Command to a Sim. + * @param optional nil or *CreateCommandOpts - Optional Parameters: + * @param "CallbackMethod" (string) - The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. + * @param "CallbackUrl" (string) - The URL we should call using the `callback_method` after we have sent the command. + * @param "Command" (string) - The message body of the command. + * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. +@return SupersimV1Command +*/ +func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*SupersimV1Command, error) { + path := "/v1/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFleetParams Optional parameters for the method 'CreateFleet' +type CreateFleetParams struct { + CommandsEnabled *bool `json:"CommandsEnabled,omitempty"` + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` + NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateFleet Method for CreateFleet +Create a Fleet + * @param optional nil or *CreateFleetOpts - Optional Parameters: + * @param "CommandsEnabled" (bool) - Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to `true`. + * @param "CommandsMethod" (string) - A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. + * @param "CommandsUrl" (string) - The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. + * @param "DataEnabled" (bool) - Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`. + * @param "DataLimit" (int32) - The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). + * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. +@return SupersimV1Fleet +*/ +func (c *DefaultApiService) CreateFleet(params *CreateFleetParams) (*SupersimV1Fleet, error) { + path := "/v1/Fleets" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommandsEnabled != nil { + data.Set("CommandsEnabled", fmt.Sprint(*params.CommandsEnabled)) + } + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) + } + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) + } + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) + } + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) + } + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateNetworkAccessProfileParams Optional parameters for the method 'CreateNetworkAccessProfile' +type CreateNetworkAccessProfileParams struct { + Networks *[]string `json:"Networks,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateNetworkAccessProfile Method for CreateNetworkAccessProfile +Create a new Network Access Profile + * @param optional nil or *CreateNetworkAccessProfileOpts - Optional Parameters: + * @param "Networks" ([]string) - List of Network SIDs that this Network Access Profile will allow connections to. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. +@return SupersimV1NetworkAccessProfile +*/ +func (c *DefaultApiService) CreateNetworkAccessProfile(params *CreateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { + path := "/v1/NetworkAccessProfiles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Networks != nil { + data.Set("Networks", strings.Join(*params.Networks, ",")) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateNetworkAccessProfileNetworkParams Optional parameters for the method 'CreateNetworkAccessProfileNetwork' +type CreateNetworkAccessProfileNetworkParams struct { + Network *string `json:"Network,omitempty"` +} + +/* +CreateNetworkAccessProfileNetwork Method for CreateNetworkAccessProfileNetwork +Add a Network resource to the Network Access Profile resource. + * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. + * @param optional nil or *CreateNetworkAccessProfileNetworkOpts - Optional Parameters: + * @param "Network" (string) - The SID of the Network resource to be added to the Network Access Profile resource. +@return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork +*/ +func (c *DefaultApiService) CreateNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *CreateNetworkAccessProfileNetworkParams) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteNetworkAccessProfileNetwork Method for DeleteNetworkAccessProfileNetwork +Remove a Network resource from the Network Access Profile resource's. + * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. + * @param Sid The SID of the Network resource to be removed from the Network Access Profile resource. +*/ +func (c *DefaultApiService) DeleteNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) (error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" + path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchCommand Method for FetchCommand +Fetch a Command instance from your account. + * @param Sid The SID of the Command resource to fetch. +@return SupersimV1Command +*/ +func (c *DefaultApiService) FetchCommand(Sid string) (*SupersimV1Command, error) { + path := "/v1/Commands/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFleet Method for FetchFleet +Fetch a Fleet instance from your account. + * @param Sid The SID of the Fleet resource to fetch. +@return SupersimV1Fleet +*/ +func (c *DefaultApiService) FetchFleet(Sid string) (*SupersimV1Fleet, error) { + path := "/v1/Fleets/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchNetwork Method for FetchNetwork +Fetch a Network resource. + * @param Sid The SID of the Network resource to fetch. +@return SupersimV1Network +*/ +func (c *DefaultApiService) FetchNetwork(Sid string) (*SupersimV1Network, error) { + path := "/v1/Networks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Network{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchNetworkAccessProfile Method for FetchNetworkAccessProfile +Fetch a Network Access Profile instance from your account. + * @param Sid The SID of the Network Access Profile resource to fetch. +@return SupersimV1NetworkAccessProfile +*/ +func (c *DefaultApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1NetworkAccessProfile, error) { + path := "/v1/NetworkAccessProfiles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchNetworkAccessProfileNetwork Method for FetchNetworkAccessProfileNetwork +Fetch a Network Access Profile resource's Network resource. + * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. + * @param Sid The SID of the Network resource to fetch. +@return SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork +*/ +func (c *DefaultApiService) FetchNetworkAccessProfileNetwork(NetworkAccessProfileSid string, Sid string) (*SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork, error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}" + path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSim Method for FetchSim +Fetch a Super SIM instance from your account. + * @param Sid The SID of the Sim resource to fetch. +@return SupersimV1Sim +*/ +func (c *DefaultApiService) FetchSim(Sid string) (*SupersimV1Sim, error) { + path := "/v1/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCommandParams Optional parameters for the method 'ListCommand' +type ListCommandParams struct { + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` + Direction *string `json:"Direction,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCommand Method for ListCommand +Retrieve a list of Commands from your account. + * @param optional nil or *ListCommandOpts - Optional Parameters: + * @param "Sim" (string) - The SID or unique name of the Sim that Command was sent to or from. + * @param "Status" (string) - The status of the Command. Can be: `queued`, `sent`, `delivered`, `received` or `failed`. See the [Command Status Values](https://www.twilio.com/docs/wireless/api/command-resource#status-values) for a description of each. + * @param "Direction" (string) - The direction of the Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCommandResponse +*/ +func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { + path := "/v1/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFleetParams Optional parameters for the method 'ListFleet' +type ListFleetParams struct { + NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFleet Method for ListFleet +Retrieve a list of Fleets from your account. + * @param optional nil or *ListFleetOpts - Optional Parameters: + * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFleetResponse +*/ +func (c *DefaultApiService) ListFleet(params *ListFleetParams) (*ListFleetResponse, error) { + path := "/v1/Fleets" + + + data := url.Values{} + headers := 0 + + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFleetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListNetworkParams Optional parameters for the method 'ListNetwork' +type ListNetworkParams struct { + IsoCountry *string `json:"IsoCountry,omitempty"` + Mcc *string `json:"Mcc,omitempty"` + Mnc *string `json:"Mnc,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListNetwork Method for ListNetwork +Retrieve a list of Network resources. + * @param optional nil or *ListNetworkOpts - Optional Parameters: + * @param "IsoCountry" (string) - The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read. + * @param "Mcc" (string) - The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read. + * @param "Mnc" (string) - The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListNetworkResponse +*/ +func (c *DefaultApiService) ListNetwork(params *ListNetworkParams) (*ListNetworkResponse, error) { + path := "/v1/Networks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.Mcc != nil { + data.Set("Mcc", *params.Mcc) + } + if params != nil && params.Mnc != nil { + data.Set("Mnc", *params.Mnc) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListNetworkAccessProfileParams Optional parameters for the method 'ListNetworkAccessProfile' +type ListNetworkAccessProfileParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListNetworkAccessProfile Method for ListNetworkAccessProfile +Retrieve a list of Network Access Profiles from your account. + * @param optional nil or *ListNetworkAccessProfileOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListNetworkAccessProfileResponse +*/ +func (c *DefaultApiService) ListNetworkAccessProfile(params *ListNetworkAccessProfileParams) (*ListNetworkAccessProfileResponse, error) { + path := "/v1/NetworkAccessProfiles" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListNetworkAccessProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListNetworkAccessProfileNetworkParams Optional parameters for the method 'ListNetworkAccessProfileNetwork' +type ListNetworkAccessProfileNetworkParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListNetworkAccessProfileNetwork Method for ListNetworkAccessProfileNetwork +Retrieve a list of Network Access Profile resource's Network resource. + * @param NetworkAccessProfileSid The unique string that identifies the Network Access Profile resource. + * @param optional nil or *ListNetworkAccessProfileNetworkOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListNetworkAccessProfileNetworkResponse +*/ +func (c *DefaultApiService) ListNetworkAccessProfileNetwork(NetworkAccessProfileSid string, params *ListNetworkAccessProfileNetworkParams) (*ListNetworkAccessProfileNetworkResponse, error) { + path := "/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks" + path = strings.Replace(path, "{"+"NetworkAccessProfileSid"+"}", NetworkAccessProfileSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListNetworkAccessProfileNetworkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSimParams Optional parameters for the method 'ListSim' +type ListSimParams struct { + Status *string `json:"Status,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSim Method for ListSim +Retrieve a list of Super SIMs from your account. + * @param optional nil or *ListSimOpts - Optional Parameters: + * @param "Status" (string) - The status of the Sim resources to read. Can be `new`, `ready`, `active`, `inactive`, or `scheduled`. + * @param "Fleet" (string) - The SID or unique name of the Fleet to which a list of Sims are assigned. + * @param "Iccid" (string) - The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with a Super SIM to filter the list by. Passing this parameter will always return a list containing zero or one SIMs. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSimResponse +*/ +func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { + path := "/v1/Sims" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' +type ListUsageRecordParams struct { + Sim *string `json:"Sim,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Network *string `json:"Network,omitempty"` + IsoCountry *string `json:"IsoCountry,omitempty"` + Group *string `json:"Group,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + StartTime *time.Time `json:"StartTime,omitempty"` + EndTime *time.Time `json:"EndTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecord Method for ListUsageRecord +List UsageRecords + * @param optional nil or *ListUsageRecordOpts - Optional Parameters: + * @param "Sim" (string) - SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM. + * @param "Fleet" (string) - SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred. + * @param "Network" (string) - SID of a Network resource. Only show UsageRecords representing usage on this network. + * @param "IsoCountry" (string) - Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country. + * @param "Group" (string) - Dimension over which to aggregate usage records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not aggregate across any of these dimensions, UsageRecords will be aggregated into the time buckets described by the `Granularity` parameter. + * @param "Granularity" (string) - Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`. `all` returns one UsageRecord that describes the usage for the entire period. + * @param "StartTime" (time.Time) - Only include usage that occurred at or after this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is one month before the `end_time`. + * @param "EndTime" (time.Time) - Only include usage that occurred before this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is the current time. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordResponse +*/ +func (c *DefaultApiService) ListUsageRecord(params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { + path := "/v1/UsageRecords" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Network != nil { + data.Set("Network", *params.Network) + } + if params != nil && params.IsoCountry != nil { + data.Set("IsoCountry", *params.IsoCountry) + } + if params != nil && params.Group != nil { + data.Set("Group", *params.Group) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.StartTime != nil { + data.Set("StartTime", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("EndTime", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFleetParams Optional parameters for the method 'UpdateFleet' +type UpdateFleetParams struct { + CommandsMethod *string `json:"CommandsMethod,omitempty"` + CommandsUrl *string `json:"CommandsUrl,omitempty"` + NetworkAccessProfile *string `json:"NetworkAccessProfile,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateFleet Method for UpdateFleet +Updates the given properties of a Super SIM Fleet instance from your account. + * @param Sid The SID of the Fleet resource to update. + * @param optional nil or *UpdateFleetOpts - Optional Parameters: + * @param "CommandsMethod" (string) - A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. + * @param "CommandsUrl" (string) - The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. + * @param "NetworkAccessProfile" (string) - The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. +@return SupersimV1Fleet +*/ +func (c *DefaultApiService) UpdateFleet(Sid string, params *UpdateFleetParams) (*SupersimV1Fleet, error) { + path := "/v1/Fleets/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CommandsMethod != nil { + data.Set("CommandsMethod", *params.CommandsMethod) + } + if params != nil && params.CommandsUrl != nil { + data.Set("CommandsUrl", *params.CommandsUrl) + } + if params != nil && params.NetworkAccessProfile != nil { + data.Set("NetworkAccessProfile", *params.NetworkAccessProfile) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Fleet{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateNetworkAccessProfileParams Optional parameters for the method 'UpdateNetworkAccessProfile' +type UpdateNetworkAccessProfileParams struct { + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateNetworkAccessProfile Method for UpdateNetworkAccessProfile +Updates the given properties of a Network Access Profile in your account. + * @param Sid The SID of the Network Access Profile to update. + * @param optional nil or *UpdateNetworkAccessProfileOpts - Optional Parameters: + * @param "UniqueName" (string) - The new unique name of the Network Access Profile. +@return SupersimV1NetworkAccessProfile +*/ +func (c *DefaultApiService) UpdateNetworkAccessProfile(Sid string, params *UpdateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) { + path := "/v1/NetworkAccessProfiles/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1NetworkAccessProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSimParams Optional parameters for the method 'UpdateSim' +type UpdateSimParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Fleet *string `json:"Fleet,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateSim Method for UpdateSim +Updates the given properties of a Super SIM instance from your account. + * @param Sid The SID of the Sim resource to update. + * @param optional nil or *UpdateSimOpts - Optional Parameters: + * @param "AccountSid" (string) - The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. + * @param "CallbackMethod" (string) - The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. + * @param "CallbackUrl" (string) - The URL we should call using the `callback_method` after an asynchronous update has finished. + * @param "Fleet" (string) - The SID or unique name of the Fleet to which the SIM resource should be assigned. + * @param "Status" (string) - The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. +@return SupersimV1Sim +*/ +func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*SupersimV1Sim, error) { + path := "/v1/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Fleet != nil { + data.Set("Fleet", *params.Fleet) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SupersimV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/supersim/v1/docs/CreateCommandRequest.md b/rest/supersim/v1/docs/CreateCommandRequest.md new file mode 100644 index 000000000..382803b5d --- /dev/null +++ b/rest/supersim/v1/docs/CreateCommandRequest.md @@ -0,0 +1,14 @@ +# CreateCommandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. | [optional] +**CallbackUrl** | **string** | The URL we should call using the `callback_method` after we have sent the command. | [optional] +**Command** | **string** | The message body of the command. | +**Sim** | **string** | The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/CreateFleetRequest.md b/rest/supersim/v1/docs/CreateFleetRequest.md new file mode 100644 index 000000000..84c49e193 --- /dev/null +++ b/rest/supersim/v1/docs/CreateFleetRequest.md @@ -0,0 +1,17 @@ +# CreateFleetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommandsEnabled** | **bool** | Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to `true`. | [optional] +**CommandsMethod** | **string** | A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. | [optional] +**CommandsUrl** | **string** | The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. | [optional] +**DataEnabled** | **bool** | Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`. | [optional] +**DataLimit** | **int32** | The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). | [optional] +**NetworkAccessProfile** | **string** | The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. | +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/CreateNetworkAccessProfileNetworkRequest.md b/rest/supersim/v1/docs/CreateNetworkAccessProfileNetworkRequest.md new file mode 100644 index 000000000..ab5509858 --- /dev/null +++ b/rest/supersim/v1/docs/CreateNetworkAccessProfileNetworkRequest.md @@ -0,0 +1,11 @@ +# CreateNetworkAccessProfileNetworkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Network** | **string** | The SID of the Network resource to be added to the Network Access Profile resource. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/CreateNetworkAccessProfileRequest.md b/rest/supersim/v1/docs/CreateNetworkAccessProfileRequest.md new file mode 100644 index 000000000..e5a7dca28 --- /dev/null +++ b/rest/supersim/v1/docs/CreateNetworkAccessProfileRequest.md @@ -0,0 +1,12 @@ +# CreateNetworkAccessProfileRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Networks** | **[]string** | List of Network SIDs that this Network Access Profile will allow connections to. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/DefaultApi.md b/rest/supersim/v1/docs/DefaultApi.md new file mode 100644 index 000000000..b5a513710 --- /dev/null +++ b/rest/supersim/v1/docs/DefaultApi.md @@ -0,0 +1,917 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCommand**](DefaultApi.md#CreateCommand) | **Post** /v1/Commands | +[**CreateFleet**](DefaultApi.md#CreateFleet) | **Post** /v1/Fleets | +[**CreateNetworkAccessProfile**](DefaultApi.md#CreateNetworkAccessProfile) | **Post** /v1/NetworkAccessProfiles | +[**CreateNetworkAccessProfileNetwork**](DefaultApi.md#CreateNetworkAccessProfileNetwork) | **Post** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks | +[**DeleteNetworkAccessProfileNetwork**](DefaultApi.md#DeleteNetworkAccessProfileNetwork) | **Delete** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid} | +[**FetchCommand**](DefaultApi.md#FetchCommand) | **Get** /v1/Commands/{Sid} | +[**FetchFleet**](DefaultApi.md#FetchFleet) | **Get** /v1/Fleets/{Sid} | +[**FetchNetwork**](DefaultApi.md#FetchNetwork) | **Get** /v1/Networks/{Sid} | +[**FetchNetworkAccessProfile**](DefaultApi.md#FetchNetworkAccessProfile) | **Get** /v1/NetworkAccessProfiles/{Sid} | +[**FetchNetworkAccessProfileNetwork**](DefaultApi.md#FetchNetworkAccessProfileNetwork) | **Get** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid} | +[**FetchSim**](DefaultApi.md#FetchSim) | **Get** /v1/Sims/{Sid} | +[**ListCommand**](DefaultApi.md#ListCommand) | **Get** /v1/Commands | +[**ListFleet**](DefaultApi.md#ListFleet) | **Get** /v1/Fleets | +[**ListNetwork**](DefaultApi.md#ListNetwork) | **Get** /v1/Networks | +[**ListNetworkAccessProfile**](DefaultApi.md#ListNetworkAccessProfile) | **Get** /v1/NetworkAccessProfiles | +[**ListNetworkAccessProfileNetwork**](DefaultApi.md#ListNetworkAccessProfileNetwork) | **Get** /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks | +[**ListSim**](DefaultApi.md#ListSim) | **Get** /v1/Sims | +[**ListUsageRecord**](DefaultApi.md#ListUsageRecord) | **Get** /v1/UsageRecords | +[**UpdateFleet**](DefaultApi.md#UpdateFleet) | **Post** /v1/Fleets/{Sid} | +[**UpdateNetworkAccessProfile**](DefaultApi.md#UpdateNetworkAccessProfile) | **Post** /v1/NetworkAccessProfiles/{Sid} | +[**UpdateSim**](DefaultApi.md#UpdateSim) | **Post** /v1/Sims/{Sid} | + + + +## CreateCommand + +> SupersimV1Command CreateCommand(ctx, optional) + + + +Send a Command to a Sim. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackMethod** | **optional.String**| The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. | + **CallbackUrl** | **optional.String**| The URL we should call using the `callback_method` after we have sent the command. | + **Command** | **optional.String**| The message body of the command. | + **Sim** | **optional.String**| The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. | + +### Return type + +[**SupersimV1Command**](supersim.v1.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFleet + +> SupersimV1Fleet CreateFleet(ctx, optional) + + + +Create a Fleet + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CommandsEnabled** | **optional.Bool**| Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to `true`. | + **CommandsMethod** | **optional.String**| A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. | + **CommandsUrl** | **optional.String**| The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. | + **DataEnabled** | **optional.Bool**| Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`. | + **DataLimit** | **optional.Int32**| The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). | + **NetworkAccessProfile** | **optional.String**| The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + +### Return type + +[**SupersimV1Fleet**](supersim.v1.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNetworkAccessProfile + +> SupersimV1NetworkAccessProfile CreateNetworkAccessProfile(ctx, optional) + + + +Create a new Network Access Profile + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateNetworkAccessProfileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateNetworkAccessProfileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Networks** | [**optional.Interface of []string**](string.md)| List of Network SIDs that this Network Access Profile will allow connections to. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + +### Return type + +[**SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNetworkAccessProfileNetwork + +> SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork CreateNetworkAccessProfileNetwork(ctx, NetworkAccessProfileSid, optional) + + + +Add a Network resource to the Network Access Profile resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**NetworkAccessProfileSid** | **string**| The unique string that identifies the Network Access Profile resource. | + **optional** | ***CreateNetworkAccessProfileNetworkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateNetworkAccessProfileNetworkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Network** | **optional.String**| The SID of the Network resource to be added to the Network Access Profile resource. | + +### Return type + +[**SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork**](supersim.v1.network_access_profile.network_access_profile_network.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteNetworkAccessProfileNetwork + +> DeleteNetworkAccessProfileNetwork(ctx, NetworkAccessProfileSid, Sid) + + + +Remove a Network resource from the Network Access Profile resource's. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**NetworkAccessProfileSid** | **string**| The unique string that identifies the Network Access Profile resource. | +**Sid** | **string**| The SID of the Network resource to be removed from the Network Access Profile resource. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCommand + +> SupersimV1Command FetchCommand(ctx, Sid) + + + +Fetch a Command instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Command resource to fetch. | + +### Return type + +[**SupersimV1Command**](supersim.v1.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFleet + +> SupersimV1Fleet FetchFleet(ctx, Sid) + + + +Fetch a Fleet instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Fleet resource to fetch. | + +### Return type + +[**SupersimV1Fleet**](supersim.v1.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchNetwork + +> SupersimV1Network FetchNetwork(ctx, Sid) + + + +Fetch a Network resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Network resource to fetch. | + +### Return type + +[**SupersimV1Network**](supersim.v1.network.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchNetworkAccessProfile + +> SupersimV1NetworkAccessProfile FetchNetworkAccessProfile(ctx, Sid) + + + +Fetch a Network Access Profile instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Network Access Profile resource to fetch. | + +### Return type + +[**SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchNetworkAccessProfileNetwork + +> SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork FetchNetworkAccessProfileNetwork(ctx, NetworkAccessProfileSid, Sid) + + + +Fetch a Network Access Profile resource's Network resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**NetworkAccessProfileSid** | **string**| The unique string that identifies the Network Access Profile resource. | +**Sid** | **string**| The SID of the Network resource to fetch. | + +### Return type + +[**SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork**](supersim.v1.network_access_profile.network_access_profile_network.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSim + +> SupersimV1Sim FetchSim(ctx, Sid) + + + +Fetch a Super SIM instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Sim resource to fetch. | + +### Return type + +[**SupersimV1Sim**](supersim.v1.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCommand + +> ListCommandResponse ListCommand(ctx, optional) + + + +Retrieve a list of Commands from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Sim** | **optional.String**| The SID or unique name of the Sim that Command was sent to or from. | + **Status** | **optional.String**| The status of the Command. Can be: `queued`, `sent`, `delivered`, `received` or `failed`. See the [Command Status Values](https://www.twilio.com/docs/wireless/api/command-resource#status-values) for a description of each. | + **Direction** | **optional.String**| The direction of the Command. Can be `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term `mobile terminated`, and `from_sim` is synonymous with the term `mobile originated`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCommandResponse**](ListCommandResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFleet + +> ListFleetResponse ListFleet(ctx, optional) + + + +Retrieve a list of Fleets from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **NetworkAccessProfile** | **optional.String**| The SID or unique name of the Network Access Profile that controls which cellular networks the Fleet's SIMs can connect to. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFleetResponse**](ListFleetResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNetwork + +> ListNetworkResponse ListNetwork(ctx, optional) + + + +Retrieve a list of Network resources. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListNetworkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListNetworkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **IsoCountry** | **optional.String**| The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resources to read. | + **Mcc** | **optional.String**| The 'mobile country code' of a country. Network resources with this `mcc` in their `identifiers` will be read. | + **Mnc** | **optional.String**| The 'mobile network code' of a mobile operator network. Network resources with this `mnc` in their `identifiers` will be read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListNetworkResponse**](ListNetworkResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNetworkAccessProfile + +> ListNetworkAccessProfileResponse ListNetworkAccessProfile(ctx, optional) + + + +Retrieve a list of Network Access Profiles from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListNetworkAccessProfileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListNetworkAccessProfileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListNetworkAccessProfileResponse**](ListNetworkAccessProfileResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNetworkAccessProfileNetwork + +> ListNetworkAccessProfileNetworkResponse ListNetworkAccessProfileNetwork(ctx, NetworkAccessProfileSid, optional) + + + +Retrieve a list of Network Access Profile resource's Network resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**NetworkAccessProfileSid** | **string**| The unique string that identifies the Network Access Profile resource. | + **optional** | ***ListNetworkAccessProfileNetworkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListNetworkAccessProfileNetworkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListNetworkAccessProfileNetworkResponse**](ListNetworkAccessProfileNetworkResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSim + +> ListSimResponse ListSim(ctx, optional) + + + +Retrieve a list of Super SIMs from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| The status of the Sim resources to read. Can be `new`, `ready`, `active`, `inactive`, or `scheduled`. | + **Fleet** | **optional.String**| The SID or unique name of the Fleet to which a list of Sims are assigned. | + **Iccid** | **optional.String**| The [ICCID](https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID) associated with a Super SIM to filter the list by. Passing this parameter will always return a list containing zero or one SIMs. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSimResponse**](ListSimResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecord + +> ListUsageRecordResponse ListUsageRecord(ctx, optional) + + + +List UsageRecords + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListUsageRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Sim** | **optional.String**| SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM. | + **Fleet** | **optional.String**| SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred. | + **Network** | **optional.String**| SID of a Network resource. Only show UsageRecords representing usage on this network. | + **IsoCountry** | **optional.String**| Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country. | + **Group** | **optional.String**| Dimension over which to aggregate usage records. Can be: `sim`, `fleet`, `network`, `isoCountry`. Default is to not aggregate across any of these dimensions, UsageRecords will be aggregated into the time buckets described by the `Granularity` parameter. | + **Granularity** | **optional.String**| Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`. `all` returns one UsageRecord that describes the usage for the entire period. | + **StartTime** | **optional.Time**| Only include usage that occurred at or after this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is one month before the `end_time`. | + **EndTime** | **optional.Time**| Only include usage that occurred before this time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Default is the current time. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordResponse**](ListUsageRecordResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFleet + +> SupersimV1Fleet UpdateFleet(ctx, Sid, optional) + + + +Updates the given properties of a Super SIM Fleet instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Fleet resource to update. | + **optional** | ***UpdateFleetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFleetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CommandsMethod** | **optional.String**| A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. | + **CommandsUrl** | **optional.String**| The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. | + **NetworkAccessProfile** | **optional.String**| The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + +### Return type + +[**SupersimV1Fleet**](supersim.v1.fleet.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateNetworkAccessProfile + +> SupersimV1NetworkAccessProfile UpdateNetworkAccessProfile(ctx, Sid, optional) + + + +Updates the given properties of a Network Access Profile in your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Network Access Profile to update. | + **optional** | ***UpdateNetworkAccessProfileOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateNetworkAccessProfileOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **UniqueName** | **optional.String**| The new unique name of the Network Access Profile. | + +### Return type + +[**SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSim + +> SupersimV1Sim UpdateSim(ctx, Sid, optional) + + + +Updates the given properties of a Super SIM instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Sim resource to update. | + **optional** | ***UpdateSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AccountSid** | **optional.String**| The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. | + **CallbackMethod** | **optional.String**| The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. | + **CallbackUrl** | **optional.String**| The URL we should call using the `callback_method` after an asynchronous update has finished. | + **Fleet** | **optional.String**| The SID or unique name of the Fleet to which the SIM resource should be assigned. | + **Status** | **optional.String**| The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + +### Return type + +[**SupersimV1Sim**](supersim.v1.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/supersim/v1/docs/ListCommandResponse.md b/rest/supersim/v1/docs/ListCommandResponse.md new file mode 100644 index 000000000..8115a0e87 --- /dev/null +++ b/rest/supersim/v1/docs/ListCommandResponse.md @@ -0,0 +1,12 @@ +# ListCommandResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]SupersimV1Command**](supersim.v1.command.md) | | [optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListCommandResponseMeta.md b/rest/supersim/v1/docs/ListCommandResponseMeta.md new file mode 100644 index 000000000..84838a66c --- /dev/null +++ b/rest/supersim/v1/docs/ListCommandResponseMeta.md @@ -0,0 +1,17 @@ +# ListCommandResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListFleetResponse.md b/rest/supersim/v1/docs/ListFleetResponse.md new file mode 100644 index 000000000..94df880b0 --- /dev/null +++ b/rest/supersim/v1/docs/ListFleetResponse.md @@ -0,0 +1,12 @@ +# ListFleetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fleets** | [**[]SupersimV1Fleet**](supersim.v1.fleet.md) | | [optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md b/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md new file mode 100644 index 000000000..8db328e39 --- /dev/null +++ b/rest/supersim/v1/docs/ListNetworkAccessProfileNetworkResponse.md @@ -0,0 +1,12 @@ +# ListNetworkAccessProfileNetworkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**Networks** | [**[]SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork**](supersim.v1.network_access_profile.network_access_profile_network.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md b/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md new file mode 100644 index 000000000..2e5366a77 --- /dev/null +++ b/rest/supersim/v1/docs/ListNetworkAccessProfileResponse.md @@ -0,0 +1,12 @@ +# ListNetworkAccessProfileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**NetworkAccessProfiles** | [**[]SupersimV1NetworkAccessProfile**](supersim.v1.network_access_profile.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListNetworkResponse.md b/rest/supersim/v1/docs/ListNetworkResponse.md new file mode 100644 index 000000000..b156c7d16 --- /dev/null +++ b/rest/supersim/v1/docs/ListNetworkResponse.md @@ -0,0 +1,12 @@ +# ListNetworkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**Networks** | [**[]SupersimV1Network**](supersim.v1.network.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListSimResponse.md b/rest/supersim/v1/docs/ListSimResponse.md new file mode 100644 index 000000000..da52f6c6b --- /dev/null +++ b/rest/supersim/v1/docs/ListSimResponse.md @@ -0,0 +1,12 @@ +# ListSimResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**Sims** | [**[]SupersimV1Sim**](supersim.v1.sim.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/ListUsageRecordResponse.md b/rest/supersim/v1/docs/ListUsageRecordResponse.md new file mode 100644 index 000000000..8aeee0a94 --- /dev/null +++ b/rest/supersim/v1/docs/ListUsageRecordResponse.md @@ -0,0 +1,12 @@ +# ListUsageRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**UsageRecords** | [**[]SupersimV1UsageRecord**](supersim.v1.usage_record.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1Command.md b/rest/supersim/v1/docs/SupersimV1Command.md new file mode 100644 index 000000000..425871f95 --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1Command.md @@ -0,0 +1,19 @@ +# SupersimV1Command + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Command** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Direction** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SimSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1Fleet.md b/rest/supersim/v1/docs/SupersimV1Fleet.md new file mode 100644 index 000000000..03efcdbc9 --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1Fleet.md @@ -0,0 +1,23 @@ +# SupersimV1Fleet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CommandsEnabled** | **bool** | | [optional] +**CommandsMethod** | **string** | | [optional] +**CommandsUrl** | **string** | | [optional] +**DataEnabled** | **bool** | | [optional] +**DataLimit** | **int32** | | [optional] +**DataMetering** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**NetworkAccessProfileSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1Network.md b/rest/supersim/v1/docs/SupersimV1Network.md new file mode 100644 index 000000000..ff2e35b2b --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1Network.md @@ -0,0 +1,15 @@ +# SupersimV1Network + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | [optional] +**Identifiers** | **[]map[string]interface{}** | | [optional] +**IsoCountry** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md b/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md new file mode 100644 index 000000000..592397d4e --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1NetworkAccessProfile.md @@ -0,0 +1,17 @@ +# SupersimV1NetworkAccessProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md b/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md new file mode 100644 index 000000000..ae59369aa --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork.md @@ -0,0 +1,16 @@ +# SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | | [optional] +**Identifiers** | **[]map[string]interface{}** | | [optional] +**IsoCountry** | **string** | | [optional] +**NetworkAccessProfileSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1Sim.md b/rest/supersim/v1/docs/SupersimV1Sim.md new file mode 100644 index 000000000..86d6d75da --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1Sim.md @@ -0,0 +1,19 @@ +# SupersimV1Sim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FleetSid** | **string** | | [optional] +**Iccid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/SupersimV1UsageRecord.md b/rest/supersim/v1/docs/SupersimV1UsageRecord.md new file mode 100644 index 000000000..395e0db99 --- /dev/null +++ b/rest/supersim/v1/docs/SupersimV1UsageRecord.md @@ -0,0 +1,19 @@ +# SupersimV1UsageRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DataDownload** | **int32** | | [optional] +**DataTotal** | **int32** | | [optional] +**DataUpload** | **int32** | | [optional] +**FleetSid** | **string** | | [optional] +**IsoCountry** | **string** | | [optional] +**NetworkSid** | **string** | | [optional] +**Period** | [**map[string]interface{}**](.md) | | [optional] +**SimSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/UpdateFleetRequest.md b/rest/supersim/v1/docs/UpdateFleetRequest.md new file mode 100644 index 000000000..779a5a4d3 --- /dev/null +++ b/rest/supersim/v1/docs/UpdateFleetRequest.md @@ -0,0 +1,14 @@ +# UpdateFleetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CommandsMethod** | **string** | A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. | [optional] +**CommandsUrl** | **string** | The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. | [optional] +**NetworkAccessProfile** | **string** | The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/UpdateNetworkAccessProfileRequest.md b/rest/supersim/v1/docs/UpdateNetworkAccessProfileRequest.md new file mode 100644 index 000000000..e714a623c --- /dev/null +++ b/rest/supersim/v1/docs/UpdateNetworkAccessProfileRequest.md @@ -0,0 +1,11 @@ +# UpdateNetworkAccessProfileRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UniqueName** | **string** | The new unique name of the Network Access Profile. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/docs/UpdateSimRequest.md b/rest/supersim/v1/docs/UpdateSimRequest.md new file mode 100644 index 000000000..6e025a0b6 --- /dev/null +++ b/rest/supersim/v1/docs/UpdateSimRequest.md @@ -0,0 +1,16 @@ +# UpdateSimRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. | [optional] +**CallbackMethod** | **string** | The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. | [optional] +**CallbackUrl** | **string** | The URL we should call using the `callback_method` after an asynchronous update has finished. | [optional] +**Fleet** | **string** | The SID or unique name of the Fleet to which the SIM resource should be assigned. | [optional] +**Status** | **string** | The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/supersim/v1/model_create_command_request.go b/rest/supersim/v1/model_create_command_request.go new file mode 100644 index 000000000..c18147aee --- /dev/null +++ b/rest/supersim/v1/model_create_command_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCommandRequest struct for CreateCommandRequest +type CreateCommandRequest struct { + // The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we should call using the `callback_method` after we have sent the command. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The message body of the command. + Command string `json:"Command"` + // The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. + Sim string `json:"Sim"` +} diff --git a/rest/supersim/v1/model_create_fleet_request.go b/rest/supersim/v1/model_create_fleet_request.go new file mode 100644 index 000000000..2467b39f0 --- /dev/null +++ b/rest/supersim/v1/model_create_fleet_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFleetRequest struct for CreateFleetRequest +type CreateFleetRequest struct { + // Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands. Defaults to `true`. + CommandsEnabled bool `json:"CommandsEnabled,omitempty"` + // A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. + CommandsMethod string `json:"CommandsMethod,omitempty"` + // The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. + CommandsUrl string `json:"CommandsUrl,omitempty"` + // Defines whether SIMs in the Fleet are capable of using 2G/3G/4G/LTE/CAT-M data connectivity. Defaults to `true`. + DataEnabled bool `json:"DataEnabled,omitempty"` + // The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume during a billing period (normally one month). Value must be between 1MB (1) and 2TB (2,000,000). Defaults to 1GB (1,000). + DataLimit int32 `json:"DataLimit,omitempty"` + // The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. + NetworkAccessProfile string `json:"NetworkAccessProfile"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/supersim/v1/model_create_network_access_profile_network_request.go b/rest/supersim/v1/model_create_network_access_profile_network_request.go new file mode 100644 index 000000000..20b6990fe --- /dev/null +++ b/rest/supersim/v1/model_create_network_access_profile_network_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateNetworkAccessProfileNetworkRequest struct for CreateNetworkAccessProfileNetworkRequest +type CreateNetworkAccessProfileNetworkRequest struct { + // The SID of the Network resource to be added to the Network Access Profile resource. + Network string `json:"Network"` +} diff --git a/rest/supersim/v1/model_create_network_access_profile_request.go b/rest/supersim/v1/model_create_network_access_profile_request.go new file mode 100644 index 000000000..7adf6e628 --- /dev/null +++ b/rest/supersim/v1/model_create_network_access_profile_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateNetworkAccessProfileRequest struct for CreateNetworkAccessProfileRequest +type CreateNetworkAccessProfileRequest struct { + // List of Network SIDs that this Network Access Profile will allow connections to. + Networks []string `json:"Networks,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/supersim/v1/model_list_command_response.go b/rest/supersim/v1/model_list_command_response.go new file mode 100644 index 000000000..c782154f8 --- /dev/null +++ b/rest/supersim/v1/model_list_command_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCommandResponse struct for ListCommandResponse +type ListCommandResponse struct { + Commands []SupersimV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/supersim/v1/model_list_command_response_meta.go b/rest/supersim/v1/model_list_command_response_meta.go new file mode 100644 index 000000000..b667698a1 --- /dev/null +++ b/rest/supersim/v1/model_list_command_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCommandResponseMeta struct for ListCommandResponseMeta +type ListCommandResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_list_fleet_response.go b/rest/supersim/v1/model_list_fleet_response.go new file mode 100644 index 000000000..99a838ae5 --- /dev/null +++ b/rest/supersim/v1/model_list_fleet_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFleetResponse struct for ListFleetResponse +type ListFleetResponse struct { + Fleets []SupersimV1Fleet `json:"Fleets,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/supersim/v1/model_list_network_access_profile_network_response.go b/rest/supersim/v1/model_list_network_access_profile_network_response.go new file mode 100644 index 000000000..cee6558d8 --- /dev/null +++ b/rest/supersim/v1/model_list_network_access_profile_network_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListNetworkAccessProfileNetworkResponse struct for ListNetworkAccessProfileNetworkResponse +type ListNetworkAccessProfileNetworkResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Networks []SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork `json:"Networks,omitempty"` +} diff --git a/rest/supersim/v1/model_list_network_access_profile_response.go b/rest/supersim/v1/model_list_network_access_profile_response.go new file mode 100644 index 000000000..874e5438c --- /dev/null +++ b/rest/supersim/v1/model_list_network_access_profile_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListNetworkAccessProfileResponse struct for ListNetworkAccessProfileResponse +type ListNetworkAccessProfileResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + NetworkAccessProfiles []SupersimV1NetworkAccessProfile `json:"NetworkAccessProfiles,omitempty"` +} diff --git a/rest/supersim/v1/model_list_network_response.go b/rest/supersim/v1/model_list_network_response.go new file mode 100644 index 000000000..224b865cc --- /dev/null +++ b/rest/supersim/v1/model_list_network_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListNetworkResponse struct for ListNetworkResponse +type ListNetworkResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Networks []SupersimV1Network `json:"Networks,omitempty"` +} diff --git a/rest/supersim/v1/model_list_sim_response.go b/rest/supersim/v1/model_list_sim_response.go new file mode 100644 index 000000000..cd0841fba --- /dev/null +++ b/rest/supersim/v1/model_list_sim_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSimResponse struct for ListSimResponse +type ListSimResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Sims []SupersimV1Sim `json:"Sims,omitempty"` +} diff --git a/rest/supersim/v1/model_list_usage_record_response.go b/rest/supersim/v1/model_list_usage_record_response.go new file mode 100644 index 000000000..bb4f9c35c --- /dev/null +++ b/rest/supersim/v1/model_list_usage_record_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordResponse struct for ListUsageRecordResponse +type ListUsageRecordResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + UsageRecords []SupersimV1UsageRecord `json:"UsageRecords,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_command.go b/rest/supersim/v1/model_supersim_v1_command.go new file mode 100644 index 000000000..753f73f70 --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_command.go @@ -0,0 +1,26 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SupersimV1Command struct for SupersimV1Command +type SupersimV1Command struct { + AccountSid string `json:"AccountSid,omitempty"` + Command string `json:"Command,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Direction string `json:"Direction,omitempty"` + Sid string `json:"Sid,omitempty"` + SimSid string `json:"SimSid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_fleet.go b/rest/supersim/v1/model_supersim_v1_fleet.go new file mode 100644 index 000000000..f67e30a2f --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_fleet.go @@ -0,0 +1,30 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SupersimV1Fleet struct for SupersimV1Fleet +type SupersimV1Fleet struct { + AccountSid string `json:"AccountSid,omitempty"` + CommandsEnabled bool `json:"CommandsEnabled,omitempty"` + CommandsMethod string `json:"CommandsMethod,omitempty"` + CommandsUrl string `json:"CommandsUrl,omitempty"` + DataEnabled bool `json:"DataEnabled,omitempty"` + DataLimit int32 `json:"DataLimit,omitempty"` + DataMetering string `json:"DataMetering,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + NetworkAccessProfileSid string `json:"NetworkAccessProfileSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_network.go b/rest/supersim/v1/model_supersim_v1_network.go new file mode 100644 index 000000000..db431d6b9 --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_network.go @@ -0,0 +1,19 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SupersimV1Network struct for SupersimV1Network +type SupersimV1Network struct { + FriendlyName string `json:"FriendlyName,omitempty"` + Identifiers []map[string]interface{} `json:"Identifiers,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_network_access_profile.go b/rest/supersim/v1/model_supersim_v1_network_access_profile.go new file mode 100644 index 000000000..fd4c60723 --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_network_access_profile.go @@ -0,0 +1,24 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SupersimV1NetworkAccessProfile struct for SupersimV1NetworkAccessProfile +type SupersimV1NetworkAccessProfile struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go b/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go new file mode 100644 index 000000000..dcb40fac0 --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_network_access_profile_network_access_profile_network.go @@ -0,0 +1,20 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct for SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork +type SupersimV1NetworkAccessProfileNetworkAccessProfileNetwork struct { + FriendlyName string `json:"FriendlyName,omitempty"` + Identifiers []map[string]interface{} `json:"Identifiers,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + NetworkAccessProfileSid string `json:"NetworkAccessProfileSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_sim.go b/rest/supersim/v1/model_supersim_v1_sim.go new file mode 100644 index 000000000..b94e7cbae --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_sim.go @@ -0,0 +1,26 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SupersimV1Sim struct for SupersimV1Sim +type SupersimV1Sim struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + Iccid string `json:"Iccid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/supersim/v1/model_supersim_v1_usage_record.go b/rest/supersim/v1/model_supersim_v1_usage_record.go new file mode 100644 index 000000000..31921cbe4 --- /dev/null +++ b/rest/supersim/v1/model_supersim_v1_usage_record.go @@ -0,0 +1,23 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SupersimV1UsageRecord struct for SupersimV1UsageRecord +type SupersimV1UsageRecord struct { + AccountSid string `json:"AccountSid,omitempty"` + DataDownload int32 `json:"DataDownload,omitempty"` + DataTotal int32 `json:"DataTotal,omitempty"` + DataUpload int32 `json:"DataUpload,omitempty"` + FleetSid string `json:"FleetSid,omitempty"` + IsoCountry string `json:"IsoCountry,omitempty"` + NetworkSid string `json:"NetworkSid,omitempty"` + Period map[string]interface{} `json:"Period,omitempty"` + SimSid string `json:"SimSid,omitempty"` +} diff --git a/rest/supersim/v1/model_update_fleet_request.go b/rest/supersim/v1/model_update_fleet_request.go new file mode 100644 index 000000000..3928e7061 --- /dev/null +++ b/rest/supersim/v1/model_update_fleet_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFleetRequest struct for UpdateFleetRequest +type UpdateFleetRequest struct { + // A string representing the HTTP method to use when making a request to `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`. + CommandsMethod string `json:"CommandsMethod,omitempty"` + // The URL that will receive a webhook when a SIM in the Fleet is used to send an SMS from your device (mobile originated) to the Commands number. Your server should respond with an HTTP status code in the 200 range; any response body will be ignored. + CommandsUrl string `json:"CommandsUrl,omitempty"` + // The SID or unique name of the Network Access Profile that will control which cellular networks the Fleet's SIMs can connect to. + NetworkAccessProfile string `json:"NetworkAccessProfile,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/supersim/v1/model_update_network_access_profile_request.go b/rest/supersim/v1/model_update_network_access_profile_request.go new file mode 100644 index 000000000..61200be61 --- /dev/null +++ b/rest/supersim/v1/model_update_network_access_profile_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateNetworkAccessProfileRequest struct for UpdateNetworkAccessProfileRequest +type UpdateNetworkAccessProfileRequest struct { + // The new unique name of the Network Access Profile. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/supersim/v1/model_update_sim_request.go b/rest/supersim/v1/model_update_sim_request.go new file mode 100644 index 000000000..8441596c0 --- /dev/null +++ b/rest/supersim/v1/model_update_sim_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSimRequest struct for UpdateSimRequest +type UpdateSimRequest struct { + // The SID of the Account to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a Subaccount of the requesting Account. Only valid when the Sim resource's status is new. + AccountSid string `json:"AccountSid,omitempty"` + // The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is POST. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we should call using the `callback_method` after an asynchronous update has finished. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The SID or unique name of the Fleet to which the SIM resource should be assigned. + Fleet string `json:"Fleet,omitempty"` + // The new status of the resource. Can be: `ready`, `active`, or `inactive`. See the [Super SIM Status Values](https://www.twilio.com/docs/iot/supersim/api/sim-resource#status-values) for more info. + Status string `json:"Status,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/supersim/v1/response.go b/rest/supersim/v1/response.go new file mode 100644 index 000000000..abb8535c9 --- /dev/null +++ b/rest/supersim/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Supersim + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/sync/v1/.openapi-generator-ignore b/rest/sync/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/sync/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/sync/v1/README.md b/rest/sync/v1/README.md new file mode 100644 index 000000000..97e544f00 --- /dev/null +++ b/rest/sync/v1/README.md @@ -0,0 +1,150 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateDocument**](docs/DefaultApi.md#createdocument) | **Post** /v1/Services/{ServiceSid}/Documents | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v1/Services | +*DefaultApi* | [**CreateStreamMessage**](docs/DefaultApi.md#createstreammessage) | **Post** /v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages | +*DefaultApi* | [**CreateSyncList**](docs/DefaultApi.md#createsynclist) | **Post** /v1/Services/{ServiceSid}/Lists | +*DefaultApi* | [**CreateSyncListItem**](docs/DefaultApi.md#createsynclistitem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | +*DefaultApi* | [**CreateSyncMap**](docs/DefaultApi.md#createsyncmap) | **Post** /v1/Services/{ServiceSid}/Maps | +*DefaultApi* | [**CreateSyncMapItem**](docs/DefaultApi.md#createsyncmapitem) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items | +*DefaultApi* | [**CreateSyncStream**](docs/DefaultApi.md#createsyncstream) | **Post** /v1/Services/{ServiceSid}/Streams | +*DefaultApi* | [**DeleteDocument**](docs/DefaultApi.md#deletedocument) | **Delete** /v1/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**DeleteDocumentPermission**](docs/DefaultApi.md#deletedocumentpermission) | **Delete** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v1/Services/{Sid} | +*DefaultApi* | [**DeleteSyncList**](docs/DefaultApi.md#deletesynclist) | **Delete** /v1/Services/{ServiceSid}/Lists/{Sid} | +*DefaultApi* | [**DeleteSyncListItem**](docs/DefaultApi.md#deletesynclistitem) | **Delete** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**DeleteSyncListPermission**](docs/DefaultApi.md#deletesynclistpermission) | **Delete** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteSyncMap**](docs/DefaultApi.md#deletesyncmap) | **Delete** /v1/Services/{ServiceSid}/Maps/{Sid} | +*DefaultApi* | [**DeleteSyncMapItem**](docs/DefaultApi.md#deletesyncmapitem) | **Delete** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**DeleteSyncMapPermission**](docs/DefaultApi.md#deletesyncmappermission) | **Delete** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**DeleteSyncStream**](docs/DefaultApi.md#deletesyncstream) | **Delete** /v1/Services/{ServiceSid}/Streams/{Sid} | +*DefaultApi* | [**FetchDocument**](docs/DefaultApi.md#fetchdocument) | **Get** /v1/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**FetchDocumentPermission**](docs/DefaultApi.md#fetchdocumentpermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v1/Services/{Sid} | +*DefaultApi* | [**FetchSyncList**](docs/DefaultApi.md#fetchsynclist) | **Get** /v1/Services/{ServiceSid}/Lists/{Sid} | +*DefaultApi* | [**FetchSyncListItem**](docs/DefaultApi.md#fetchsynclistitem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**FetchSyncListPermission**](docs/DefaultApi.md#fetchsynclistpermission) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchSyncMap**](docs/DefaultApi.md#fetchsyncmap) | **Get** /v1/Services/{ServiceSid}/Maps/{Sid} | +*DefaultApi* | [**FetchSyncMapItem**](docs/DefaultApi.md#fetchsyncmapitem) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**FetchSyncMapPermission**](docs/DefaultApi.md#fetchsyncmappermission) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**FetchSyncStream**](docs/DefaultApi.md#fetchsyncstream) | **Get** /v1/Services/{ServiceSid}/Streams/{Sid} | +*DefaultApi* | [**ListDocument**](docs/DefaultApi.md#listdocument) | **Get** /v1/Services/{ServiceSid}/Documents | +*DefaultApi* | [**ListDocumentPermission**](docs/DefaultApi.md#listdocumentpermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v1/Services | +*DefaultApi* | [**ListSyncList**](docs/DefaultApi.md#listsynclist) | **Get** /v1/Services/{ServiceSid}/Lists | +*DefaultApi* | [**ListSyncListItem**](docs/DefaultApi.md#listsynclistitem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | +*DefaultApi* | [**ListSyncListPermission**](docs/DefaultApi.md#listsynclistpermission) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions | +*DefaultApi* | [**ListSyncMap**](docs/DefaultApi.md#listsyncmap) | **Get** /v1/Services/{ServiceSid}/Maps | +*DefaultApi* | [**ListSyncMapItem**](docs/DefaultApi.md#listsyncmapitem) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items | +*DefaultApi* | [**ListSyncMapPermission**](docs/DefaultApi.md#listsyncmappermission) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions | +*DefaultApi* | [**ListSyncStream**](docs/DefaultApi.md#listsyncstream) | **Get** /v1/Services/{ServiceSid}/Streams | +*DefaultApi* | [**UpdateDocument**](docs/DefaultApi.md#updatedocument) | **Post** /v1/Services/{ServiceSid}/Documents/{Sid} | +*DefaultApi* | [**UpdateDocumentPermission**](docs/DefaultApi.md#updatedocumentpermission) | **Post** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v1/Services/{Sid} | +*DefaultApi* | [**UpdateSyncList**](docs/DefaultApi.md#updatesynclist) | **Post** /v1/Services/{ServiceSid}/Lists/{Sid} | +*DefaultApi* | [**UpdateSyncListItem**](docs/DefaultApi.md#updatesynclistitem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +*DefaultApi* | [**UpdateSyncListPermission**](docs/DefaultApi.md#updatesynclistpermission) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateSyncMap**](docs/DefaultApi.md#updatesyncmap) | **Post** /v1/Services/{ServiceSid}/Maps/{Sid} | +*DefaultApi* | [**UpdateSyncMapItem**](docs/DefaultApi.md#updatesyncmapitem) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +*DefaultApi* | [**UpdateSyncMapPermission**](docs/DefaultApi.md#updatesyncmappermission) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +*DefaultApi* | [**UpdateSyncStream**](docs/DefaultApi.md#updatesyncstream) | **Post** /v1/Services/{ServiceSid}/Streams/{Sid} | + + +## Documentation For Models + + - [CreateDocumentRequest](docs/CreateDocumentRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateStreamMessageRequest](docs/CreateStreamMessageRequest.md) + - [CreateSyncListItemRequest](docs/CreateSyncListItemRequest.md) + - [CreateSyncListRequest](docs/CreateSyncListRequest.md) + - [CreateSyncMapItemRequest](docs/CreateSyncMapItemRequest.md) + - [CreateSyncMapRequest](docs/CreateSyncMapRequest.md) + - [CreateSyncStreamRequest](docs/CreateSyncStreamRequest.md) + - [ListDocumentPermissionResponse](docs/ListDocumentPermissionResponse.md) + - [ListDocumentResponse](docs/ListDocumentResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) + - [ListSyncListItemResponse](docs/ListSyncListItemResponse.md) + - [ListSyncListPermissionResponse](docs/ListSyncListPermissionResponse.md) + - [ListSyncListResponse](docs/ListSyncListResponse.md) + - [ListSyncMapItemResponse](docs/ListSyncMapItemResponse.md) + - [ListSyncMapPermissionResponse](docs/ListSyncMapPermissionResponse.md) + - [ListSyncMapResponse](docs/ListSyncMapResponse.md) + - [ListSyncStreamResponse](docs/ListSyncStreamResponse.md) + - [SyncV1Service](docs/SyncV1Service.md) + - [SyncV1ServiceDocument](docs/SyncV1ServiceDocument.md) + - [SyncV1ServiceDocumentDocumentPermission](docs/SyncV1ServiceDocumentDocumentPermission.md) + - [SyncV1ServiceSyncList](docs/SyncV1ServiceSyncList.md) + - [SyncV1ServiceSyncListSyncListItem](docs/SyncV1ServiceSyncListSyncListItem.md) + - [SyncV1ServiceSyncListSyncListPermission](docs/SyncV1ServiceSyncListSyncListPermission.md) + - [SyncV1ServiceSyncMap](docs/SyncV1ServiceSyncMap.md) + - [SyncV1ServiceSyncMapSyncMapItem](docs/SyncV1ServiceSyncMapSyncMapItem.md) + - [SyncV1ServiceSyncMapSyncMapPermission](docs/SyncV1ServiceSyncMapSyncMapPermission.md) + - [SyncV1ServiceSyncStream](docs/SyncV1ServiceSyncStream.md) + - [SyncV1ServiceSyncStreamStreamMessage](docs/SyncV1ServiceSyncStreamStreamMessage.md) + - [UpdateDocumentPermissionRequest](docs/UpdateDocumentPermissionRequest.md) + - [UpdateDocumentRequest](docs/UpdateDocumentRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateSyncListItemRequest](docs/UpdateSyncListItemRequest.md) + - [UpdateSyncListPermissionRequest](docs/UpdateSyncListPermissionRequest.md) + - [UpdateSyncListRequest](docs/UpdateSyncListRequest.md) + - [UpdateSyncMapItemRequest](docs/UpdateSyncMapItemRequest.md) + - [UpdateSyncMapPermissionRequest](docs/UpdateSyncMapPermissionRequest.md) + - [UpdateSyncMapRequest](docs/UpdateSyncMapRequest.md) + - [UpdateSyncStreamRequest](docs/UpdateSyncStreamRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/sync/v1/api_default.go b/rest/sync/v1/api_default.go new file mode 100644 index 000000000..ab1f95e00 --- /dev/null +++ b/rest/sync/v1/api_default.go @@ -0,0 +1,2096 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://sync.twilio.com"), + } +} +// CreateDocumentParams Optional parameters for the method 'CreateDocument' +type CreateDocumentParams struct { + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateDocument Method for CreateDocument + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Document resource in. + * @param optional nil or *CreateDocumentOpts - Optional Parameters: + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. + * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Sync Document +@return SyncV1ServiceDocument +*/ +func (c *DefaultApiService) CreateDocument(ServiceSid string, params *CreateDocumentParams) (*SyncV1ServiceDocument, error) { + path := "/v1/Services/{ServiceSid}/Documents" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` +} + +/* +CreateService Method for CreateService + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "AclEnabled" (bool) - Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. + * @param "FriendlyName" (string) - A string that you assign to describe the resource. + * @param "ReachabilityDebouncingEnabled" (bool) - Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. + * @param "ReachabilityDebouncingWindow" (int32) - The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`. + * @param "ReachabilityWebhooksEnabled" (bool) - Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. + * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. + * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. +@return SyncV1Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*SyncV1Service, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) + } + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateStreamMessageParams Optional parameters for the method 'CreateStreamMessage' +type CreateStreamMessageParams struct { + Data *map[string]interface{} `json:"Data,omitempty"` +} + +/* +CreateStreamMessage Method for CreateStreamMessage +Create a new Stream Message. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream Message in. + * @param StreamSid The SID of the Sync Stream to create the new Stream Message resource for. + * @param optional nil or *CreateStreamMessageOpts - Optional Parameters: + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. +@return SyncV1ServiceSyncStreamStreamMessage +*/ +func (c *DefaultApiService) CreateStreamMessage(ServiceSid string, StreamSid string, params *CreateStreamMessageParams) (*SyncV1ServiceSyncStreamStreamMessage, error) { + path := "/v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"StreamSid"+"}", StreamSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStreamStreamMessage{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncListParams Optional parameters for the method 'CreateSyncList' +type CreateSyncListParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSyncList Method for CreateSyncList + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Sync List in. + * @param optional nil or *CreateSyncListOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - Alias for collection_ttl. If both are provided, this value is ignored. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. +@return SyncV1ServiceSyncList +*/ +func (c *DefaultApiService) CreateSyncList(ServiceSid string, params *CreateSyncListParams) (*SyncV1ServiceSyncList, error) { + path := "/v1/Services/{ServiceSid}/Lists" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncListItemParams Optional parameters for the method 'CreateSyncListItem' +type CreateSyncListItemParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +CreateSyncListItem Method for CreateSyncListItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in. + * @param ListSid The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`. + * @param optional nil or *CreateSyncListItemOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. + * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. +@return SyncV1ServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) CreateSyncListItem(ServiceSid string, ListSid string, params *CreateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncMapParams Optional parameters for the method 'CreateSyncMap' +type CreateSyncMapParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSyncMap Method for CreateSyncMap + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Sync Map in. + * @param optional nil or *CreateSyncMapOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. +@return SyncV1ServiceSyncMap +*/ +func (c *DefaultApiService) CreateSyncMap(ServiceSid string, params *CreateSyncMapParams) (*SyncV1ServiceSyncMap, error) { + path := "/v1/Services/{ServiceSid}/Maps" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncMapItemParams Optional parameters for the method 'CreateSyncMapItem' +type CreateSyncMapItemParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Key *string `json:"Key,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +CreateSyncMapItem Method for CreateSyncMapItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Map Item in. + * @param MapSid The SID of the Sync Map to add the new Map Item to. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param optional nil or *CreateSyncMapItemOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. + * @param "ItemTtl" (int32) - How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Key" (string) - The unique, user-defined key for the Map Item. Can be up to 320 characters long. + * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. +@return SyncV1ServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) CreateSyncMapItem(ServiceSid string, MapSid string, params *CreateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Key != nil { + data.Set("Key", *params.Key) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSyncStreamParams Optional parameters for the method 'CreateSyncStream' +type CreateSyncStreamParams struct { + Ttl *int32 `json:"Ttl,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateSyncStream Method for CreateSyncStream +Create a new Stream. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream in. + * @param optional nil or *CreateSyncStreamOpts - Optional Parameters: + * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. +@return SyncV1ServiceSyncStream +*/ +func (c *DefaultApiService) CreateSyncStream(ServiceSid string, params *CreateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { + path := "/v1/Services/{ServiceSid}/Streams" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// DeleteDocumentParams Optional parameters for the method 'DeleteDocument' +type DeleteDocumentParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteDocument Method for DeleteDocument + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to delete. + * @param Sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`. + * @param optional nil or *DeleteDocumentOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteDocument(ServiceSid string, Sid string, params *DeleteDocumentParams) (error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteDocumentPermission Method for DeleteDocumentPermission +Delete a specific Sync Document Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete. + * @param DocumentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to delete. +*/ +func (c *DefaultApiService) DeleteDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService + * @param Sid The SID of the Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncList Method for DeleteSyncList + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to delete. + * @param Sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. +*/ +func (c *DefaultApiService) DeleteSyncList(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteSyncListItemParams Optional parameters for the method 'DeleteSyncListItem' +type DeleteSyncListItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteSyncListItem Method for DeleteSyncListItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to delete. + * @param ListSid The SID of the Sync List with the Sync List Item resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Index The index of the Sync List Item resource to delete. + * @param optional nil or *DeleteSyncListItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteSyncListItem(ServiceSid string, ListSid string, Index int32, params *DeleteSyncListItemParams) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncListPermission Method for DeleteSyncListPermission +Delete a specific Sync List Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete. + * @param ListSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete. +*/ +func (c *DefaultApiService) DeleteSyncListPermission(ServiceSid string, ListSid string, Identity string) (error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncMap Method for DeleteSyncMap + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to delete. + * @param Sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`. +*/ +func (c *DefaultApiService) DeleteSyncMap(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} +// DeleteSyncMapItemParams Optional parameters for the method 'DeleteSyncMapItem' +type DeleteSyncMapItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` +} + +/* +DeleteSyncMapItem Method for DeleteSyncMapItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to delete. + * @param MapSid The SID of the Sync Map with the Sync Map Item resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Key The `key` value of the Sync Map Item resource to delete. + * @param optional nil or *DeleteSyncMapItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header +*/ +func (c *DefaultApiService) DeleteSyncMapItem(ServiceSid string, MapSid string, Key string, params *DeleteSyncMapItemParams) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncMapPermission Method for DeleteSyncMapPermission +Delete a specific Sync Map Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`. + * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete. +*/ +func (c *DefaultApiService) DeleteSyncMapPermission(ServiceSid string, MapSid string, Identity string) (error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSyncStream Method for DeleteSyncStream +Delete a specific Stream. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to delete. + * @param Sid The SID of the Stream resource to delete. +*/ +func (c *DefaultApiService) DeleteSyncStream(ServiceSid string, Sid string) (error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchDocument Method for FetchDocument + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to fetch. + * @param Sid The SID of the Document resource to fetch. Can be the Document resource's `sid` or its `unique_name`. +@return SyncV1ServiceDocument +*/ +func (c *DefaultApiService) FetchDocument(ServiceSid string, Sid string) (*SyncV1ServiceDocument, error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDocumentPermission Method for FetchDocumentPermission +Fetch a specific Sync Document Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to fetch. + * @param DocumentSid The SID of the Sync Document with the Document Permission resource to fetch. Can be the Document resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to fetch. +@return SyncV1ServiceDocumentDocumentPermission +*/ +func (c *DefaultApiService) FetchDocumentPermission(ServiceSid string, DocumentSid string, Identity string) (*SyncV1ServiceDocumentDocumentPermission, error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService + * @param Sid The SID of the Service resource to fetch. +@return SyncV1Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*SyncV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncList Method for FetchSyncList + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to fetch. + * @param Sid The SID of the Sync List resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. +@return SyncV1ServiceSyncList +*/ +func (c *DefaultApiService) FetchSyncList(ServiceSid string, Sid string) (*SyncV1ServiceSyncList, error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncListItem Method for FetchSyncListItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to fetch. + * @param ListSid The SID of the Sync List with the Sync List Item resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Index The index of the Sync List Item resource to fetch. +@return SyncV1ServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) FetchSyncListItem(ServiceSid string, ListSid string, Index int32) (*SyncV1ServiceSyncListSyncListItem, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncListPermission Method for FetchSyncListPermission +Fetch a specific Sync List Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to fetch. + * @param ListSid The SID of the Sync List with the Sync List Permission resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch. +@return SyncV1ServiceSyncListSyncListPermission +*/ +func (c *DefaultApiService) FetchSyncListPermission(ServiceSid string, ListSid string, Identity string) (*SyncV1ServiceSyncListSyncListPermission, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMap Method for FetchSyncMap + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to fetch. + * @param Sid The SID of the Sync Map resource to fetch. Can be the Sync Map's `sid` or its `unique_name`. +@return SyncV1ServiceSyncMap +*/ +func (c *DefaultApiService) FetchSyncMap(ServiceSid string, Sid string) (*SyncV1ServiceSyncMap, error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMapItem Method for FetchSyncMapItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to fetch. + * @param MapSid The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Key The `key` value of the Sync Map Item resource to fetch. +@return SyncV1ServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) FetchSyncMapItem(ServiceSid string, MapSid string, Key string) (*SyncV1ServiceSyncMapSyncMapItem, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncMapPermission Method for FetchSyncMapPermission +Fetch a specific Sync Map Permission. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to fetch. Can be the Service's `sid` value or `default`. + * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch. +@return SyncV1ServiceSyncMapSyncMapPermission +*/ +func (c *DefaultApiService) FetchSyncMapPermission(ServiceSid string, MapSid string, Identity string) (*SyncV1ServiceSyncMapSyncMapPermission, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSyncStream Method for FetchSyncStream +Fetch a specific Stream. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to fetch. + * @param Sid The SID of the Stream resource to fetch. +@return SyncV1ServiceSyncStream +*/ +func (c *DefaultApiService) FetchSyncStream(ServiceSid string, Sid string) (*SyncV1ServiceSyncStream, error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDocumentParams Optional parameters for the method 'ListDocument' +type ListDocumentParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDocument Method for ListDocument + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resources to read. + * @param optional nil or *ListDocumentOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDocumentResponse +*/ +func (c *DefaultApiService) ListDocument(ServiceSid string, params *ListDocumentParams) (*ListDocumentResponse, error) { + path := "/v1/Services/{ServiceSid}/Documents" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDocumentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDocumentPermissionParams Optional parameters for the method 'ListDocumentPermission' +type ListDocumentPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDocumentPermission Method for ListDocumentPermission +Retrieve a list of all Permissions applying to a Sync Document. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resources to read. + * @param DocumentSid The SID of the Sync Document with the Document Permission resources to read. Can be the Document resource's `sid` or its `unique_name`. + * @param optional nil or *ListDocumentPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDocumentPermissionResponse +*/ +func (c *DefaultApiService) ListDocumentPermission(ServiceSid string, DocumentSid string, params *ListDocumentPermissionParams) (*ListDocumentPermissionResponse, error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDocumentPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v1/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListParams Optional parameters for the method 'ListSyncList' +type ListSyncListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncList Method for ListSyncList + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resources to read. + * @param optional nil or *ListSyncListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListResponse +*/ +func (c *DefaultApiService) ListSyncList(ServiceSid string, params *ListSyncListParams) (*ListSyncListResponse, error) { + path := "/v1/Services/{ServiceSid}/Lists" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListItemParams Optional parameters for the method 'ListSyncListItem' +type ListSyncListItemParams struct { + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncListItem Method for ListSyncListItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the List Item resources to read. + * @param ListSid The SID of the Sync List with the List Items to read. Can be the Sync List resource's `sid` or its `unique_name`. + * @param optional nil or *ListSyncListItemOpts - Optional Parameters: + * @param "Order" (string) - How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. + * @param "From" (string) - The `index` of the first Sync List Item resource to read. See also `bounds`. + * @param "Bounds" (string) - Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListItemResponse +*/ +func (c *DefaultApiService) ListSyncListItem(ServiceSid string, ListSid string, params *ListSyncListItemParams) (*ListSyncListItemResponse, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncListPermissionParams Optional parameters for the method 'ListSyncListPermission' +type ListSyncListPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncListPermission Method for ListSyncListPermission +Retrieve a list of all Permissions applying to a Sync List. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resources to read. + * @param ListSid The SID of the Sync List with the Sync List Permission resources to read. Can be the Sync List resource's `sid` or its `unique_name`. + * @param optional nil or *ListSyncListPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncListPermissionResponse +*/ +func (c *DefaultApiService) ListSyncListPermission(ServiceSid string, ListSid string, params *ListSyncListPermissionParams) (*ListSyncListPermissionResponse, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncListPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapParams Optional parameters for the method 'ListSyncMap' +type ListSyncMapParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMap Method for ListSyncMap + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resources to read. + * @param optional nil or *ListSyncMapOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapResponse +*/ +func (c *DefaultApiService) ListSyncMap(ServiceSid string, params *ListSyncMapParams) (*ListSyncMapResponse, error) { + path := "/v1/Services/{ServiceSid}/Maps" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapItemParams Optional parameters for the method 'ListSyncMapItem' +type ListSyncMapItemParams struct { + Order *string `json:"Order,omitempty"` + From *string `json:"From,omitempty"` + Bounds *string `json:"Bounds,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMapItem Method for ListSyncMapItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Map Item resources to read. + * @param MapSid The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param optional nil or *ListSyncMapItemOpts - Optional Parameters: + * @param "Order" (string) - How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key. + * @param "From" (string) - The `key` of the first Sync Map Item resource to read. See also `bounds`. + * @param "Bounds" (string) - Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapItemResponse +*/ +func (c *DefaultApiService) ListSyncMapItem(ServiceSid string, MapSid string, params *ListSyncMapItemParams) (*ListSyncMapItemResponse, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Order != nil { + data.Set("Order", *params.Order) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Bounds != nil { + data.Set("Bounds", *params.Bounds) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapItemResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncMapPermissionParams Optional parameters for the method 'ListSyncMapPermission' +type ListSyncMapPermissionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncMapPermission Method for ListSyncMapPermission +Retrieve a list of all Permissions applying to a Sync Map. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resources to read. Can be the Service's `sid` value or `default`. + * @param MapSid The SID of the Sync Map with the Permission resources to read. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param optional nil or *ListSyncMapPermissionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncMapPermissionResponse +*/ +func (c *DefaultApiService) ListSyncMapPermission(ServiceSid string, MapSid string, params *ListSyncMapPermissionParams) (*ListSyncMapPermissionResponse, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncMapPermissionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSyncStreamParams Optional parameters for the method 'ListSyncStream' +type ListSyncStreamParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSyncStream Method for ListSyncStream +Retrieve a list of all Streams in a Service Instance. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Stream resources to read. + * @param optional nil or *ListSyncStreamOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSyncStreamResponse +*/ +func (c *DefaultApiService) ListSyncStream(ServiceSid string, params *ListSyncStreamParams) (*ListSyncStreamResponse, error) { + path := "/v1/Services/{ServiceSid}/Streams" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSyncStreamResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDocumentParams Optional parameters for the method 'UpdateDocument' +type UpdateDocumentParams struct { + IfMatch *string `json:"If-Match,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateDocument Method for UpdateDocument + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to update. + * @param Sid The SID of the Document resource to update. Can be the Document resource's `sid` or its `unique_name`. + * @param optional nil or *UpdateDocumentOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. + * @param "Ttl" (int32) - How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. +@return SyncV1ServiceDocument +*/ +func (c *DefaultApiService) UpdateDocument(ServiceSid string, Sid string, params *UpdateDocumentParams) (*SyncV1ServiceDocument, error) { + path := "/v1/Services/{ServiceSid}/Documents/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocument{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDocumentPermissionParams Optional parameters for the method 'UpdateDocumentPermission' +type UpdateDocumentPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateDocumentPermission Method for UpdateDocumentPermission +Update an identity's access to a specific Sync Document. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to update. + * @param DocumentSid The SID of the Sync Document with the Document Permission resource to update. Can be the Document resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Document Permission resource to update. + * @param optional nil or *UpdateDocumentPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Whether the identity can delete the Sync Document. Default value is `false`. + * @param "Read" (bool) - Whether the identity can read the Sync Document. Default value is `false`. + * @param "Write" (bool) - Whether the identity can update the Sync Document. Default value is `false`. +@return SyncV1ServiceDocumentDocumentPermission +*/ +func (c *DefaultApiService) UpdateDocumentPermission(ServiceSid string, DocumentSid string, Identity string, params *UpdateDocumentPermissionParams) (*SyncV1ServiceDocumentDocumentPermission, error) { + path := "/v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"DocumentSid"+"}", DocumentSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceDocumentDocumentPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + AclEnabled *bool `json:"AclEnabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReachabilityDebouncingEnabled *bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow *int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled *bool `json:"ReachabilityWebhooksEnabled,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled *bool `json:"WebhooksFromRestEnabled,omitempty"` +} + +/* +UpdateService Method for UpdateService + * @param Sid The SID of the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "AclEnabled" (bool) - Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. + * @param "FriendlyName" (string) - A string that you assign to describe the resource. + * @param "ReachabilityDebouncingEnabled" (bool) - Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. + * @param "ReachabilityDebouncingWindow" (int32) - The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called. + * @param "ReachabilityWebhooksEnabled" (bool) - Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. + * @param "WebhookUrl" (string) - The URL we should call when Sync objects are manipulated. + * @param "WebhooksFromRestEnabled" (bool) - Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. +@return SyncV1Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*SyncV1Service, error) { + path := "/v1/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AclEnabled != nil { + data.Set("AclEnabled", fmt.Sprint(*params.AclEnabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReachabilityDebouncingEnabled != nil { + data.Set("ReachabilityDebouncingEnabled", fmt.Sprint(*params.ReachabilityDebouncingEnabled)) + } + if params != nil && params.ReachabilityDebouncingWindow != nil { + data.Set("ReachabilityDebouncingWindow", fmt.Sprint(*params.ReachabilityDebouncingWindow)) + } + if params != nil && params.ReachabilityWebhooksEnabled != nil { + data.Set("ReachabilityWebhooksEnabled", fmt.Sprint(*params.ReachabilityWebhooksEnabled)) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + if params != nil && params.WebhooksFromRestEnabled != nil { + data.Set("WebhooksFromRestEnabled", fmt.Sprint(*params.WebhooksFromRestEnabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncListParams Optional parameters for the method 'UpdateSyncList' +type UpdateSyncListParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSyncList Method for UpdateSyncList + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to update. + * @param Sid The SID of the Sync List resource to update. Can be the Sync List resource's `sid` or its `unique_name`. + * @param optional nil or *UpdateSyncListOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `collection_ttl`. If both are provided, this value is ignored. +@return SyncV1ServiceSyncList +*/ +func (c *DefaultApiService) UpdateSyncList(ServiceSid string, Sid string, params *UpdateSyncListParams) (*SyncV1ServiceSyncList, error) { + path := "/v1/Services/{ServiceSid}/Lists/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncListItemParams Optional parameters for the method 'UpdateSyncListItem' +type UpdateSyncListItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSyncListItem Method for UpdateSyncListItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to update. + * @param ListSid The SID of the Sync List with the Sync List Item resource to update. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Index The index of the Sync List Item resource to update. + * @param optional nil or *UpdateSyncListItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "CollectionTtl" (int32) - How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. + * @param "ItemTtl" (int32) - How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. +@return SyncV1ServiceSyncListSyncListItem +*/ +func (c *DefaultApiService) UpdateSyncListItem(ServiceSid string, ListSid string, Index int32, params *UpdateSyncListItemParams) (*SyncV1ServiceSyncListSyncListItem, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Index"+"}", fmt.Sprint(Index), -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncListPermissionParams Optional parameters for the method 'UpdateSyncListPermission' +type UpdateSyncListPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateSyncListPermission Method for UpdateSyncListPermission +Update an identity's access to a specific Sync List. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to update. + * @param ListSid The SID of the Sync List with the Sync List Permission resource to update. Can be the Sync List resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync List Permission resource to update. + * @param optional nil or *UpdateSyncListPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Whether the identity can delete the Sync List. Default value is `false`. + * @param "Read" (bool) - Whether the identity can read the Sync List and its Items. Default value is `false`. + * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. +@return SyncV1ServiceSyncListSyncListPermission +*/ +func (c *DefaultApiService) UpdateSyncListPermission(ServiceSid string, ListSid string, Identity string, params *UpdateSyncListPermissionParams) (*SyncV1ServiceSyncListSyncListPermission, error) { + path := "/v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"ListSid"+"}", ListSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncListSyncListPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncMapParams Optional parameters for the method 'UpdateSyncMap' +type UpdateSyncMapParams struct { + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSyncMap Method for UpdateSyncMap + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to update. + * @param Sid The SID of the Sync Map resource to update. Can be the Sync Map's `sid` or its `unique_name`. + * @param optional nil or *UpdateSyncMapOpts - Optional Parameters: + * @param "CollectionTtl" (int32) - How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `collection_ttl`. If both parameters are provided, this value is ignored. +@return SyncV1ServiceSyncMap +*/ +func (c *DefaultApiService) UpdateSyncMap(ServiceSid string, Sid string, params *UpdateSyncMapParams) (*SyncV1ServiceSyncMap, error) { + path := "/v1/Services/{ServiceSid}/Maps/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMap{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncMapItemParams Optional parameters for the method 'UpdateSyncMapItem' +type UpdateSyncMapItemParams struct { + IfMatch *string `json:"If-Match,omitempty"` + CollectionTtl *int32 `json:"CollectionTtl,omitempty"` + Data *map[string]interface{} `json:"Data,omitempty"` + ItemTtl *int32 `json:"ItemTtl,omitempty"` + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSyncMapItem Method for UpdateSyncMapItem + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to update. + * @param MapSid The SID of the Sync Map with the Sync Map Item resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Key The `key` value of the Sync Map Item resource to update. + * @param optional nil or *UpdateSyncMapItemOpts - Optional Parameters: + * @param "IfMatch" (string) - The If-Match HTTP request header + * @param "CollectionTtl" (int32) - How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Data" (map[string]interface{}) - A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. + * @param "ItemTtl" (int32) - How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + * @param "Ttl" (int32) - An alias for `item_ttl`. If both parameters are provided, this value is ignored. +@return SyncV1ServiceSyncMapSyncMapItem +*/ +func (c *DefaultApiService) UpdateSyncMapItem(ServiceSid string, MapSid string, Key string, params *UpdateSyncMapItemParams) (*SyncV1ServiceSyncMapSyncMapItem, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Key"+"}", Key, -1) + + + data := url.Values{} + headers := make(map[string]interface{}) + + if params != nil && params.CollectionTtl != nil { + data.Set("CollectionTtl", fmt.Sprint(*params.CollectionTtl)) + } + if params != nil && params.Data != nil { + v, err := json.Marshal(params.Data) + + if err != nil { + return nil, err + } + + data.Set("Data", fmt.Sprint(v)) + } + if params != nil && params.ItemTtl != nil { + data.Set("ItemTtl", fmt.Sprint(*params.ItemTtl)) + } + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + if params != nil && params.IfMatch != nil { + headers["IfMatch"] = *params.IfMatch + } + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapItem{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncMapPermissionParams Optional parameters for the method 'UpdateSyncMapPermission' +type UpdateSyncMapPermissionParams struct { + Manage *bool `json:"Manage,omitempty"` + Read *bool `json:"Read,omitempty"` + Write *bool `json:"Write,omitempty"` +} + +/* +UpdateSyncMapPermission Method for UpdateSyncMapPermission +Update an identity's access to a specific Sync Map. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to update. Can be the Service's `sid` value or `default`. + * @param MapSid The SID of the Sync Map with the Sync Map Permission resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. + * @param Identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to update. + * @param optional nil or *UpdateSyncMapPermissionOpts - Optional Parameters: + * @param "Manage" (bool) - Whether the identity can delete the Sync Map. Default value is `false`. + * @param "Read" (bool) - Whether the identity can read the Sync Map and its Items. Default value is `false`. + * @param "Write" (bool) - Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. +@return SyncV1ServiceSyncMapSyncMapPermission +*/ +func (c *DefaultApiService) UpdateSyncMapPermission(ServiceSid string, MapSid string, Identity string, params *UpdateSyncMapPermissionParams) (*SyncV1ServiceSyncMapSyncMapPermission, error) { + path := "/v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"MapSid"+"}", MapSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Manage != nil { + data.Set("Manage", fmt.Sprint(*params.Manage)) + } + if params != nil && params.Read != nil { + data.Set("Read", fmt.Sprint(*params.Read)) + } + if params != nil && params.Write != nil { + data.Set("Write", fmt.Sprint(*params.Write)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncMapSyncMapPermission{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSyncStreamParams Optional parameters for the method 'UpdateSyncStream' +type UpdateSyncStreamParams struct { + Ttl *int32 `json:"Ttl,omitempty"` +} + +/* +UpdateSyncStream Method for UpdateSyncStream +Update a specific Stream. + * @param ServiceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to update. + * @param Sid The SID of the Stream resource to update. + * @param optional nil or *UpdateSyncStreamOpts - Optional Parameters: + * @param "Ttl" (int32) - How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. +@return SyncV1ServiceSyncStream +*/ +func (c *DefaultApiService) UpdateSyncStream(ServiceSid string, Sid string, params *UpdateSyncStreamParams) (*SyncV1ServiceSyncStream, error) { + path := "/v1/Services/{ServiceSid}/Streams/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Ttl != nil { + data.Set("Ttl", fmt.Sprint(*params.Ttl)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &SyncV1ServiceSyncStream{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/sync/v1/docs/CreateDocumentRequest.md b/rest/sync/v1/docs/CreateDocumentRequest.md new file mode 100644 index 000000000..4a9d530b3 --- /dev/null +++ b/rest/sync/v1/docs/CreateDocumentRequest.md @@ -0,0 +1,13 @@ +# CreateDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. | [optional] +**Ttl** | **int32** | How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the Sync Document | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateServiceRequest.md b/rest/sync/v1/docs/CreateServiceRequest.md new file mode 100644 index 000000000..2c80d4b02 --- /dev/null +++ b/rest/sync/v1/docs/CreateServiceRequest.md @@ -0,0 +1,17 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclEnabled** | **bool** | Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. | [optional] +**FriendlyName** | **string** | A string that you assign to describe the resource. | [optional] +**ReachabilityDebouncingEnabled** | **bool** | Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. | [optional] +**ReachabilityDebouncingWindow** | **int32** | The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`. | [optional] +**ReachabilityWebhooksEnabled** | **bool** | Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. | [optional] +**WebhookUrl** | **string** | The URL we should call when Sync objects are manipulated. | [optional] +**WebhooksFromRestEnabled** | **bool** | Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateStreamMessageRequest.md b/rest/sync/v1/docs/CreateStreamMessageRequest.md new file mode 100644 index 000000000..76571df60 --- /dev/null +++ b/rest/sync/v1/docs/CreateStreamMessageRequest.md @@ -0,0 +1,11 @@ +# CreateStreamMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateSyncListItemRequest.md b/rest/sync/v1/docs/CreateSyncListItemRequest.md new file mode 100644 index 000000000..39c525fa2 --- /dev/null +++ b/rest/sync/v1/docs/CreateSyncListItemRequest.md @@ -0,0 +1,14 @@ +# CreateSyncListItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. | +**ItemTtl** | **int32** | How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateSyncListRequest.md b/rest/sync/v1/docs/CreateSyncListRequest.md new file mode 100644 index 000000000..b16bf2338 --- /dev/null +++ b/rest/sync/v1/docs/CreateSyncListRequest.md @@ -0,0 +1,13 @@ +# CreateSyncListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | Alias for collection_ttl. If both are provided, this value is ignored. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateSyncMapItemRequest.md b/rest/sync/v1/docs/CreateSyncMapItemRequest.md new file mode 100644 index 000000000..34f94ee0d --- /dev/null +++ b/rest/sync/v1/docs/CreateSyncMapItemRequest.md @@ -0,0 +1,15 @@ +# CreateSyncMapItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. | +**ItemTtl** | **int32** | How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Key** | **string** | The unique, user-defined key for the Map Item. Can be up to 320 characters long. | +**Ttl** | **int32** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateSyncMapRequest.md b/rest/sync/v1/docs/CreateSyncMapRequest.md new file mode 100644 index 000000000..2d7d36eb1 --- /dev/null +++ b/rest/sync/v1/docs/CreateSyncMapRequest.md @@ -0,0 +1,13 @@ +# CreateSyncMapRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `collection_ttl`. If both parameters are provided, this value is ignored. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/CreateSyncStreamRequest.md b/rest/sync/v1/docs/CreateSyncStreamRequest.md new file mode 100644 index 000000000..e179165c6 --- /dev/null +++ b/rest/sync/v1/docs/CreateSyncStreamRequest.md @@ -0,0 +1,12 @@ +# CreateSyncStreamRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ttl** | **int32** | How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/DefaultApi.md b/rest/sync/v1/docs/DefaultApi.md new file mode 100644 index 000000000..70c7ca5db --- /dev/null +++ b/rest/sync/v1/docs/DefaultApi.md @@ -0,0 +1,2092 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDocument**](DefaultApi.md#CreateDocument) | **Post** /v1/Services/{ServiceSid}/Documents | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v1/Services | +[**CreateStreamMessage**](DefaultApi.md#CreateStreamMessage) | **Post** /v1/Services/{ServiceSid}/Streams/{StreamSid}/Messages | +[**CreateSyncList**](DefaultApi.md#CreateSyncList) | **Post** /v1/Services/{ServiceSid}/Lists | +[**CreateSyncListItem**](DefaultApi.md#CreateSyncListItem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | +[**CreateSyncMap**](DefaultApi.md#CreateSyncMap) | **Post** /v1/Services/{ServiceSid}/Maps | +[**CreateSyncMapItem**](DefaultApi.md#CreateSyncMapItem) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items | +[**CreateSyncStream**](DefaultApi.md#CreateSyncStream) | **Post** /v1/Services/{ServiceSid}/Streams | +[**DeleteDocument**](DefaultApi.md#DeleteDocument) | **Delete** /v1/Services/{ServiceSid}/Documents/{Sid} | +[**DeleteDocumentPermission**](DefaultApi.md#DeleteDocumentPermission) | **Delete** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | +[**DeleteSyncList**](DefaultApi.md#DeleteSyncList) | **Delete** /v1/Services/{ServiceSid}/Lists/{Sid} | +[**DeleteSyncListItem**](DefaultApi.md#DeleteSyncListItem) | **Delete** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**DeleteSyncListPermission**](DefaultApi.md#DeleteSyncListPermission) | **Delete** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**DeleteSyncMap**](DefaultApi.md#DeleteSyncMap) | **Delete** /v1/Services/{ServiceSid}/Maps/{Sid} | +[**DeleteSyncMapItem**](DefaultApi.md#DeleteSyncMapItem) | **Delete** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**DeleteSyncMapPermission**](DefaultApi.md#DeleteSyncMapPermission) | **Delete** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**DeleteSyncStream**](DefaultApi.md#DeleteSyncStream) | **Delete** /v1/Services/{ServiceSid}/Streams/{Sid} | +[**FetchDocument**](DefaultApi.md#FetchDocument) | **Get** /v1/Services/{ServiceSid}/Documents/{Sid} | +[**FetchDocumentPermission**](DefaultApi.md#FetchDocumentPermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v1/Services/{Sid} | +[**FetchSyncList**](DefaultApi.md#FetchSyncList) | **Get** /v1/Services/{ServiceSid}/Lists/{Sid} | +[**FetchSyncListItem**](DefaultApi.md#FetchSyncListItem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**FetchSyncListPermission**](DefaultApi.md#FetchSyncListPermission) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**FetchSyncMap**](DefaultApi.md#FetchSyncMap) | **Get** /v1/Services/{ServiceSid}/Maps/{Sid} | +[**FetchSyncMapItem**](DefaultApi.md#FetchSyncMapItem) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**FetchSyncMapPermission**](DefaultApi.md#FetchSyncMapPermission) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**FetchSyncStream**](DefaultApi.md#FetchSyncStream) | **Get** /v1/Services/{ServiceSid}/Streams/{Sid} | +[**ListDocument**](DefaultApi.md#ListDocument) | **Get** /v1/Services/{ServiceSid}/Documents | +[**ListDocumentPermission**](DefaultApi.md#ListDocumentPermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions | +[**ListService**](DefaultApi.md#ListService) | **Get** /v1/Services | +[**ListSyncList**](DefaultApi.md#ListSyncList) | **Get** /v1/Services/{ServiceSid}/Lists | +[**ListSyncListItem**](DefaultApi.md#ListSyncListItem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | +[**ListSyncListPermission**](DefaultApi.md#ListSyncListPermission) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions | +[**ListSyncMap**](DefaultApi.md#ListSyncMap) | **Get** /v1/Services/{ServiceSid}/Maps | +[**ListSyncMapItem**](DefaultApi.md#ListSyncMapItem) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items | +[**ListSyncMapPermission**](DefaultApi.md#ListSyncMapPermission) | **Get** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions | +[**ListSyncStream**](DefaultApi.md#ListSyncStream) | **Get** /v1/Services/{ServiceSid}/Streams | +[**UpdateDocument**](DefaultApi.md#UpdateDocument) | **Post** /v1/Services/{ServiceSid}/Documents/{Sid} | +[**UpdateDocumentPermission**](DefaultApi.md#UpdateDocumentPermission) | **Post** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v1/Services/{Sid} | +[**UpdateSyncList**](DefaultApi.md#UpdateSyncList) | **Post** /v1/Services/{ServiceSid}/Lists/{Sid} | +[**UpdateSyncListItem**](DefaultApi.md#UpdateSyncListItem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | +[**UpdateSyncListPermission**](DefaultApi.md#UpdateSyncListPermission) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Permissions/{Identity} | +[**UpdateSyncMap**](DefaultApi.md#UpdateSyncMap) | **Post** /v1/Services/{ServiceSid}/Maps/{Sid} | +[**UpdateSyncMapItem**](DefaultApi.md#UpdateSyncMapItem) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Items/{Key} | +[**UpdateSyncMapPermission**](DefaultApi.md#UpdateSyncMapPermission) | **Post** /v1/Services/{ServiceSid}/Maps/{MapSid}/Permissions/{Identity} | +[**UpdateSyncStream**](DefaultApi.md#UpdateSyncStream) | **Post** /v1/Services/{ServiceSid}/Streams/{Sid} | + + + +## CreateDocument + +> SyncV1ServiceDocument CreateDocument(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Document resource in. | + **optional** | ***CreateDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. | + **Ttl** | **optional.Int32**| How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the Sync Document | + +### Return type + +[**SyncV1ServiceDocument**](sync.v1.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> SyncV1Service CreateService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AclEnabled** | **optional.Bool**| Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. | + **FriendlyName** | **optional.String**| A string that you assign to describe the resource. | + **ReachabilityDebouncingEnabled** | **optional.Bool**| Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. | + **ReachabilityDebouncingWindow** | **optional.Int32**| The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`. | + **ReachabilityWebhooksEnabled** | **optional.Bool**| Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. | + **WebhookUrl** | **optional.String**| The URL we should call when Sync objects are manipulated. | + **WebhooksFromRestEnabled** | **optional.Bool**| Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. | + +### Return type + +[**SyncV1Service**](sync.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateStreamMessage + +> SyncV1ServiceSyncStreamStreamMessage CreateStreamMessage(ctx, ServiceSid, StreamSid, optional) + + + +Create a new Stream Message. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream Message in. | +**StreamSid** | **string**| The SID of the Sync Stream to create the new Stream Message resource for. | + **optional** | ***CreateStreamMessageOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateStreamMessageOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. | + +### Return type + +[**SyncV1ServiceSyncStreamStreamMessage**](sync.v1.service.sync_stream.stream_message.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncList + +> SyncV1ServiceSyncList CreateSyncList(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Sync List in. | + **optional** | ***CreateSyncListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| Alias for collection_ttl. If both are provided, this value is ignored. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncListItem + +> SyncV1ServiceSyncListSyncListItem CreateSyncListItem(ctx, ServiceSid, ListSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in. | +**ListSid** | **string**| The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`. | + **optional** | ***CreateSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. | + **ItemTtl** | **optional.Int32**| How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `item_ttl`. If both parameters are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncMap + +> SyncV1ServiceSyncMap CreateSyncMap(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Sync Map in. | + **optional** | ***CreateSyncMapOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncMapOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `collection_ttl`. If both parameters are provided, this value is ignored. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncMapItem + +> SyncV1ServiceSyncMapSyncMapItem CreateSyncMapItem(ctx, ServiceSid, MapSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Map Item in. | +**MapSid** | **string**| The SID of the Sync Map to add the new Map Item to. Can be the Sync Map resource's `sid` or its `unique_name`. | + **optional** | ***CreateSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. | + **ItemTtl** | **optional.Int32**| How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Key** | **optional.String**| The unique, user-defined key for the Map Item. Can be up to 320 characters long. | + **Ttl** | **optional.Int32**| An alias for `item_ttl`. If both parameters are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSyncStream + +> SyncV1ServiceSyncStream CreateSyncStream(ctx, ServiceSid, optional) + + + +Create a new Stream. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream in. | + **optional** | ***CreateSyncStreamOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSyncStreamOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Ttl** | **optional.Int32**| How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. | + +### Return type + +[**SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDocument + +> DeleteDocument(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to delete. | +**Sid** | **string**| The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`. | + **optional** | ***DeleteDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDocumentPermission + +> DeleteDocumentPermission(ctx, ServiceSid, DocumentSid, Identity) + + + +Delete a specific Sync Document Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete. | +**DocumentSid** | **string**| The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Document Permission resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncList + +> DeleteSyncList(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to delete. | +**Sid** | **string**| The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncListItem + +> DeleteSyncListItem(ctx, ServiceSid, ListSid, Index, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to delete. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Item resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. | +**Index** | **int32**| The index of the Sync List Item resource to delete. | + **optional** | ***DeleteSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncListPermission + +> DeleteSyncListPermission(ctx, ServiceSid, ListSid, Identity) + + + +Delete a specific Sync List Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync List Permission resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMap + +> DeleteSyncMap(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to delete. | +**Sid** | **string**| The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMapItem + +> DeleteSyncMapItem(ctx, ServiceSid, MapSid, Key, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to delete. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Item resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Key** | **string**| The `key` value of the Sync Map Item resource to delete. | + **optional** | ***DeleteSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a DeleteSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncMapPermission + +> DeleteSyncMapPermission(ctx, ServiceSid, MapSid, Identity) + + + +Delete a specific Sync Map Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSyncStream + +> DeleteSyncStream(ctx, ServiceSid, Sid) + + + +Delete a specific Stream. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to delete. | +**Sid** | **string**| The SID of the Stream resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDocument + +> SyncV1ServiceDocument FetchDocument(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to fetch. | +**Sid** | **string**| The SID of the Document resource to fetch. Can be the Document resource's `sid` or its `unique_name`. | + +### Return type + +[**SyncV1ServiceDocument**](sync.v1.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDocumentPermission + +> SyncV1ServiceDocumentDocumentPermission FetchDocumentPermission(ctx, ServiceSid, DocumentSid, Identity) + + + +Fetch a specific Sync Document Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to fetch. | +**DocumentSid** | **string**| The SID of the Sync Document with the Document Permission resource to fetch. Can be the Document resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Document Permission resource to fetch. | + +### Return type + +[**SyncV1ServiceDocumentDocumentPermission**](sync.v1.service.document.document_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> SyncV1Service FetchService(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to fetch. | + +### Return type + +[**SyncV1Service**](sync.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncList + +> SyncV1ServiceSyncList FetchSyncList(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to fetch. | +**Sid** | **string**| The SID of the Sync List resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. | + +### Return type + +[**SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncListItem + +> SyncV1ServiceSyncListSyncListItem FetchSyncListItem(ctx, ServiceSid, ListSid, Index) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to fetch. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Item resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. | +**Index** | **int32**| The index of the Sync List Item resource to fetch. | + +### Return type + +[**SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncListPermission + +> SyncV1ServiceSyncListSyncListPermission FetchSyncListPermission(ctx, ServiceSid, ListSid, Identity) + + + +Fetch a specific Sync List Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to fetch. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Permission resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch. | + +### Return type + +[**SyncV1ServiceSyncListSyncListPermission**](sync.v1.service.sync_list.sync_list_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMap + +> SyncV1ServiceSyncMap FetchSyncMap(ctx, ServiceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to fetch. | +**Sid** | **string**| The SID of the Sync Map resource to fetch. Can be the Sync Map's `sid` or its `unique_name`. | + +### Return type + +[**SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMapItem + +> SyncV1ServiceSyncMapSyncMapItem FetchSyncMapItem(ctx, ServiceSid, MapSid, Key) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to fetch. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Key** | **string**| The `key` value of the Sync Map Item resource to fetch. | + +### Return type + +[**SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncMapPermission + +> SyncV1ServiceSyncMapSyncMapPermission FetchSyncMapPermission(ctx, ServiceSid, MapSid, Identity) + + + +Fetch a specific Sync Map Permission. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to fetch. Can be the Service's `sid` value or `default`. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Permission resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch. | + +### Return type + +[**SyncV1ServiceSyncMapSyncMapPermission**](sync.v1.service.sync_map.sync_map_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSyncStream + +> SyncV1ServiceSyncStream FetchSyncStream(ctx, ServiceSid, Sid) + + + +Fetch a specific Stream. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to fetch. | +**Sid** | **string**| The SID of the Stream resource to fetch. | + +### Return type + +[**SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDocument + +> ListDocumentResponse ListDocument(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resources to read. | + **optional** | ***ListDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDocumentResponse**](ListDocumentResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDocumentPermission + +> ListDocumentPermissionResponse ListDocumentPermission(ctx, ServiceSid, DocumentSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resources to read. | +**DocumentSid** | **string**| The SID of the Sync Document with the Document Permission resources to read. Can be the Document resource's `sid` or its `unique_name`. | + **optional** | ***ListDocumentPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDocumentPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDocumentPermissionResponse**](ListDocumentPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncList + +> ListSyncListResponse ListSyncList(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resources to read. | + **optional** | ***ListSyncListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListResponse**](ListSyncListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncListItem + +> ListSyncListItemResponse ListSyncListItem(ctx, ServiceSid, ListSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the List Item resources to read. | +**ListSid** | **string**| The SID of the Sync List with the List Items to read. Can be the Sync List resource's `sid` or its `unique_name`. | + **optional** | ***ListSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. | + **From** | **optional.String**| The `index` of the first Sync List Item resource to read. See also `bounds`. | + **Bounds** | **optional.String**| Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListItemResponse**](ListSyncListItemResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncListPermission + +> ListSyncListPermissionResponse ListSyncListPermission(ctx, ServiceSid, ListSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync List. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resources to read. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Permission resources to read. Can be the Sync List resource's `sid` or its `unique_name`. | + **optional** | ***ListSyncListPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncListPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncListPermissionResponse**](ListSyncListPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMap + +> ListSyncMapResponse ListSyncMap(ctx, ServiceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resources to read. | + **optional** | ***ListSyncMapOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapResponse**](ListSyncMapResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMapItem + +> ListSyncMapItemResponse ListSyncMapItem(ctx, ServiceSid, MapSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Map Item resources to read. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Item resource to fetch. Can be the Sync Map resource's `sid` or its `unique_name`. | + **optional** | ***ListSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Order** | **optional.String**| How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key. | + **From** | **optional.String**| The `key` of the first Sync Map Item resource to read. See also `bounds`. | + **Bounds** | **optional.String**| Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapItemResponse**](ListSyncMapItemResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncMapPermission + +> ListSyncMapPermissionResponse ListSyncMapPermission(ctx, ServiceSid, MapSid, optional) + + + +Retrieve a list of all Permissions applying to a Sync Map. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resources to read. Can be the Service's `sid` value or `default`. | +**MapSid** | **string**| The SID of the Sync Map with the Permission resources to read. Can be the Sync Map resource's `sid` or its `unique_name`. | + **optional** | ***ListSyncMapPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncMapPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncMapPermissionResponse**](ListSyncMapPermissionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSyncStream + +> ListSyncStreamResponse ListSyncStream(ctx, ServiceSid, optional) + + + +Retrieve a list of all Streams in a Service Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Stream resources to read. | + **optional** | ***ListSyncStreamOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSyncStreamOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSyncStreamResponse**](ListSyncStreamResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDocument + +> SyncV1ServiceDocument UpdateDocument(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document resource to update. | +**Sid** | **string**| The SID of the Document resource to update. Can be the Document resource's `sid` or its `unique_name`. | + **optional** | ***UpdateDocumentOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDocumentOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. | + **Ttl** | **optional.Int32**| How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + +### Return type + +[**SyncV1ServiceDocument**](sync.v1.service.document.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDocumentPermission + +> SyncV1ServiceDocumentDocumentPermission UpdateDocumentPermission(ctx, ServiceSid, DocumentSid, Identity, optional) + + + +Update an identity's access to a specific Sync Document. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to update. | +**DocumentSid** | **string**| The SID of the Sync Document with the Document Permission resource to update. Can be the Document resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Document Permission resource to update. | + **optional** | ***UpdateDocumentPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDocumentPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Whether the identity can delete the Sync Document. Default value is `false`. | + **Read** | **optional.Bool**| Whether the identity can read the Sync Document. Default value is `false`. | + **Write** | **optional.Bool**| Whether the identity can update the Sync Document. Default value is `false`. | + +### Return type + +[**SyncV1ServiceDocumentDocumentPermission**](sync.v1.service.document.document_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> SyncV1Service UpdateService(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AclEnabled** | **optional.Bool**| Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. | + **FriendlyName** | **optional.String**| A string that you assign to describe the resource. | + **ReachabilityDebouncingEnabled** | **optional.Bool**| Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. | + **ReachabilityDebouncingWindow** | **optional.Int32**| The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called. | + **ReachabilityWebhooksEnabled** | **optional.Bool**| Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. | + **WebhookUrl** | **optional.String**| The URL we should call when Sync objects are manipulated. | + **WebhooksFromRestEnabled** | **optional.Bool**| Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. | + +### Return type + +[**SyncV1Service**](sync.v1.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncList + +> SyncV1ServiceSyncList UpdateSyncList(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List resource to update. | +**Sid** | **string**| The SID of the Sync List resource to update. Can be the Sync List resource's `sid` or its `unique_name`. | + **optional** | ***UpdateSyncListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `collection_ttl`. If both are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncListItem + +> SyncV1ServiceSyncListSyncListItem UpdateSyncListItem(ctx, ServiceSid, ListSid, Index, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to update. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Item resource to update. Can be the Sync List resource's `sid` or its `unique_name`. | +**Index** | **int32**| The index of the Sync List Item resource to update. | + **optional** | ***UpdateSyncListItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncListItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. | + **ItemTtl** | **optional.Int32**| How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `item_ttl`. If both parameters are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncListPermission + +> SyncV1ServiceSyncListSyncListPermission UpdateSyncListPermission(ctx, ServiceSid, ListSid, Identity, optional) + + + +Update an identity's access to a specific Sync List. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to update. | +**ListSid** | **string**| The SID of the Sync List with the Sync List Permission resource to update. Can be the Sync List resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync List Permission resource to update. | + **optional** | ***UpdateSyncListPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncListPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Whether the identity can delete the Sync List. Default value is `false`. | + **Read** | **optional.Bool**| Whether the identity can read the Sync List and its Items. Default value is `false`. | + **Write** | **optional.Bool**| Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. | + +### Return type + +[**SyncV1ServiceSyncListSyncListPermission**](sync.v1.service.sync_list.sync_list_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncMap + +> SyncV1ServiceSyncMap UpdateSyncMap(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map resource to update. | +**Sid** | **string**| The SID of the Sync Map resource to update. Can be the Sync Map's `sid` or its `unique_name`. | + **optional** | ***UpdateSyncMapOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncMapOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `collection_ttl`. If both parameters are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncMapItem + +> SyncV1ServiceSyncMapSyncMapItem UpdateSyncMapItem(ctx, ServiceSid, MapSid, Key, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Item resource to update. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Item resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Key** | **string**| The `key` value of the Sync Map Item resource to update. | + **optional** | ***UpdateSyncMapItemOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncMapItemOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **IfMatch** | **optional.String**| The If-Match HTTP request header | + **CollectionTtl** | **optional.Int32**| How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Data** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. | + **ItemTtl** | **optional.Int32**| How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + **Ttl** | **optional.Int32**| An alias for `item_ttl`. If both parameters are provided, this value is ignored. | + +### Return type + +[**SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncMapPermission + +> SyncV1ServiceSyncMapSyncMapPermission UpdateSyncMapPermission(ctx, ServiceSid, MapSid, Identity, optional) + + + +Update an identity's access to a specific Sync Map. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to update. Can be the Service's `sid` value or `default`. | +**MapSid** | **string**| The SID of the Sync Map with the Sync Map Permission resource to update. Can be the Sync Map resource's `sid` or its `unique_name`. | +**Identity** | **string**| The application-defined string that uniquely identifies the User's Sync Map Permission resource to update. | + **optional** | ***UpdateSyncMapPermissionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncMapPermissionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Manage** | **optional.Bool**| Whether the identity can delete the Sync Map. Default value is `false`. | + **Read** | **optional.Bool**| Whether the identity can read the Sync Map and its Items. Default value is `false`. | + **Write** | **optional.Bool**| Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. | + +### Return type + +[**SyncV1ServiceSyncMapSyncMapPermission**](sync.v1.service.sync_map.sync_map_permission.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSyncStream + +> SyncV1ServiceSyncStream UpdateSyncStream(ctx, ServiceSid, Sid, optional) + + + +Update a specific Stream. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Stream resource to update. | +**Sid** | **string**| The SID of the Stream resource to update. | + **optional** | ***UpdateSyncStreamOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSyncStreamOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Ttl** | **optional.Int32**| How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | + +### Return type + +[**SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/sync/v1/docs/ListDocumentPermissionResponse.md b/rest/sync/v1/docs/ListDocumentPermissionResponse.md new file mode 100644 index 000000000..fb1d06fa6 --- /dev/null +++ b/rest/sync/v1/docs/ListDocumentPermissionResponse.md @@ -0,0 +1,12 @@ +# ListDocumentPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Permissions** | [**[]SyncV1ServiceDocumentDocumentPermission**](sync.v1.service.document.document_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListDocumentResponse.md b/rest/sync/v1/docs/ListDocumentResponse.md new file mode 100644 index 000000000..34dbadb34 --- /dev/null +++ b/rest/sync/v1/docs/ListDocumentResponse.md @@ -0,0 +1,12 @@ +# ListDocumentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Documents** | [**[]SyncV1ServiceDocument**](sync.v1.service.document.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListServiceResponse.md b/rest/sync/v1/docs/ListServiceResponse.md new file mode 100644 index 000000000..4ec955b0e --- /dev/null +++ b/rest/sync/v1/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Services** | [**[]SyncV1Service**](sync.v1.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListServiceResponseMeta.md b/rest/sync/v1/docs/ListServiceResponseMeta.md new file mode 100644 index 000000000..010bc7d70 --- /dev/null +++ b/rest/sync/v1/docs/ListServiceResponseMeta.md @@ -0,0 +1,17 @@ +# ListServiceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncListItemResponse.md b/rest/sync/v1/docs/ListSyncListItemResponse.md new file mode 100644 index 000000000..a97d0a395 --- /dev/null +++ b/rest/sync/v1/docs/ListSyncListItemResponse.md @@ -0,0 +1,12 @@ +# ListSyncListItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SyncV1ServiceSyncListSyncListItem**](sync.v1.service.sync_list.sync_list_item.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncListPermissionResponse.md b/rest/sync/v1/docs/ListSyncListPermissionResponse.md new file mode 100644 index 000000000..b305d9f06 --- /dev/null +++ b/rest/sync/v1/docs/ListSyncListPermissionResponse.md @@ -0,0 +1,12 @@ +# ListSyncListPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Permissions** | [**[]SyncV1ServiceSyncListSyncListPermission**](sync.v1.service.sync_list.sync_list_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncListResponse.md b/rest/sync/v1/docs/ListSyncListResponse.md new file mode 100644 index 000000000..2953b1ede --- /dev/null +++ b/rest/sync/v1/docs/ListSyncListResponse.md @@ -0,0 +1,12 @@ +# ListSyncListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]SyncV1ServiceSyncList**](sync.v1.service.sync_list.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncMapItemResponse.md b/rest/sync/v1/docs/ListSyncMapItemResponse.md new file mode 100644 index 000000000..9a21a7605 --- /dev/null +++ b/rest/sync/v1/docs/ListSyncMapItemResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SyncV1ServiceSyncMapSyncMapItem**](sync.v1.service.sync_map.sync_map_item.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncMapPermissionResponse.md b/rest/sync/v1/docs/ListSyncMapPermissionResponse.md new file mode 100644 index 000000000..181a3f23d --- /dev/null +++ b/rest/sync/v1/docs/ListSyncMapPermissionResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapPermissionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Permissions** | [**[]SyncV1ServiceSyncMapSyncMapPermission**](sync.v1.service.sync_map.sync_map_permission.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncMapResponse.md b/rest/sync/v1/docs/ListSyncMapResponse.md new file mode 100644 index 000000000..003feb20d --- /dev/null +++ b/rest/sync/v1/docs/ListSyncMapResponse.md @@ -0,0 +1,12 @@ +# ListSyncMapResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Maps** | [**[]SyncV1ServiceSyncMap**](sync.v1.service.sync_map.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/ListSyncStreamResponse.md b/rest/sync/v1/docs/ListSyncStreamResponse.md new file mode 100644 index 000000000..fb7a0715b --- /dev/null +++ b/rest/sync/v1/docs/ListSyncStreamResponse.md @@ -0,0 +1,12 @@ +# ListSyncStreamResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Streams** | [**[]SyncV1ServiceSyncStream**](sync.v1.service.sync_stream.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1Service.md b/rest/sync/v1/docs/SyncV1Service.md new file mode 100644 index 000000000..766e16cae --- /dev/null +++ b/rest/sync/v1/docs/SyncV1Service.md @@ -0,0 +1,24 @@ +# SyncV1Service + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AclEnabled** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ReachabilityDebouncingEnabled** | **bool** | | [optional] +**ReachabilityDebouncingWindow** | **int32** | | [optional] +**ReachabilityWebhooksEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**WebhookUrl** | **string** | | [optional] +**WebhooksFromRestEnabled** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceDocument.md b/rest/sync/v1/docs/SyncV1ServiceDocument.md new file mode 100644 index 000000000..8bafa5cd2 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceDocument.md @@ -0,0 +1,22 @@ +# SyncV1ServiceDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md b/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md new file mode 100644 index 000000000..e23c370dd --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceDocumentDocumentPermission.md @@ -0,0 +1,18 @@ +# SyncV1ServiceDocumentDocumentPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DocumentSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncList.md b/rest/sync/v1/docs/SyncV1ServiceSyncList.md new file mode 100644 index 000000000..9dc88266e --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncList.md @@ -0,0 +1,21 @@ +# SyncV1ServiceSyncList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md b/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md new file mode 100644 index 000000000..27b8ecd7f --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListItem.md @@ -0,0 +1,21 @@ +# SyncV1ServiceSyncListSyncListItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Index** | **int32** | | [optional] +**ListSid** | **string** | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md b/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md new file mode 100644 index 000000000..346314607 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncListSyncListPermission.md @@ -0,0 +1,18 @@ +# SyncV1ServiceSyncListSyncListPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**ListSid** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncMap.md b/rest/sync/v1/docs/SyncV1ServiceSyncMap.md new file mode 100644 index 000000000..402607d52 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncMap.md @@ -0,0 +1,21 @@ +# SyncV1ServiceSyncMap + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md b/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md new file mode 100644 index 000000000..913b1300b --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapItem.md @@ -0,0 +1,21 @@ +# SyncV1ServiceSyncMapSyncMapItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Key** | **string** | | [optional] +**MapSid** | **string** | | [optional] +**Revision** | **string** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md b/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md new file mode 100644 index 000000000..39eb74db2 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncMapSyncMapPermission.md @@ -0,0 +1,18 @@ +# SyncV1ServiceSyncMapSyncMapPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Identity** | **string** | | [optional] +**Manage** | **bool** | | [optional] +**MapSid** | **string** | | [optional] +**Read** | **bool** | | [optional] +**ServiceSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Write** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncStream.md b/rest/sync/v1/docs/SyncV1ServiceSyncStream.md new file mode 100644 index 000000000..871d64901 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncStream.md @@ -0,0 +1,20 @@ +# SyncV1ServiceSyncStream + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CreatedBy** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateExpires** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ServiceSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md b/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md new file mode 100644 index 000000000..ce68e9693 --- /dev/null +++ b/rest/sync/v1/docs/SyncV1ServiceSyncStreamStreamMessage.md @@ -0,0 +1,12 @@ +# SyncV1ServiceSyncStreamStreamMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateDocumentPermissionRequest.md b/rest/sync/v1/docs/UpdateDocumentPermissionRequest.md new file mode 100644 index 000000000..e9f6fe159 --- /dev/null +++ b/rest/sync/v1/docs/UpdateDocumentPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateDocumentPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Whether the identity can delete the Sync Document. Default value is `false`. | +**Read** | **bool** | Whether the identity can read the Sync Document. Default value is `false`. | +**Write** | **bool** | Whether the identity can update the Sync Document. Default value is `false`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateDocumentRequest.md b/rest/sync/v1/docs/UpdateDocumentRequest.md new file mode 100644 index 000000000..6cd7b8246 --- /dev/null +++ b/rest/sync/v1/docs/UpdateDocumentRequest.md @@ -0,0 +1,12 @@ +# UpdateDocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. | [optional] +**Ttl** | **int32** | How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateServiceRequest.md b/rest/sync/v1/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..64731f0f0 --- /dev/null +++ b/rest/sync/v1/docs/UpdateServiceRequest.md @@ -0,0 +1,17 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclEnabled** | **bool** | Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. | [optional] +**FriendlyName** | **string** | A string that you assign to describe the resource. | [optional] +**ReachabilityDebouncingEnabled** | **bool** | Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. | [optional] +**ReachabilityDebouncingWindow** | **int32** | The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called. | [optional] +**ReachabilityWebhooksEnabled** | **bool** | Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. | [optional] +**WebhookUrl** | **string** | The URL we should call when Sync objects are manipulated. | [optional] +**WebhooksFromRestEnabled** | **bool** | Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncListItemRequest.md b/rest/sync/v1/docs/UpdateSyncListItemRequest.md new file mode 100644 index 000000000..e2718eff7 --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncListItemRequest.md @@ -0,0 +1,14 @@ +# UpdateSyncListItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. | [optional] +**ItemTtl** | **int32** | How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncListPermissionRequest.md b/rest/sync/v1/docs/UpdateSyncListPermissionRequest.md new file mode 100644 index 000000000..9cd7cf27a --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncListPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateSyncListPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Whether the identity can delete the Sync List. Default value is `false`. | +**Read** | **bool** | Whether the identity can read the Sync List and its Items. Default value is `false`. | +**Write** | **bool** | Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncListRequest.md b/rest/sync/v1/docs/UpdateSyncListRequest.md new file mode 100644 index 000000000..601226ace --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncListRequest.md @@ -0,0 +1,12 @@ +# UpdateSyncListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `collection_ttl`. If both are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncMapItemRequest.md b/rest/sync/v1/docs/UpdateSyncMapItemRequest.md new file mode 100644 index 000000000..8394134dd --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncMapItemRequest.md @@ -0,0 +1,14 @@ +# UpdateSyncMapItemRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Data** | [**map[string]interface{}**](.md) | A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. | [optional] +**ItemTtl** | **int32** | How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncMapPermissionRequest.md b/rest/sync/v1/docs/UpdateSyncMapPermissionRequest.md new file mode 100644 index 000000000..8ede52c01 --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncMapPermissionRequest.md @@ -0,0 +1,13 @@ +# UpdateSyncMapPermissionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Manage** | **bool** | Whether the identity can delete the Sync Map. Default value is `false`. | +**Read** | **bool** | Whether the identity can read the Sync Map and its Items. Default value is `false`. | +**Write** | **bool** | Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncMapRequest.md b/rest/sync/v1/docs/UpdateSyncMapRequest.md new file mode 100644 index 000000000..4463a0b7b --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncMapRequest.md @@ -0,0 +1,12 @@ +# UpdateSyncMapRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionTtl** | **int32** | How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] +**Ttl** | **int32** | An alias for `collection_ttl`. If both parameters are provided, this value is ignored. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/docs/UpdateSyncStreamRequest.md b/rest/sync/v1/docs/UpdateSyncStreamRequest.md new file mode 100644 index 000000000..431d333d8 --- /dev/null +++ b/rest/sync/v1/docs/UpdateSyncStreamRequest.md @@ -0,0 +1,11 @@ +# UpdateSyncStreamRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ttl** | **int32** | How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/sync/v1/model_create_document_request.go b/rest/sync/v1/model_create_document_request.go new file mode 100644 index 000000000..4c10942a0 --- /dev/null +++ b/rest/sync/v1/model_create_document_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDocumentRequest struct for CreateDocumentRequest +type CreateDocumentRequest struct { + // A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data,omitempty"` + // How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + Ttl int32 `json:"Ttl,omitempty"` + // An application-defined string that uniquely identifies the Sync Document + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/sync/v1/model_create_service_request.go b/rest/sync/v1/model_create_service_request.go new file mode 100644 index 000000000..a250dd45a --- /dev/null +++ b/rest/sync/v1/model_create_service_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. + AclEnabled bool `json:"AclEnabled,omitempty"` + // A string that you assign to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. + ReachabilityDebouncingEnabled bool `json:"ReachabilityDebouncingEnabled,omitempty"` + // The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`. + ReachabilityDebouncingWindow int32 `json:"ReachabilityDebouncingWindow,omitempty"` + // Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + // The URL we should call when Sync objects are manipulated. + WebhookUrl string `json:"WebhookUrl,omitempty"` + // Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. + WebhooksFromRestEnabled bool `json:"WebhooksFromRestEnabled,omitempty"` +} diff --git a/rest/sync/v1/model_create_stream_message_request.go b/rest/sync/v1/model_create_stream_message_request.go new file mode 100644 index 000000000..e4d53bc9f --- /dev/null +++ b/rest/sync/v1/model_create_stream_message_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateStreamMessageRequest struct for CreateStreamMessageRequest +type CreateStreamMessageRequest struct { + // A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length. + Data map[string]interface{} `json:"Data"` +} diff --git a/rest/sync/v1/model_create_sync_list_item_request.go b/rest/sync/v1/model_create_sync_list_item_request.go new file mode 100644 index 000000000..da996ad42 --- /dev/null +++ b/rest/sync/v1/model_create_sync_list_item_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncListItemRequest struct for CreateSyncListItemRequest +type CreateSyncListItemRequest struct { + // How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data"` + // How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + ItemTtl int32 `json:"ItemTtl,omitempty"` + // An alias for `item_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_create_sync_list_request.go b/rest/sync/v1/model_create_sync_list_request.go new file mode 100644 index 000000000..7acbf3886 --- /dev/null +++ b/rest/sync/v1/model_create_sync_list_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncListRequest struct for CreateSyncListRequest +type CreateSyncListRequest struct { + // How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // Alias for collection_ttl. If both are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` + // An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/sync/v1/model_create_sync_map_item_request.go b/rest/sync/v1/model_create_sync_map_item_request.go new file mode 100644 index 000000000..6d9280874 --- /dev/null +++ b/rest/sync/v1/model_create_sync_map_item_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncMapItemRequest struct for CreateSyncMapItemRequest +type CreateSyncMapItemRequest struct { + // How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data"` + // How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + ItemTtl int32 `json:"ItemTtl,omitempty"` + // The unique, user-defined key for the Map Item. Can be up to 320 characters long. + Key string `json:"Key"` + // An alias for `item_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_create_sync_map_request.go b/rest/sync/v1/model_create_sync_map_request.go new file mode 100644 index 000000000..4986ba7e3 --- /dev/null +++ b/rest/sync/v1/model_create_sync_map_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncMapRequest struct for CreateSyncMapRequest +type CreateSyncMapRequest struct { + // How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // An alias for `collection_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/sync/v1/model_create_sync_stream_request.go b/rest/sync/v1/model_create_sync_stream_request.go new file mode 100644 index 000000000..cb540a95f --- /dev/null +++ b/rest/sync/v1/model_create_sync_stream_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSyncStreamRequest struct for CreateSyncStreamRequest +type CreateSyncStreamRequest struct { + // How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + Ttl int32 `json:"Ttl,omitempty"` + // An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/sync/v1/model_list_document_permission_response.go b/rest/sync/v1/model_list_document_permission_response.go new file mode 100644 index 000000000..46ba58030 --- /dev/null +++ b/rest/sync/v1/model_list_document_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDocumentPermissionResponse struct for ListDocumentPermissionResponse +type ListDocumentPermissionResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Permissions []SyncV1ServiceDocumentDocumentPermission `json:"Permissions,omitempty"` +} diff --git a/rest/sync/v1/model_list_document_response.go b/rest/sync/v1/model_list_document_response.go new file mode 100644 index 000000000..7fe9c5e27 --- /dev/null +++ b/rest/sync/v1/model_list_document_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDocumentResponse struct for ListDocumentResponse +type ListDocumentResponse struct { + Documents []SyncV1ServiceDocument `json:"Documents,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/sync/v1/model_list_service_response.go b/rest/sync/v1/model_list_service_response.go new file mode 100644 index 000000000..3b83d9fc3 --- /dev/null +++ b/rest/sync/v1/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []SyncV1Service `json:"Services,omitempty"` +} diff --git a/rest/sync/v1/model_list_service_response_meta.go b/rest/sync/v1/model_list_service_response_meta.go new file mode 100644 index 000000000..191020c45 --- /dev/null +++ b/rest/sync/v1/model_list_service_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponseMeta struct for ListServiceResponseMeta +type ListServiceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_list_item_response.go b/rest/sync/v1/model_list_sync_list_item_response.go new file mode 100644 index 000000000..2f31c5009 --- /dev/null +++ b/rest/sync/v1/model_list_sync_list_item_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListItemResponse struct for ListSyncListItemResponse +type ListSyncListItemResponse struct { + Items []SyncV1ServiceSyncListSyncListItem `json:"Items,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_list_permission_response.go b/rest/sync/v1/model_list_sync_list_permission_response.go new file mode 100644 index 000000000..d7baf8867 --- /dev/null +++ b/rest/sync/v1/model_list_sync_list_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListPermissionResponse struct for ListSyncListPermissionResponse +type ListSyncListPermissionResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Permissions []SyncV1ServiceSyncListSyncListPermission `json:"Permissions,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_list_response.go b/rest/sync/v1/model_list_sync_list_response.go new file mode 100644 index 000000000..02a4d6a09 --- /dev/null +++ b/rest/sync/v1/model_list_sync_list_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncListResponse struct for ListSyncListResponse +type ListSyncListResponse struct { + Lists []SyncV1ServiceSyncList `json:"Lists,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_map_item_response.go b/rest/sync/v1/model_list_sync_map_item_response.go new file mode 100644 index 000000000..6fc576433 --- /dev/null +++ b/rest/sync/v1/model_list_sync_map_item_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapItemResponse struct for ListSyncMapItemResponse +type ListSyncMapItemResponse struct { + Items []SyncV1ServiceSyncMapSyncMapItem `json:"Items,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_map_permission_response.go b/rest/sync/v1/model_list_sync_map_permission_response.go new file mode 100644 index 000000000..240c61f87 --- /dev/null +++ b/rest/sync/v1/model_list_sync_map_permission_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapPermissionResponse struct for ListSyncMapPermissionResponse +type ListSyncMapPermissionResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Permissions []SyncV1ServiceSyncMapSyncMapPermission `json:"Permissions,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_map_response.go b/rest/sync/v1/model_list_sync_map_response.go new file mode 100644 index 000000000..665727b31 --- /dev/null +++ b/rest/sync/v1/model_list_sync_map_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncMapResponse struct for ListSyncMapResponse +type ListSyncMapResponse struct { + Maps []SyncV1ServiceSyncMap `json:"Maps,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/sync/v1/model_list_sync_stream_response.go b/rest/sync/v1/model_list_sync_stream_response.go new file mode 100644 index 000000000..4c0837ba6 --- /dev/null +++ b/rest/sync/v1/model_list_sync_stream_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSyncStreamResponse struct for ListSyncStreamResponse +type ListSyncStreamResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Streams []SyncV1ServiceSyncStream `json:"Streams,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service.go b/rest/sync/v1/model_sync_v1_service.go new file mode 100644 index 000000000..9f0dff27d --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service.go @@ -0,0 +1,31 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1Service struct for SyncV1Service +type SyncV1Service struct { + AccountSid string `json:"AccountSid,omitempty"` + AclEnabled bool `json:"AclEnabled,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ReachabilityDebouncingEnabled bool `json:"ReachabilityDebouncingEnabled,omitempty"` + ReachabilityDebouncingWindow int32 `json:"ReachabilityDebouncingWindow,omitempty"` + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` + WebhooksFromRestEnabled bool `json:"WebhooksFromRestEnabled,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_document.go b/rest/sync/v1/model_sync_v1_service_document.go new file mode 100644 index 000000000..784056ba9 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_document.go @@ -0,0 +1,29 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceDocument struct for SyncV1ServiceDocument +type SyncV1ServiceDocument struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_document_document_permission.go b/rest/sync/v1/model_sync_v1_service_document_document_permission.go new file mode 100644 index 000000000..d534f3430 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_document_document_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SyncV1ServiceDocumentDocumentPermission struct for SyncV1ServiceDocumentDocumentPermission +type SyncV1ServiceDocumentDocumentPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + DocumentSid string `json:"DocumentSid,omitempty"` + Identity string `json:"Identity,omitempty"` + Manage bool `json:"Manage,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_list.go b/rest/sync/v1/model_sync_v1_service_sync_list.go new file mode 100644 index 000000000..e53f2db49 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_list.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceSyncList struct for SyncV1ServiceSyncList +type SyncV1ServiceSyncList struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go b/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go new file mode 100644 index 000000000..1a513b933 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_item.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceSyncListSyncListItem struct for SyncV1ServiceSyncListSyncListItem +type SyncV1ServiceSyncListSyncListItem struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Index int32 `json:"Index,omitempty"` + ListSid string `json:"ListSid,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go b/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go new file mode 100644 index 000000000..18db7fe65 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_list_sync_list_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SyncV1ServiceSyncListSyncListPermission struct for SyncV1ServiceSyncListSyncListPermission +type SyncV1ServiceSyncListSyncListPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + Identity string `json:"Identity,omitempty"` + ListSid string `json:"ListSid,omitempty"` + Manage bool `json:"Manage,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_map.go b/rest/sync/v1/model_sync_v1_service_sync_map.go new file mode 100644 index 000000000..5f51f3d1a --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_map.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceSyncMap struct for SyncV1ServiceSyncMap +type SyncV1ServiceSyncMap struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go b/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go new file mode 100644 index 000000000..4c1b03641 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_item.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceSyncMapSyncMapItem struct for SyncV1ServiceSyncMapSyncMapItem +type SyncV1ServiceSyncMapSyncMapItem struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Key string `json:"Key,omitempty"` + MapSid string `json:"MapSid,omitempty"` + Revision string `json:"Revision,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go b/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go new file mode 100644 index 000000000..3e1ee9e5c --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_map_sync_map_permission.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SyncV1ServiceSyncMapSyncMapPermission struct for SyncV1ServiceSyncMapSyncMapPermission +type SyncV1ServiceSyncMapSyncMapPermission struct { + AccountSid string `json:"AccountSid,omitempty"` + Identity string `json:"Identity,omitempty"` + Manage bool `json:"Manage,omitempty"` + MapSid string `json:"MapSid,omitempty"` + Read bool `json:"Read,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` + Write bool `json:"Write,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_stream.go b/rest/sync/v1/model_sync_v1_service_sync_stream.go new file mode 100644 index 000000000..c55319a34 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_stream.go @@ -0,0 +1,27 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// SyncV1ServiceSyncStream struct for SyncV1ServiceSyncStream +type SyncV1ServiceSyncStream struct { + AccountSid string `json:"AccountSid,omitempty"` + CreatedBy string `json:"CreatedBy,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateExpires time.Time `json:"DateExpires,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go b/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go new file mode 100644 index 000000000..aaf40abb2 --- /dev/null +++ b/rest/sync/v1/model_sync_v1_service_sync_stream_stream_message.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// SyncV1ServiceSyncStreamStreamMessage struct for SyncV1ServiceSyncStreamStreamMessage +type SyncV1ServiceSyncStreamStreamMessage struct { + Data map[string]interface{} `json:"Data,omitempty"` + Sid string `json:"Sid,omitempty"` +} diff --git a/rest/sync/v1/model_update_document_permission_request.go b/rest/sync/v1/model_update_document_permission_request.go new file mode 100644 index 000000000..0e4b022a6 --- /dev/null +++ b/rest/sync/v1/model_update_document_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDocumentPermissionRequest struct for UpdateDocumentPermissionRequest +type UpdateDocumentPermissionRequest struct { + // Whether the identity can delete the Sync Document. Default value is `false`. + Manage bool `json:"Manage"` + // Whether the identity can read the Sync Document. Default value is `false`. + Read bool `json:"Read"` + // Whether the identity can update the Sync Document. Default value is `false`. + Write bool `json:"Write"` +} diff --git a/rest/sync/v1/model_update_document_request.go b/rest/sync/v1/model_update_document_request.go new file mode 100644 index 000000000..5fe3de51d --- /dev/null +++ b/rest/sync/v1/model_update_document_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDocumentRequest struct for UpdateDocumentRequest +type UpdateDocumentRequest struct { + // A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data,omitempty"` + // How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_update_service_request.go b/rest/sync/v1/model_update_service_request.go new file mode 100644 index 000000000..db46e897e --- /dev/null +++ b/rest/sync/v1/model_update_service_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. + AclEnabled bool `json:"AclEnabled,omitempty"` + // A string that you assign to describe the resource. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event. + ReachabilityDebouncingEnabled bool `json:"ReachabilityDebouncingEnabled,omitempty"` + // The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called. + ReachabilityDebouncingWindow int32 `json:"ReachabilityDebouncingWindow,omitempty"` + // Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. + ReachabilityWebhooksEnabled bool `json:"ReachabilityWebhooksEnabled,omitempty"` + // The URL we should call when Sync objects are manipulated. + WebhookUrl string `json:"WebhookUrl,omitempty"` + // Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. + WebhooksFromRestEnabled bool `json:"WebhooksFromRestEnabled,omitempty"` +} diff --git a/rest/sync/v1/model_update_sync_list_item_request.go b/rest/sync/v1/model_update_sync_list_item_request.go new file mode 100644 index 000000000..2de060f74 --- /dev/null +++ b/rest/sync/v1/model_update_sync_list_item_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncListItemRequest struct for UpdateSyncListItemRequest +type UpdateSyncListItemRequest struct { + // How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data,omitempty"` + // How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + ItemTtl int32 `json:"ItemTtl,omitempty"` + // An alias for `item_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_update_sync_list_permission_request.go b/rest/sync/v1/model_update_sync_list_permission_request.go new file mode 100644 index 000000000..29a78d98d --- /dev/null +++ b/rest/sync/v1/model_update_sync_list_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncListPermissionRequest struct for UpdateSyncListPermissionRequest +type UpdateSyncListPermissionRequest struct { + // Whether the identity can delete the Sync List. Default value is `false`. + Manage bool `json:"Manage"` + // Whether the identity can read the Sync List and its Items. Default value is `false`. + Read bool `json:"Read"` + // Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`. + Write bool `json:"Write"` +} diff --git a/rest/sync/v1/model_update_sync_list_request.go b/rest/sync/v1/model_update_sync_list_request.go new file mode 100644 index 000000000..9c6868586 --- /dev/null +++ b/rest/sync/v1/model_update_sync_list_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncListRequest struct for UpdateSyncListRequest +type UpdateSyncListRequest struct { + // How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // An alias for `collection_ttl`. If both are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_update_sync_map_item_request.go b/rest/sync/v1/model_update_sync_map_item_request.go new file mode 100644 index 000000000..300780e54 --- /dev/null +++ b/rest/sync/v1/model_update_sync_map_item_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncMapItemRequest struct for UpdateSyncMapItemRequest +type UpdateSyncMapItemRequest struct { + // How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length. + Data map[string]interface{} `json:"Data,omitempty"` + // How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + ItemTtl int32 `json:"ItemTtl,omitempty"` + // An alias for `item_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_update_sync_map_permission_request.go b/rest/sync/v1/model_update_sync_map_permission_request.go new file mode 100644 index 000000000..c62a21235 --- /dev/null +++ b/rest/sync/v1/model_update_sync_map_permission_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncMapPermissionRequest struct for UpdateSyncMapPermissionRequest +type UpdateSyncMapPermissionRequest struct { + // Whether the identity can delete the Sync Map. Default value is `false`. + Manage bool `json:"Manage"` + // Whether the identity can read the Sync Map and its Items. Default value is `false`. + Read bool `json:"Read"` + // Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`. + Write bool `json:"Write"` +} diff --git a/rest/sync/v1/model_update_sync_map_request.go b/rest/sync/v1/model_update_sync_map_request.go new file mode 100644 index 000000000..dc093a500 --- /dev/null +++ b/rest/sync/v1/model_update_sync_map_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncMapRequest struct for UpdateSyncMapRequest +type UpdateSyncMapRequest struct { + // How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + CollectionTtl int32 `json:"CollectionTtl,omitempty"` + // An alias for `collection_ttl`. If both parameters are provided, this value is ignored. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/model_update_sync_stream_request.go b/rest/sync/v1/model_update_sync_stream_request.go new file mode 100644 index 000000000..7f01a798b --- /dev/null +++ b/rest/sync/v1/model_update_sync_stream_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSyncStreamRequest struct for UpdateSyncStreamRequest +type UpdateSyncStreamRequest struct { + // How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion. + Ttl int32 `json:"Ttl,omitempty"` +} diff --git a/rest/sync/v1/response.go b/rest/sync/v1/response.go new file mode 100644 index 000000000..2d15958e7 --- /dev/null +++ b/rest/sync/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Sync + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/taskrouter/v1/.openapi-generator-ignore b/rest/taskrouter/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/taskrouter/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/taskrouter/v1/README.md b/rest/taskrouter/v1/README.md new file mode 100644 index 000000000..eff118016 --- /dev/null +++ b/rest/taskrouter/v1/README.md @@ -0,0 +1,177 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateActivity**](docs/DefaultApi.md#createactivity) | **Post** /v1/Workspaces/{WorkspaceSid}/Activities | +*DefaultApi* | [**CreateTask**](docs/DefaultApi.md#createtask) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks | +*DefaultApi* | [**CreateTaskChannel**](docs/DefaultApi.md#createtaskchannel) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskChannels | +*DefaultApi* | [**CreateTaskQueue**](docs/DefaultApi.md#createtaskqueue) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskQueues | +*DefaultApi* | [**CreateWorker**](docs/DefaultApi.md#createworker) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers | +*DefaultApi* | [**CreateWorkflow**](docs/DefaultApi.md#createworkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows | +*DefaultApi* | [**CreateWorkspace**](docs/DefaultApi.md#createworkspace) | **Post** /v1/Workspaces | +*DefaultApi* | [**DeleteActivity**](docs/DefaultApi.md#deleteactivity) | **Delete** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +*DefaultApi* | [**DeleteTask**](docs/DefaultApi.md#deletetask) | **Delete** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +*DefaultApi* | [**DeleteTaskChannel**](docs/DefaultApi.md#deletetaskchannel) | **Delete** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +*DefaultApi* | [**DeleteTaskQueue**](docs/DefaultApi.md#deletetaskqueue) | **Delete** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +*DefaultApi* | [**DeleteWorker**](docs/DefaultApi.md#deleteworker) | **Delete** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +*DefaultApi* | [**DeleteWorkflow**](docs/DefaultApi.md#deleteworkflow) | **Delete** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +*DefaultApi* | [**DeleteWorkspace**](docs/DefaultApi.md#deleteworkspace) | **Delete** /v1/Workspaces/{Sid} | +*DefaultApi* | [**FetchActivity**](docs/DefaultApi.md#fetchactivity) | **Get** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +*DefaultApi* | [**FetchEvent**](docs/DefaultApi.md#fetchevent) | **Get** /v1/Workspaces/{WorkspaceSid}/Events/{Sid} | +*DefaultApi* | [**FetchTask**](docs/DefaultApi.md#fetchtask) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +*DefaultApi* | [**FetchTaskChannel**](docs/DefaultApi.md#fetchtaskchannel) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +*DefaultApi* | [**FetchTaskQueue**](docs/DefaultApi.md#fetchtaskqueue) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +*DefaultApi* | [**FetchTaskQueueCumulativeStatistics**](docs/DefaultApi.md#fetchtaskqueuecumulativestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics | +*DefaultApi* | [**FetchTaskQueueRealTimeStatistics**](docs/DefaultApi.md#fetchtaskqueuerealtimestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics | +*DefaultApi* | [**FetchTaskQueueStatistics**](docs/DefaultApi.md#fetchtaskqueuestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics | +*DefaultApi* | [**FetchTaskReservation**](docs/DefaultApi.md#fetchtaskreservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid} | +*DefaultApi* | [**FetchWorker**](docs/DefaultApi.md#fetchworker) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +*DefaultApi* | [**FetchWorkerChannel**](docs/DefaultApi.md#fetchworkerchannel) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid} | +*DefaultApi* | [**FetchWorkerInstanceStatistics**](docs/DefaultApi.md#fetchworkerinstancestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics | +*DefaultApi* | [**FetchWorkerReservation**](docs/DefaultApi.md#fetchworkerreservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid} | +*DefaultApi* | [**FetchWorkerStatistics**](docs/DefaultApi.md#fetchworkerstatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/Statistics | +*DefaultApi* | [**FetchWorkersCumulativeStatistics**](docs/DefaultApi.md#fetchworkerscumulativestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics | +*DefaultApi* | [**FetchWorkersRealTimeStatistics**](docs/DefaultApi.md#fetchworkersrealtimestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics | +*DefaultApi* | [**FetchWorkflow**](docs/DefaultApi.md#fetchworkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +*DefaultApi* | [**FetchWorkflowCumulativeStatistics**](docs/DefaultApi.md#fetchworkflowcumulativestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics | +*DefaultApi* | [**FetchWorkflowRealTimeStatistics**](docs/DefaultApi.md#fetchworkflowrealtimestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics | +*DefaultApi* | [**FetchWorkflowStatistics**](docs/DefaultApi.md#fetchworkflowstatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics | +*DefaultApi* | [**FetchWorkspace**](docs/DefaultApi.md#fetchworkspace) | **Get** /v1/Workspaces/{Sid} | +*DefaultApi* | [**FetchWorkspaceCumulativeStatistics**](docs/DefaultApi.md#fetchworkspacecumulativestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/CumulativeStatistics | +*DefaultApi* | [**FetchWorkspaceRealTimeStatistics**](docs/DefaultApi.md#fetchworkspacerealtimestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/RealTimeStatistics | +*DefaultApi* | [**FetchWorkspaceStatistics**](docs/DefaultApi.md#fetchworkspacestatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Statistics | +*DefaultApi* | [**ListActivity**](docs/DefaultApi.md#listactivity) | **Get** /v1/Workspaces/{WorkspaceSid}/Activities | +*DefaultApi* | [**ListEvent**](docs/DefaultApi.md#listevent) | **Get** /v1/Workspaces/{WorkspaceSid}/Events | +*DefaultApi* | [**ListTask**](docs/DefaultApi.md#listtask) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks | +*DefaultApi* | [**ListTaskChannel**](docs/DefaultApi.md#listtaskchannel) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskChannels | +*DefaultApi* | [**ListTaskQueue**](docs/DefaultApi.md#listtaskqueue) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues | +*DefaultApi* | [**ListTaskQueuesStatistics**](docs/DefaultApi.md#listtaskqueuesstatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics | +*DefaultApi* | [**ListTaskReservation**](docs/DefaultApi.md#listtaskreservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations | +*DefaultApi* | [**ListWorker**](docs/DefaultApi.md#listworker) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers | +*DefaultApi* | [**ListWorkerChannel**](docs/DefaultApi.md#listworkerchannel) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels | +*DefaultApi* | [**ListWorkerReservation**](docs/DefaultApi.md#listworkerreservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations | +*DefaultApi* | [**ListWorkflow**](docs/DefaultApi.md#listworkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows | +*DefaultApi* | [**ListWorkspace**](docs/DefaultApi.md#listworkspace) | **Get** /v1/Workspaces | +*DefaultApi* | [**UpdateActivity**](docs/DefaultApi.md#updateactivity) | **Post** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +*DefaultApi* | [**UpdateTask**](docs/DefaultApi.md#updatetask) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +*DefaultApi* | [**UpdateTaskChannel**](docs/DefaultApi.md#updatetaskchannel) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +*DefaultApi* | [**UpdateTaskQueue**](docs/DefaultApi.md#updatetaskqueue) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +*DefaultApi* | [**UpdateTaskReservation**](docs/DefaultApi.md#updatetaskreservation) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid} | +*DefaultApi* | [**UpdateWorker**](docs/DefaultApi.md#updateworker) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +*DefaultApi* | [**UpdateWorkerChannel**](docs/DefaultApi.md#updateworkerchannel) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid} | +*DefaultApi* | [**UpdateWorkerReservation**](docs/DefaultApi.md#updateworkerreservation) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid} | +*DefaultApi* | [**UpdateWorkflow**](docs/DefaultApi.md#updateworkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +*DefaultApi* | [**UpdateWorkspace**](docs/DefaultApi.md#updateworkspace) | **Post** /v1/Workspaces/{Sid} | + + +## Documentation For Models + + - [CreateActivityRequest](docs/CreateActivityRequest.md) + - [CreateTaskChannelRequest](docs/CreateTaskChannelRequest.md) + - [CreateTaskQueueRequest](docs/CreateTaskQueueRequest.md) + - [CreateTaskRequest](docs/CreateTaskRequest.md) + - [CreateWorkerRequest](docs/CreateWorkerRequest.md) + - [CreateWorkflowRequest](docs/CreateWorkflowRequest.md) + - [CreateWorkspaceRequest](docs/CreateWorkspaceRequest.md) + - [ListActivityResponse](docs/ListActivityResponse.md) + - [ListEventResponse](docs/ListEventResponse.md) + - [ListTaskChannelResponse](docs/ListTaskChannelResponse.md) + - [ListTaskQueueResponse](docs/ListTaskQueueResponse.md) + - [ListTaskQueuesStatisticsResponse](docs/ListTaskQueuesStatisticsResponse.md) + - [ListTaskReservationResponse](docs/ListTaskReservationResponse.md) + - [ListTaskResponse](docs/ListTaskResponse.md) + - [ListWorkerChannelResponse](docs/ListWorkerChannelResponse.md) + - [ListWorkerReservationResponse](docs/ListWorkerReservationResponse.md) + - [ListWorkerResponse](docs/ListWorkerResponse.md) + - [ListWorkflowResponse](docs/ListWorkflowResponse.md) + - [ListWorkspaceResponse](docs/ListWorkspaceResponse.md) + - [ListWorkspaceResponseMeta](docs/ListWorkspaceResponseMeta.md) + - [TaskrouterV1Workspace](docs/TaskrouterV1Workspace.md) + - [TaskrouterV1WorkspaceActivity](docs/TaskrouterV1WorkspaceActivity.md) + - [TaskrouterV1WorkspaceEvent](docs/TaskrouterV1WorkspaceEvent.md) + - [TaskrouterV1WorkspaceTask](docs/TaskrouterV1WorkspaceTask.md) + - [TaskrouterV1WorkspaceTaskChannel](docs/TaskrouterV1WorkspaceTaskChannel.md) + - [TaskrouterV1WorkspaceTaskQueue](docs/TaskrouterV1WorkspaceTaskQueue.md) + - [TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics](docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md) + - [TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics](docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md) + - [TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics](docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md) + - [TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics](docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md) + - [TaskrouterV1WorkspaceTaskTaskReservation](docs/TaskrouterV1WorkspaceTaskTaskReservation.md) + - [TaskrouterV1WorkspaceWorker](docs/TaskrouterV1WorkspaceWorker.md) + - [TaskrouterV1WorkspaceWorkerWorkerChannel](docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md) + - [TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics](docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md) + - [TaskrouterV1WorkspaceWorkerWorkerReservation](docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md) + - [TaskrouterV1WorkspaceWorkerWorkerStatistics](docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md) + - [TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics](docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md) + - [TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics](docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md) + - [TaskrouterV1WorkspaceWorkflow](docs/TaskrouterV1WorkspaceWorkflow.md) + - [TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics](docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md) + - [TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics](docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md) + - [TaskrouterV1WorkspaceWorkflowWorkflowStatistics](docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md) + - [TaskrouterV1WorkspaceWorkspaceCumulativeStatistics](docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md) + - [TaskrouterV1WorkspaceWorkspaceRealTimeStatistics](docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md) + - [TaskrouterV1WorkspaceWorkspaceStatistics](docs/TaskrouterV1WorkspaceWorkspaceStatistics.md) + - [UpdateActivityRequest](docs/UpdateActivityRequest.md) + - [UpdateTaskChannelRequest](docs/UpdateTaskChannelRequest.md) + - [UpdateTaskQueueRequest](docs/UpdateTaskQueueRequest.md) + - [UpdateTaskRequest](docs/UpdateTaskRequest.md) + - [UpdateTaskReservationRequest](docs/UpdateTaskReservationRequest.md) + - [UpdateWorkerChannelRequest](docs/UpdateWorkerChannelRequest.md) + - [UpdateWorkerRequest](docs/UpdateWorkerRequest.md) + - [UpdateWorkerReservationRequest](docs/UpdateWorkerReservationRequest.md) + - [UpdateWorkflowRequest](docs/UpdateWorkflowRequest.md) + - [UpdateWorkspaceRequest](docs/UpdateWorkspaceRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/taskrouter/v1/api_default.go b/rest/taskrouter/v1/api_default.go new file mode 100644 index 000000000..c4b82b09a --- /dev/null +++ b/rest/taskrouter/v1/api_default.go @@ -0,0 +1,3386 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://taskrouter.twilio.com"), + } +} +// CreateActivityParams Optional parameters for the method 'CreateActivity' +type CreateActivityParams struct { + Available *bool `json:"Available,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateActivity Method for CreateActivity + * @param WorkspaceSid The SID of the Workspace that the new Activity belongs to. + * @param optional nil or *CreateActivityOpts - Optional Parameters: + * @param "Available" (bool) - Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. +@return TaskrouterV1WorkspaceActivity +*/ +func (c *DefaultApiService) CreateActivity(WorkspaceSid string, params *CreateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTaskParams Optional parameters for the method 'CreateTask' +type CreateTaskParams struct { + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` +} + +/* +CreateTask Method for CreateTask + * @param WorkspaceSid The SID of the Workspace that the new Task belongs to. + * @param optional nil or *CreateTaskOpts - Optional Parameters: + * @param "Attributes" (string) - A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`. + * @param "Priority" (int32) - The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647). + * @param "TaskChannel" (string) - When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`. + * @param "Timeout" (int32) - The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. + * @param "WorkflowSid" (string) - The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. +@return TaskrouterV1WorkspaceTask +*/ +func (c *DefaultApiService) CreateTask(WorkspaceSid string, params *CreateTaskParams) (*TaskrouterV1WorkspaceTask, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTaskChannelParams Optional parameters for the method 'CreateTaskChannel' +type CreateTaskChannelParams struct { + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateTaskChannel Method for CreateTaskChannel + * @param WorkspaceSid The SID of the Workspace that the new Task Channel belongs to. + * @param optional nil or *CreateTaskChannelOpts - Optional Parameters: + * @param "ChannelOptimizedRouting" (bool) - Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. +@return TaskrouterV1WorkspaceTaskChannel +*/ +func (c *DefaultApiService) CreateTaskChannel(WorkspaceSid string, params *CreateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTaskQueueParams Optional parameters for the method 'CreateTaskQueue' +type CreateTaskQueueParams struct { + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` +} + +/* +CreateTaskQueue Method for CreateTaskQueue + * @param WorkspaceSid The SID of the Workspace that the new TaskQueue belongs to. + * @param optional nil or *CreateTaskQueueOpts - Optional Parameters: + * @param "AssignmentActivitySid" (string) - The SID of the Activity to assign Workers when a task is assigned to them. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. + * @param "MaxReservedWorkers" (int32) - The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. + * @param "ReservationActivitySid" (string) - The SID of the Activity to assign Workers when a task is reserved for them. + * @param "TargetWorkers" (string) - A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). + * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. +@return TaskrouterV1WorkspaceTaskQueue +*/ +func (c *DefaultApiService) CreateTaskQueue(WorkspaceSid string, params *CreateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) + } + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) + } + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) + } + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWorkerParams Optional parameters for the method 'CreateWorker' +type CreateWorkerParams struct { + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateWorker Method for CreateWorker + * @param WorkspaceSid The SID of the Workspace that the new Worker belongs to. + * @param optional nil or *CreateWorkerOpts - Optional Parameters: + * @param "ActivitySid" (string) - The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace. + * @param "Attributes" (string) - A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. +@return TaskrouterV1WorkspaceWorker +*/ +func (c *DefaultApiService) CreateWorker(WorkspaceSid string, params *CreateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWorkflowParams Optional parameters for the method 'CreateWorkflow' +type CreateWorkflowParams struct { + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` + FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` +} + +/* +CreateWorkflow Method for CreateWorkflow + * @param WorkspaceSid The SID of the Workspace that the new Workflow to create belongs to. + * @param optional nil or *CreateWorkflowOpts - Optional Parameters: + * @param "AssignmentCallbackUrl" (string) - The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. + * @param "Configuration" (string) - A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. + * @param "FallbackAssignmentCallbackUrl" (string) - The URL that we should call when a call to the `assignment_callback_url` fails. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. + * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. +@return TaskrouterV1WorkspaceWorkflow +*/ +func (c *DefaultApiService) CreateWorkflow(WorkspaceSid string, params *CreateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) + } + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) + } + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWorkspaceParams Optional parameters for the method 'CreateWorkspace' +type CreateWorkspaceParams struct { + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` + Template *string `json:"Template,omitempty"` +} + +/* +CreateWorkspace Method for CreateWorkspace + * @param optional nil or *CreateWorkspaceOpts - Optional Parameters: + * @param "EventCallbackUrl" (string) - The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. + * @param "EventsFilter" (string) - The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`. + * @param "MultiTaskEnabled" (bool) - Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. + * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. + * @param "Template" (string) - An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. +@return TaskrouterV1Workspace +*/ +func (c *DefaultApiService) CreateWorkspace(params *CreateWorkspaceParams) (*TaskrouterV1Workspace, error) { + path := "/v1/Workspaces" + + + data := url.Values{} + headers := 0 + + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) + } + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) + } + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) + } + if params != nil && params.Template != nil { + data.Set("Template", *params.Template) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteActivity Method for DeleteActivity + * @param WorkspaceSid The SID of the Workspace with the Activity resources to delete. + * @param Sid The SID of the Activity resource to delete. +*/ +func (c *DefaultApiService) DeleteActivity(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTask Method for DeleteTask + * @param WorkspaceSid The SID of the Workspace with the Task to delete. + * @param Sid The SID of the Task resource to delete. +*/ +func (c *DefaultApiService) DeleteTask(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTaskChannel Method for DeleteTaskChannel + * @param WorkspaceSid The SID of the Workspace with the Task Channel to delete. + * @param Sid The SID of the Task Channel resource to delete. +*/ +func (c *DefaultApiService) DeleteTaskChannel(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTaskQueue Method for DeleteTaskQueue + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to delete. + * @param Sid The SID of the TaskQueue resource to delete. +*/ +func (c *DefaultApiService) DeleteTaskQueue(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWorker Method for DeleteWorker + * @param WorkspaceSid The SID of the Workspace with the Worker to delete. + * @param Sid The SID of the Worker resource to delete. +*/ +func (c *DefaultApiService) DeleteWorker(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWorkflow Method for DeleteWorkflow + * @param WorkspaceSid The SID of the Workspace with the Workflow to delete. + * @param Sid The SID of the Workflow resource to delete. +*/ +func (c *DefaultApiService) DeleteWorkflow(WorkspaceSid string, Sid string) (error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWorkspace Method for DeleteWorkspace + * @param Sid The SID of the Workspace resource to delete. +*/ +func (c *DefaultApiService) DeleteWorkspace(Sid string) (error) { + path := "/v1/Workspaces/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchActivity Method for FetchActivity + * @param WorkspaceSid The SID of the Workspace with the Activity resources to fetch. + * @param Sid The SID of the Activity resource to fetch. +@return TaskrouterV1WorkspaceActivity +*/ +func (c *DefaultApiService) FetchActivity(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceActivity, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEvent Method for FetchEvent + * @param WorkspaceSid The SID of the Workspace with the Event to fetch. + * @param Sid The SID of the Event resource to fetch. +@return TaskrouterV1WorkspaceEvent +*/ +func (c *DefaultApiService) FetchEvent(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceEvent, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Events/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceEvent{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTask Method for FetchTask + * @param WorkspaceSid The SID of the Workspace with the Task to fetch. + * @param Sid The SID of the Task resource to fetch. +@return TaskrouterV1WorkspaceTask +*/ +func (c *DefaultApiService) FetchTask(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTask, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskChannel Method for FetchTaskChannel + * @param WorkspaceSid The SID of the Workspace with the Task Channel to fetch. + * @param Sid The SID of the Task Channel resource to fetch. +@return TaskrouterV1WorkspaceTaskChannel +*/ +func (c *DefaultApiService) FetchTaskChannel(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskQueue Method for FetchTaskQueue + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. + * @param Sid The SID of the TaskQueue resource to fetch. +@return TaskrouterV1WorkspaceTaskQueue +*/ +func (c *DefaultApiService) FetchTaskQueue(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceTaskQueue, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchTaskQueueCumulativeStatisticsParams Optional parameters for the method 'FetchTaskQueueCumulativeStatistics' +type FetchTaskQueueCumulativeStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchTaskQueueCumulativeStatistics Method for FetchTaskQueueCumulativeStatistics + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. + * @param TaskQueueSid The SID of the TaskQueue for which to fetch statistics. + * @param optional nil or *FetchTaskQueueCumulativeStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default is 15 minutes. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. +@return TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics +*/ +func (c *DefaultApiService) FetchTaskQueueCumulativeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueCumulativeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchTaskQueueRealTimeStatisticsParams Optional parameters for the method 'FetchTaskQueueRealTimeStatistics' +type FetchTaskQueueRealTimeStatisticsParams struct { + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchTaskQueueRealTimeStatistics Method for FetchTaskQueueRealTimeStatistics + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. + * @param TaskQueueSid The SID of the TaskQueue for which to fetch statistics. + * @param optional nil or *FetchTaskQueueRealTimeStatisticsOpts - Optional Parameters: + * @param "TaskChannel" (string) - The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics +*/ +func (c *DefaultApiService) FetchTaskQueueRealTimeStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueRealTimeStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchTaskQueueStatisticsParams Optional parameters for the method 'FetchTaskQueueStatistics' +type FetchTaskQueueStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchTaskQueueStatistics Method for FetchTaskQueueStatistics + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to fetch. + * @param TaskQueueSid The SID of the TaskQueue for which to fetch statistics. + * @param optional nil or *FetchTaskQueueStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default is 15 minutes. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. +@return TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics +*/ +func (c *DefaultApiService) FetchTaskQueueStatistics(WorkspaceSid string, TaskQueueSid string, params *FetchTaskQueueStatisticsParams) (*TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskQueueSid"+"}", TaskQueueSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTaskReservation Method for FetchTaskReservation + * @param WorkspaceSid The SID of the Workspace with the TaskReservation resource to fetch. + * @param TaskSid The SID of the reserved Task resource with the TaskReservation resource to fetch. + * @param Sid The SID of the TaskReservation resource to fetch. +@return TaskrouterV1WorkspaceTaskTaskReservation +*/ +func (c *DefaultApiService) FetchTaskReservation(WorkspaceSid string, TaskSid string, Sid string) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWorker Method for FetchWorker + * @param WorkspaceSid The SID of the Workspace with the Worker to fetch. + * @param Sid The SID of the Worker resource to fetch. +@return TaskrouterV1WorkspaceWorker +*/ +func (c *DefaultApiService) FetchWorker(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorker, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWorkerChannel Method for FetchWorkerChannel + * @param WorkspaceSid The SID of the Workspace with the WorkerChannel to fetch. + * @param WorkerSid The SID of the Worker with the WorkerChannel to fetch. + * @param Sid The SID of the WorkerChannel to fetch. +@return TaskrouterV1WorkspaceWorkerWorkerChannel +*/ +func (c *DefaultApiService) FetchWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkerInstanceStatisticsParams Optional parameters for the method 'FetchWorkerInstanceStatistics' +type FetchWorkerInstanceStatisticsParams struct { + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkerInstanceStatistics Method for FetchWorkerInstanceStatistics + * @param WorkspaceSid The SID of the Workspace with the WorkerChannel to fetch. + * @param WorkerSid The SID of the Worker with the WorkerChannel to fetch. + * @param optional nil or *FetchWorkerInstanceStatisticsOpts - Optional Parameters: + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics +*/ +func (c *DefaultApiService) FetchWorkerInstanceStatistics(WorkspaceSid string, WorkerSid string, params *FetchWorkerInstanceStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWorkerReservation Method for FetchWorkerReservation + * @param WorkspaceSid The SID of the Workspace with the WorkerReservation resource to fetch. + * @param WorkerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch. + * @param Sid The SID of the WorkerReservation resource to fetch. +@return TaskrouterV1WorkspaceWorkerWorkerReservation +*/ +func (c *DefaultApiService) FetchWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkerStatisticsParams Optional parameters for the method 'FetchWorkerStatistics' +type FetchWorkerStatisticsParams struct { + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkerStatistics Method for FetchWorkerStatistics + * @param WorkspaceSid The SID of the Workspace with the Worker to fetch. + * @param optional nil or *FetchWorkerStatisticsOpts - Optional Parameters: + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "TaskQueueSid" (string) - The SID of the TaskQueue for which to fetch Worker statistics. + * @param "TaskQueueName" (string) - The `friendly_name` of the TaskQueue for which to fetch Worker statistics. + * @param "FriendlyName" (string) - Only include Workers with `friendly_name` values that match this parameter. + * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkerWorkerStatistics +*/ +func (c *DefaultApiService) FetchWorkerStatistics(WorkspaceSid string, params *FetchWorkerStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkerStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkersCumulativeStatisticsParams Optional parameters for the method 'FetchWorkersCumulativeStatistics' +type FetchWorkersCumulativeStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkersCumulativeStatistics Method for FetchWorkersCumulativeStatistics + * @param WorkspaceSid The SID of the Workspace with the resource to fetch. + * @param optional nil or *FetchWorkersCumulativeStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics +*/ +func (c *DefaultApiService) FetchWorkersCumulativeStatistics(WorkspaceSid string, params *FetchWorkersCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkersRealTimeStatisticsParams Optional parameters for the method 'FetchWorkersRealTimeStatistics' +type FetchWorkersRealTimeStatisticsParams struct { + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkersRealTimeStatistics Method for FetchWorkersRealTimeStatistics + * @param WorkspaceSid The SID of the Workspace with the resource to fetch. + * @param optional nil or *FetchWorkersRealTimeStatisticsOpts - Optional Parameters: + * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics +*/ +func (c *DefaultApiService) FetchWorkersRealTimeStatistics(WorkspaceSid string, params *FetchWorkersRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWorkflow Method for FetchWorkflow + * @param WorkspaceSid The SID of the Workspace with the Workflow to fetch. + * @param Sid The SID of the Workflow resource to fetch. +@return TaskrouterV1WorkspaceWorkflow +*/ +func (c *DefaultApiService) FetchWorkflow(WorkspaceSid string, Sid string) (*TaskrouterV1WorkspaceWorkflow, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkflowCumulativeStatisticsParams Optional parameters for the method 'FetchWorkflowCumulativeStatistics' +type FetchWorkflowCumulativeStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchWorkflowCumulativeStatistics Method for FetchWorkflowCumulativeStatistics + * @param WorkspaceSid The SID of the Workspace with the resource to fetch. + * @param WorkflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value. + * @param optional nil or *FetchWorkflowCumulativeStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. +@return TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics +*/ +func (c *DefaultApiService) FetchWorkflowCumulativeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkflowRealTimeStatisticsParams Optional parameters for the method 'FetchWorkflowRealTimeStatistics' +type FetchWorkflowRealTimeStatisticsParams struct { + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkflowRealTimeStatistics Method for FetchWorkflowRealTimeStatistics + * @param WorkspaceSid The SID of the Workspace with the Workflow to fetch. + * @param WorkflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value. + * @param optional nil or *FetchWorkflowRealTimeStatisticsOpts - Optional Parameters: + * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics +*/ +func (c *DefaultApiService) FetchWorkflowRealTimeStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkflowStatisticsParams Optional parameters for the method 'FetchWorkflowStatistics' +type FetchWorkflowStatisticsParams struct { + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchWorkflowStatistics Method for FetchWorkflowStatistics + * @param WorkspaceSid The SID of the Workspace with the Workflow to fetch. + * @param WorkflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value. + * @param optional nil or *FetchWorkflowStatisticsOpts - Optional Parameters: + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. +@return TaskrouterV1WorkspaceWorkflowWorkflowStatistics +*/ +func (c *DefaultApiService) FetchWorkflowStatistics(WorkspaceSid string, WorkflowSid string, params *FetchWorkflowStatisticsParams) (*TaskrouterV1WorkspaceWorkflowWorkflowStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkflowSid"+"}", WorkflowSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflowWorkflowStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWorkspace Method for FetchWorkspace + * @param Sid The SID of the Workspace resource to fetch. +@return TaskrouterV1Workspace +*/ +func (c *DefaultApiService) FetchWorkspace(Sid string) (*TaskrouterV1Workspace, error) { + path := "/v1/Workspaces/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkspaceCumulativeStatisticsParams Optional parameters for the method 'FetchWorkspaceCumulativeStatistics' +type FetchWorkspaceCumulativeStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchWorkspaceCumulativeStatistics Method for FetchWorkspaceCumulativeStatistics + * @param WorkspaceSid The SID of the Workspace to fetch. + * @param optional nil or *FetchWorkspaceCumulativeStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. +@return TaskrouterV1WorkspaceWorkspaceCumulativeStatistics +*/ +func (c *DefaultApiService) FetchWorkspaceCumulativeStatistics(WorkspaceSid string, params *FetchWorkspaceCumulativeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceCumulativeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkspaceCumulativeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkspaceRealTimeStatisticsParams Optional parameters for the method 'FetchWorkspaceRealTimeStatistics' +type FetchWorkspaceRealTimeStatisticsParams struct { + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +FetchWorkspaceRealTimeStatistics Method for FetchWorkspaceRealTimeStatistics + * @param WorkspaceSid The SID of the Workspace to fetch. + * @param optional nil or *FetchWorkspaceRealTimeStatisticsOpts - Optional Parameters: + * @param "TaskChannel" (string) - Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceWorkspaceRealTimeStatistics +*/ +func (c *DefaultApiService) FetchWorkspaceRealTimeStatistics(WorkspaceSid string, params *FetchWorkspaceRealTimeStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceRealTimeStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkspaceRealTimeStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// FetchWorkspaceStatisticsParams Optional parameters for the method 'FetchWorkspaceStatistics' +type FetchWorkspaceStatisticsParams struct { + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + EndDate *time.Time `json:"EndDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` +} + +/* +FetchWorkspaceStatistics Method for FetchWorkspaceStatistics + * @param WorkspaceSid The SID of the Workspace to fetch. + * @param optional nil or *FetchWorkspaceStatisticsOpts - Optional Parameters: + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. +@return TaskrouterV1WorkspaceWorkspaceStatistics +*/ +func (c *DefaultApiService) FetchWorkspaceStatistics(WorkspaceSid string, params *FetchWorkspaceStatisticsParams) (*TaskrouterV1WorkspaceWorkspaceStatistics, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkspaceStatistics{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListActivityParams Optional parameters for the method 'ListActivity' +type ListActivityParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + Available *string `json:"Available,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListActivity Method for ListActivity + * @param WorkspaceSid The SID of the Workspace with the Activity resources to read. + * @param optional nil or *ListActivityOpts - Optional Parameters: + * @param "FriendlyName" (string) - The `friendly_name` of the Activity resources to read. + * @param "Available" (string) - Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListActivityResponse +*/ +func (c *DefaultApiService) ListActivity(WorkspaceSid string, params *ListActivityParams) (*ListActivityResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListActivityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEventParams Optional parameters for the method 'ListEvent' +type ListEventParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + EventType *string `json:"EventType,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + ReservationSid *string `json:"ReservationSid,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskSid *string `json:"TaskSid,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + Sid *string `json:"Sid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEvent Method for ListEvent + * @param WorkspaceSid The SID of the Workspace with the Events to read. Returns only the Events that pertain to the specified Workspace. + * @param optional nil or *ListEventOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "EventType" (string) - The type of Events to read. Returns only Events of the type specified. + * @param "Minutes" (int32) - The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted. + * @param "ReservationSid" (string) - The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation. + * @param "StartDate" (time.Time) - Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted. + * @param "TaskQueueSid" (string) - The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue. + * @param "TaskSid" (string) - The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task. + * @param "WorkerSid" (string) - The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker. + * @param "WorkflowSid" (string) - The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow. + * @param "TaskChannel" (string) - The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel. + * @param "Sid" (string) - The SID of the Event resource to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEventResponse +*/ +func (c *DefaultApiService) ListEvent(WorkspaceSid string, params *ListEventParams) (*ListEventResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Events" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.EventType != nil { + data.Set("EventType", *params.EventType) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.ReservationSid != nil { + data.Set("ReservationSid", *params.ReservationSid) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskSid != nil { + data.Set("TaskSid", *params.TaskSid) + } + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.Sid != nil { + data.Set("Sid", *params.Sid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEventResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskParams Optional parameters for the method 'ListTask' +type ListTaskParams struct { + Priority *int32 `json:"Priority,omitempty"` + AssignmentStatus *[]string `json:"AssignmentStatus,omitempty"` + WorkflowSid *string `json:"WorkflowSid,omitempty"` + WorkflowName *string `json:"WorkflowName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + EvaluateTaskAttributes *string `json:"EvaluateTaskAttributes,omitempty"` + Ordering *string `json:"Ordering,omitempty"` + HasAddons *bool `json:"HasAddons,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTask Method for ListTask + * @param WorkspaceSid The SID of the Workspace with the Tasks to read. + * @param optional nil or *ListTaskOpts - Optional Parameters: + * @param "Priority" (int32) - The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority. + * @param "AssignmentStatus" ([]string) - The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`. + * @param "WorkflowSid" (string) - The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID. + * @param "WorkflowName" (string) - The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name. + * @param "TaskQueueSid" (string) - The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID. + * @param "TaskQueueName" (string) - The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. + * @param "EvaluateTaskAttributes" (string) - The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. + * @param "Ordering" (string) - How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. + * @param "HasAddons" (bool) - Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskResponse +*/ +func (c *DefaultApiService) ListTask(WorkspaceSid string, params *ListTaskParams) (*ListTaskResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", strings.Join(*params.AssignmentStatus, ",")) + } + if params != nil && params.WorkflowSid != nil { + data.Set("WorkflowSid", *params.WorkflowSid) + } + if params != nil && params.WorkflowName != nil { + data.Set("WorkflowName", *params.WorkflowName) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.EvaluateTaskAttributes != nil { + data.Set("EvaluateTaskAttributes", *params.EvaluateTaskAttributes) + } + if params != nil && params.Ordering != nil { + data.Set("Ordering", *params.Ordering) + } + if params != nil && params.HasAddons != nil { + data.Set("HasAddons", fmt.Sprint(*params.HasAddons)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskChannelParams Optional parameters for the method 'ListTaskChannel' +type ListTaskChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTaskChannel Method for ListTaskChannel + * @param WorkspaceSid The SID of the Workspace with the Task Channel to read. + * @param optional nil or *ListTaskChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskChannelResponse +*/ +func (c *DefaultApiService) ListTaskChannel(WorkspaceSid string, params *ListTaskChannelParams) (*ListTaskChannelResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskQueueParams Optional parameters for the method 'ListTaskQueue' +type ListTaskQueueParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + EvaluateWorkerAttributes *string `json:"EvaluateWorkerAttributes,omitempty"` + WorkerSid *string `json:"WorkerSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTaskQueue Method for ListTaskQueue + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to read. + * @param optional nil or *ListTaskQueueOpts - Optional Parameters: + * @param "FriendlyName" (string) - The `friendly_name` of the TaskQueue resources to read. + * @param "EvaluateWorkerAttributes" (string) - The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter. + * @param "WorkerSid" (string) - The SID of the Worker with the TaskQueue resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskQueueResponse +*/ +func (c *DefaultApiService) ListTaskQueue(WorkspaceSid string, params *ListTaskQueueParams) (*ListTaskQueueResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.EvaluateWorkerAttributes != nil { + data.Set("EvaluateWorkerAttributes", *params.EvaluateWorkerAttributes) + } + if params != nil && params.WorkerSid != nil { + data.Set("WorkerSid", *params.WorkerSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskQueueResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskQueuesStatisticsParams Optional parameters for the method 'ListTaskQueuesStatistics' +type ListTaskQueuesStatisticsParams struct { + EndDate *time.Time `json:"EndDate,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Minutes *int32 `json:"Minutes,omitempty"` + StartDate *time.Time `json:"StartDate,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` + SplitByWaitTime *string `json:"SplitByWaitTime,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTaskQueuesStatistics Method for ListTaskQueuesStatistics + * @param WorkspaceSid The SID of the Workspace with the TaskQueues to read. + * @param optional nil or *ListTaskQueuesStatisticsOpts - Optional Parameters: + * @param "EndDate" (time.Time) - Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. + * @param "FriendlyName" (string) - The `friendly_name` of the TaskQueue statistics to read. + * @param "Minutes" (int32) - Only calculate statistics since this many minutes in the past. The default is 15 minutes. + * @param "StartDate" (time.Time) - Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. + * @param "TaskChannel" (string) - Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + * @param "SplitByWaitTime" (string) - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskQueuesStatisticsResponse +*/ +func (c *DefaultApiService) ListTaskQueuesStatistics(WorkspaceSid string, params *ListTaskQueuesStatisticsParams) (*ListTaskQueuesStatisticsResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EndDate != nil { + data.Set("EndDate", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Minutes != nil { + data.Set("Minutes", fmt.Sprint(*params.Minutes)) + } + if params != nil && params.StartDate != nil { + data.Set("StartDate", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + if params != nil && params.SplitByWaitTime != nil { + data.Set("SplitByWaitTime", *params.SplitByWaitTime) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskQueuesStatisticsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTaskReservationParams Optional parameters for the method 'ListTaskReservation' +type ListTaskReservationParams struct { + ReservationStatus *string `json:"ReservationStatus,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTaskReservation Method for ListTaskReservation + * @param WorkspaceSid The SID of the Workspace with the TaskReservation resources to read. + * @param TaskSid The SID of the reserved Task resource with the TaskReservation resources to read. + * @param optional nil or *ListTaskReservationOpts - Optional Parameters: + * @param "ReservationStatus" (string) - Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTaskReservationResponse +*/ +func (c *DefaultApiService) ListTaskReservation(WorkspaceSid string, TaskSid string, params *ListTaskReservationParams) (*ListTaskReservationResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTaskReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWorkerParams Optional parameters for the method 'ListWorker' +type ListWorkerParams struct { + ActivityName *string `json:"ActivityName,omitempty"` + ActivitySid *string `json:"ActivitySid,omitempty"` + Available *string `json:"Available,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + TargetWorkersExpression *string `json:"TargetWorkersExpression,omitempty"` + TaskQueueName *string `json:"TaskQueueName,omitempty"` + TaskQueueSid *string `json:"TaskQueueSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWorker Method for ListWorker + * @param WorkspaceSid The SID of the Workspace with the Workers to read. + * @param optional nil or *ListWorkerOpts - Optional Parameters: + * @param "ActivityName" (string) - The `activity_name` of the Worker resources to read. + * @param "ActivitySid" (string) - The `activity_sid` of the Worker resources to read. + * @param "Available" (string) - Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available. + * @param "FriendlyName" (string) - The `friendly_name` of the Worker resources to read. + * @param "TargetWorkersExpression" (string) - Filter by Workers that would match an expression on a TaskQueue. This is helpful for debugging which Workers would match a potential queue. + * @param "TaskQueueName" (string) - The `friendly_name` of the TaskQueue that the Workers to read are eligible for. + * @param "TaskQueueSid" (string) - The SID of the TaskQueue that the Workers to read are eligible for. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWorkerResponse +*/ +func (c *DefaultApiService) ListWorker(WorkspaceSid string, params *ListWorkerParams) (*ListWorkerResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ActivityName != nil { + data.Set("ActivityName", *params.ActivityName) + } + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Available != nil { + data.Set("Available", *params.Available) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.TargetWorkersExpression != nil { + data.Set("TargetWorkersExpression", *params.TargetWorkersExpression) + } + if params != nil && params.TaskQueueName != nil { + data.Set("TaskQueueName", *params.TaskQueueName) + } + if params != nil && params.TaskQueueSid != nil { + data.Set("TaskQueueSid", *params.TaskQueueSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWorkerResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWorkerChannelParams Optional parameters for the method 'ListWorkerChannel' +type ListWorkerChannelParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWorkerChannel Method for ListWorkerChannel + * @param WorkspaceSid The SID of the Workspace with the WorkerChannels to read. + * @param WorkerSid The SID of the Worker with the WorkerChannels to read. + * @param optional nil or *ListWorkerChannelOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWorkerChannelResponse +*/ +func (c *DefaultApiService) ListWorkerChannel(WorkspaceSid string, WorkerSid string, params *ListWorkerChannelParams) (*ListWorkerChannelResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWorkerChannelResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWorkerReservationParams Optional parameters for the method 'ListWorkerReservation' +type ListWorkerReservationParams struct { + ReservationStatus *string `json:"ReservationStatus,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWorkerReservation Method for ListWorkerReservation + * @param WorkspaceSid The SID of the Workspace with the WorkerReservation resources to read. + * @param WorkerSid The SID of the reserved Worker resource with the WorkerReservation resources to read. + * @param optional nil or *ListWorkerReservationOpts - Optional Parameters: + * @param "ReservationStatus" (string) - Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWorkerReservationResponse +*/ +func (c *DefaultApiService) ListWorkerReservation(WorkspaceSid string, WorkerSid string, params *ListWorkerReservationParams) (*ListWorkerReservationResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWorkerReservationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWorkflowParams Optional parameters for the method 'ListWorkflow' +type ListWorkflowParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWorkflow Method for ListWorkflow + * @param WorkspaceSid The SID of the Workspace with the Workflow to read. + * @param optional nil or *ListWorkflowOpts - Optional Parameters: + * @param "FriendlyName" (string) - The `friendly_name` of the Workflow resources to read. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWorkflowResponse +*/ +func (c *DefaultApiService) ListWorkflow(WorkspaceSid string, params *ListWorkflowParams) (*ListWorkflowResponse, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWorkflowResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWorkspaceParams Optional parameters for the method 'ListWorkspace' +type ListWorkspaceParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWorkspace Method for ListWorkspace + * @param optional nil or *ListWorkspaceOpts - Optional Parameters: + * @param "FriendlyName" (string) - The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWorkspaceResponse +*/ +func (c *DefaultApiService) ListWorkspace(params *ListWorkspaceParams) (*ListWorkspaceResponse, error) { + path := "/v1/Workspaces" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWorkspaceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateActivityParams Optional parameters for the method 'UpdateActivity' +type UpdateActivityParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateActivity Method for UpdateActivity + * @param WorkspaceSid The SID of the Workspace with the Activity resources to update. + * @param Sid The SID of the Activity resource to update. + * @param optional nil or *UpdateActivityOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. +@return TaskrouterV1WorkspaceActivity +*/ +func (c *DefaultApiService) UpdateActivity(WorkspaceSid string, Sid string, params *UpdateActivityParams) (*TaskrouterV1WorkspaceActivity, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Activities/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceActivity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskParams Optional parameters for the method 'UpdateTask' +type UpdateTaskParams struct { + AssignmentStatus *string `json:"AssignmentStatus,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Reason *string `json:"Reason,omitempty"` + TaskChannel *string `json:"TaskChannel,omitempty"` +} + +/* +UpdateTask Method for UpdateTask + * @param WorkspaceSid The SID of the Workspace with the Task to update. + * @param Sid The SID of the Task resource to update. + * @param optional nil or *UpdateTaskOpts - Optional Parameters: + * @param "AssignmentStatus" (string) - The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state. + * @param "Attributes" (string) - The JSON string that describes the custom attributes of the task. + * @param "Priority" (int32) - The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647). + * @param "Reason" (string) - The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. + * @param "TaskChannel" (string) - When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. +@return TaskrouterV1WorkspaceTask +*/ +func (c *DefaultApiService) UpdateTask(WorkspaceSid string, Sid string, params *UpdateTaskParams) (*TaskrouterV1WorkspaceTask, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssignmentStatus != nil { + data.Set("AssignmentStatus", *params.AssignmentStatus) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Reason != nil { + data.Set("Reason", *params.Reason) + } + if params != nil && params.TaskChannel != nil { + data.Set("TaskChannel", *params.TaskChannel) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTask{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskChannelParams Optional parameters for the method 'UpdateTaskChannel' +type UpdateTaskChannelParams struct { + ChannelOptimizedRouting *bool `json:"ChannelOptimizedRouting,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateTaskChannel Method for UpdateTaskChannel + * @param WorkspaceSid The SID of the Workspace with the Task Channel to update. + * @param Sid The SID of the Task Channel resource to update. + * @param optional nil or *UpdateTaskChannelOpts - Optional Parameters: + * @param "ChannelOptimizedRouting" (bool) - Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. +@return TaskrouterV1WorkspaceTaskChannel +*/ +func (c *DefaultApiService) UpdateTaskChannel(WorkspaceSid string, Sid string, params *UpdateTaskChannelParams) (*TaskrouterV1WorkspaceTaskChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ChannelOptimizedRouting != nil { + data.Set("ChannelOptimizedRouting", fmt.Sprint(*params.ChannelOptimizedRouting)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskQueueParams Optional parameters for the method 'UpdateTaskQueue' +type UpdateTaskQueueParams struct { + AssignmentActivitySid *string `json:"AssignmentActivitySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MaxReservedWorkers *int32 `json:"MaxReservedWorkers,omitempty"` + ReservationActivitySid *string `json:"ReservationActivitySid,omitempty"` + TargetWorkers *string `json:"TargetWorkers,omitempty"` + TaskOrder *string `json:"TaskOrder,omitempty"` +} + +/* +UpdateTaskQueue Method for UpdateTaskQueue + * @param WorkspaceSid The SID of the Workspace with the TaskQueue to update. + * @param Sid The SID of the TaskQueue resource to update. + * @param optional nil or *UpdateTaskQueueOpts - Optional Parameters: + * @param "AssignmentActivitySid" (string) - The SID of the Activity to assign Workers when a task is assigned for them. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. + * @param "MaxReservedWorkers" (int32) - The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. + * @param "ReservationActivitySid" (string) - The SID of the Activity to assign Workers when a task is reserved for them. + * @param "TargetWorkers" (string) - A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. + * @param "TaskOrder" (string) - How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). +@return TaskrouterV1WorkspaceTaskQueue +*/ +func (c *DefaultApiService) UpdateTaskQueue(WorkspaceSid string, Sid string, params *UpdateTaskQueueParams) (*TaskrouterV1WorkspaceTaskQueue, error) { + path := "/v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssignmentActivitySid != nil { + data.Set("AssignmentActivitySid", *params.AssignmentActivitySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MaxReservedWorkers != nil { + data.Set("MaxReservedWorkers", fmt.Sprint(*params.MaxReservedWorkers)) + } + if params != nil && params.ReservationActivitySid != nil { + data.Set("ReservationActivitySid", *params.ReservationActivitySid) + } + if params != nil && params.TargetWorkers != nil { + data.Set("TargetWorkers", *params.TargetWorkers) + } + if params != nil && params.TaskOrder != nil { + data.Set("TaskOrder", *params.TaskOrder) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskQueue{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTaskReservationParams Optional parameters for the method 'UpdateTaskReservation' +type UpdateTaskReservationParams struct { + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Supervisor *string `json:"Supervisor,omitempty"` + SupervisorMode *string `json:"SupervisorMode,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` +} + +/* +UpdateTaskReservation Method for UpdateTaskReservation + * @param WorkspaceSid The SID of the Workspace with the TaskReservation resources to update. + * @param TaskSid The SID of the reserved Task resource with the TaskReservation resources to update. + * @param Sid The SID of the TaskReservation resource to update. + * @param optional nil or *UpdateTaskReservationOpts - Optional Parameters: + * @param "Beep" (string) - Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + * @param "BeepOnCustomerEntrance" (bool) - Whether to play a notification beep when the customer joins. + * @param "CallAccept" (bool) - Whether to accept a reservation when executing a Call instruction. + * @param "CallFrom" (string) - The Caller ID of the outbound call when executing a Call instruction. + * @param "CallRecord" (string) - Whether to record both legs of a call when executing a Call instruction or which leg to record. + * @param "CallStatusCallbackUrl" (string) - The URL to call for the completed call event when executing a Call instruction. + * @param "CallTimeout" (int32) - Timeout for call when executing a Call instruction. + * @param "CallTo" (string) - The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "CallUrl" (string) - TwiML URI executed on answering the worker's leg as a result of the Call instruction. + * @param "ConferenceRecord" (string) - Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + * @param "ConferenceRecordingStatusCallback" (string) - The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + * @param "ConferenceRecordingStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceStatusCallback" (string) - The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + * @param "ConferenceStatusCallbackEvent" ([]string) - The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. + * @param "ConferenceStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceTrim" (string) - How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + * @param "DequeueFrom" (string) - The Caller ID of the call to the worker when executing a Dequeue instruction. + * @param "DequeuePostWorkActivitySid" (string) - The SID of the Activity resource to start after executing a Dequeue instruction. + * @param "DequeueRecord" (string) - Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. + * @param "DequeueStatusCallbackEvent" ([]string) - The Call progress events sent via webhooks as a result of a Dequeue instruction. + * @param "DequeueStatusCallbackUrl" (string) - The Callback URL for completed call event when executing a Dequeue instruction. + * @param "DequeueTimeout" (int32) - Timeout for call when executing a Dequeue instruction. + * @param "DequeueTo" (string) - The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "EarlyMedia" (bool) - Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. + * @param "EndConferenceOnCustomerExit" (bool) - Whether to end the conference when the customer leaves. + * @param "EndConferenceOnExit" (bool) - Whether to end the conference when the agent leaves. + * @param "From" (string) - The Caller ID of the call to the worker when executing a Conference instruction. + * @param "Instruction" (string) - The assignment instruction for reservation. + * @param "MaxParticipants" (int32) - The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + * @param "Muted" (bool) - Whether the agent is muted in the conference. The default is `false`. + * @param "PostWorkActivitySid" (string) - The new worker activity SID after executing a Conference instruction. + * @param "Record" (bool) - Whether to record the participant and their conferences, including the time between conferences. The default is `false`. + * @param "RecordingChannels" (string) - The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + * @param "RecordingStatusCallback" (string) - The URL that we should call using the `recording_status_callback_method` when the recording status changes. + * @param "RecordingStatusCallbackMethod" (string) - The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "RedirectAccept" (bool) - Whether the reservation should be accepted when executing a Redirect instruction. + * @param "RedirectCallSid" (string) - The Call SID of the call parked in the queue when executing a Redirect instruction. + * @param "RedirectUrl" (string) - TwiML URI to redirect the call to when executing the Redirect instruction. + * @param "Region" (string) - The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + * @param "ReservationStatus" (string) - The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`. + * @param "SipAuthPassword" (string) - The SIP password for authentication. + * @param "SipAuthUsername" (string) - The SIP username used for authentication. + * @param "StartConferenceOnEnter" (bool) - Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackEvent" ([]string) - The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + * @param "Supervisor" (string) - The Supervisor SID/URI when executing the Supervise instruction. + * @param "SupervisorMode" (string) - The Supervisor mode when executing the Supervise instruction. + * @param "Timeout" (int32) - Timeout for call when executing a Conference instruction. + * @param "To" (string) - The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. +@return TaskrouterV1WorkspaceTaskTaskReservation +*/ +func (c *DefaultApiService) UpdateTaskReservation(WorkspaceSid string, TaskSid string, Sid string, params *UpdateTaskReservationParams) (*TaskrouterV1WorkspaceTaskTaskReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"TaskSid"+"}", TaskSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) + } + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) + } + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) + } + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) + } + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) + } + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) + } + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) + } + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) + } + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) + } + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) + } + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) + } + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) + } + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) + } + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) + } + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) + } + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Supervisor != nil { + data.Set("Supervisor", *params.Supervisor) + } + if params != nil && params.SupervisorMode != nil { + data.Set("SupervisorMode", *params.SupervisorMode) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceTaskTaskReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWorkerParams Optional parameters for the method 'UpdateWorker' +type UpdateWorkerParams struct { + ActivitySid *string `json:"ActivitySid,omitempty"` + Attributes *string `json:"Attributes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RejectPendingReservations *bool `json:"RejectPendingReservations,omitempty"` +} + +/* +UpdateWorker Method for UpdateWorker + * @param WorkspaceSid The SID of the Workspace with the Worker to update. + * @param Sid The SID of the Worker resource to update. + * @param optional nil or *UpdateWorkerOpts - Optional Parameters: + * @param "ActivitySid" (string) - The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. + * @param "Attributes" (string) - The JSON string that describes the Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Worker. It can be up to 64 characters long. + * @param "RejectPendingReservations" (bool) - Whether to reject pending reservations. +@return TaskrouterV1WorkspaceWorker +*/ +func (c *DefaultApiService) UpdateWorker(WorkspaceSid string, Sid string, params *UpdateWorkerParams) (*TaskrouterV1WorkspaceWorker, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.ActivitySid != nil { + data.Set("ActivitySid", *params.ActivitySid) + } + if params != nil && params.Attributes != nil { + data.Set("Attributes", *params.Attributes) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RejectPendingReservations != nil { + data.Set("RejectPendingReservations", fmt.Sprint(*params.RejectPendingReservations)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorker{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWorkerChannelParams Optional parameters for the method 'UpdateWorkerChannel' +type UpdateWorkerChannelParams struct { + Available *bool `json:"Available,omitempty"` + Capacity *int32 `json:"Capacity,omitempty"` +} + +/* +UpdateWorkerChannel Method for UpdateWorkerChannel + * @param WorkspaceSid The SID of the Workspace with the WorkerChannel to update. + * @param WorkerSid The SID of the Worker with the WorkerChannel to update. + * @param Sid The SID of the WorkerChannel to update. + * @param optional nil or *UpdateWorkerChannelOpts - Optional Parameters: + * @param "Available" (bool) - Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. + * @param "Capacity" (int32) - The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. +@return TaskrouterV1WorkspaceWorkerWorkerChannel +*/ +func (c *DefaultApiService) UpdateWorkerChannel(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerChannelParams) (*TaskrouterV1WorkspaceWorkerWorkerChannel, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Available != nil { + data.Set("Available", fmt.Sprint(*params.Available)) + } + if params != nil && params.Capacity != nil { + data.Set("Capacity", fmt.Sprint(*params.Capacity)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerChannel{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWorkerReservationParams Optional parameters for the method 'UpdateWorkerReservation' +type UpdateWorkerReservationParams struct { + Beep *string `json:"Beep,omitempty"` + BeepOnCustomerEntrance *bool `json:"BeepOnCustomerEntrance,omitempty"` + CallAccept *bool `json:"CallAccept,omitempty"` + CallFrom *string `json:"CallFrom,omitempty"` + CallRecord *string `json:"CallRecord,omitempty"` + CallStatusCallbackUrl *string `json:"CallStatusCallbackUrl,omitempty"` + CallTimeout *int32 `json:"CallTimeout,omitempty"` + CallTo *string `json:"CallTo,omitempty"` + CallUrl *string `json:"CallUrl,omitempty"` + ConferenceRecord *string `json:"ConferenceRecord,omitempty"` + ConferenceRecordingStatusCallback *string `json:"ConferenceRecordingStatusCallback,omitempty"` + ConferenceRecordingStatusCallbackMethod *string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + ConferenceStatusCallback *string `json:"ConferenceStatusCallback,omitempty"` + ConferenceStatusCallbackEvent *[]string `json:"ConferenceStatusCallbackEvent,omitempty"` + ConferenceStatusCallbackMethod *string `json:"ConferenceStatusCallbackMethod,omitempty"` + ConferenceTrim *string `json:"ConferenceTrim,omitempty"` + DequeueFrom *string `json:"DequeueFrom,omitempty"` + DequeuePostWorkActivitySid *string `json:"DequeuePostWorkActivitySid,omitempty"` + DequeueRecord *string `json:"DequeueRecord,omitempty"` + DequeueStatusCallbackEvent *[]string `json:"DequeueStatusCallbackEvent,omitempty"` + DequeueStatusCallbackUrl *string `json:"DequeueStatusCallbackUrl,omitempty"` + DequeueTimeout *int32 `json:"DequeueTimeout,omitempty"` + DequeueTo *string `json:"DequeueTo,omitempty"` + EarlyMedia *bool `json:"EarlyMedia,omitempty"` + EndConferenceOnCustomerExit *bool `json:"EndConferenceOnCustomerExit,omitempty"` + EndConferenceOnExit *bool `json:"EndConferenceOnExit,omitempty"` + From *string `json:"From,omitempty"` + Instruction *string `json:"Instruction,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + Muted *bool `json:"Muted,omitempty"` + PostWorkActivitySid *string `json:"PostWorkActivitySid,omitempty"` + Record *bool `json:"Record,omitempty"` + RecordingChannels *string `json:"RecordingChannels,omitempty"` + RecordingStatusCallback *string `json:"RecordingStatusCallback,omitempty"` + RecordingStatusCallbackMethod *string `json:"RecordingStatusCallbackMethod,omitempty"` + RedirectAccept *bool `json:"RedirectAccept,omitempty"` + RedirectCallSid *string `json:"RedirectCallSid,omitempty"` + RedirectUrl *string `json:"RedirectUrl,omitempty"` + Region *string `json:"Region,omitempty"` + ReservationStatus *string `json:"ReservationStatus,omitempty"` + SipAuthPassword *string `json:"SipAuthPassword,omitempty"` + SipAuthUsername *string `json:"SipAuthUsername,omitempty"` + StartConferenceOnEnter *bool `json:"StartConferenceOnEnter,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackEvent *[]string `json:"StatusCallbackEvent,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Timeout *int32 `json:"Timeout,omitempty"` + To *string `json:"To,omitempty"` + WaitMethod *string `json:"WaitMethod,omitempty"` + WaitUrl *string `json:"WaitUrl,omitempty"` + WorkerActivitySid *string `json:"WorkerActivitySid,omitempty"` +} + +/* +UpdateWorkerReservation Method for UpdateWorkerReservation + * @param WorkspaceSid The SID of the Workspace with the WorkerReservation resources to update. + * @param WorkerSid The SID of the reserved Worker resource with the WorkerReservation resources to update. + * @param Sid The SID of the WorkerReservation resource to update. + * @param optional nil or *UpdateWorkerReservationOpts - Optional Parameters: + * @param "Beep" (string) - Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + * @param "BeepOnCustomerEntrance" (bool) - Whether to play a notification beep when the customer joins. + * @param "CallAccept" (bool) - Whether to accept a reservation when executing a Call instruction. + * @param "CallFrom" (string) - The Caller ID of the outbound call when executing a Call instruction. + * @param "CallRecord" (string) - Whether to record both legs of a call when executing a Call instruction. + * @param "CallStatusCallbackUrl" (string) - The URL to call for the completed call event when executing a Call instruction. + * @param "CallTimeout" (int32) - The timeout for a call when executing a Call instruction. + * @param "CallTo" (string) - The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "CallUrl" (string) - TwiML URI executed on answering the worker's leg as a result of the Call instruction. + * @param "ConferenceRecord" (string) - Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + * @param "ConferenceRecordingStatusCallback" (string) - The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + * @param "ConferenceRecordingStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceStatusCallback" (string) - The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + * @param "ConferenceStatusCallbackEvent" ([]string) - The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. + * @param "ConferenceStatusCallbackMethod" (string) - The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "ConferenceTrim" (string) - Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + * @param "DequeueFrom" (string) - The caller ID of the call to the worker when executing a Dequeue instruction. + * @param "DequeuePostWorkActivitySid" (string) - The SID of the Activity resource to start after executing a Dequeue instruction. + * @param "DequeueRecord" (string) - Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. + * @param "DequeueStatusCallbackEvent" ([]string) - The call progress events sent via webhooks as a result of a Dequeue instruction. + * @param "DequeueStatusCallbackUrl" (string) - The callback URL for completed call event when executing a Dequeue instruction. + * @param "DequeueTimeout" (int32) - The timeout for call when executing a Dequeue instruction. + * @param "DequeueTo" (string) - The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "EarlyMedia" (bool) - Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. + * @param "EndConferenceOnCustomerExit" (bool) - Whether to end the conference when the customer leaves. + * @param "EndConferenceOnExit" (bool) - Whether to end the conference when the agent leaves. + * @param "From" (string) - The caller ID of the call to the worker when executing a Conference instruction. + * @param "Instruction" (string) - The assignment instruction for the reservation. + * @param "MaxParticipants" (int32) - The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + * @param "Muted" (bool) - Whether the agent is muted in the conference. Defaults to `false`. + * @param "PostWorkActivitySid" (string) - The new worker activity SID after executing a Conference instruction. + * @param "Record" (bool) - Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + * @param "RecordingChannels" (string) - The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + * @param "RecordingStatusCallback" (string) - The URL that we should call using the `recording_status_callback_method` when the recording status changes. + * @param "RecordingStatusCallbackMethod" (string) - The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + * @param "RedirectAccept" (bool) - Whether the reservation should be accepted when executing a Redirect instruction. + * @param "RedirectCallSid" (string) - The Call SID of the call parked in the queue when executing a Redirect instruction. + * @param "RedirectUrl" (string) - TwiML URI to redirect the call to when executing the Redirect instruction. + * @param "Region" (string) - The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + * @param "ReservationStatus" (string) - The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. + * @param "SipAuthPassword" (string) - The SIP password for authentication. + * @param "SipAuthUsername" (string) - The SIP username used for authentication. + * @param "StartConferenceOnEnter" (bool) - Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application. + * @param "StatusCallbackEvent" ([]string) - The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + * @param "Timeout" (int32) - The timeout for a call when executing a Conference instruction. + * @param "To" (string) - The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + * @param "WaitMethod" (string) - The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + * @param "WaitUrl" (string) - The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + * @param "WorkerActivitySid" (string) - The new worker activity SID if rejecting a reservation. +@return TaskrouterV1WorkspaceWorkerWorkerReservation +*/ +func (c *DefaultApiService) UpdateWorkerReservation(WorkspaceSid string, WorkerSid string, Sid string, params *UpdateWorkerReservationParams) (*TaskrouterV1WorkspaceWorkerWorkerReservation, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"WorkerSid"+"}", WorkerSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Beep != nil { + data.Set("Beep", *params.Beep) + } + if params != nil && params.BeepOnCustomerEntrance != nil { + data.Set("BeepOnCustomerEntrance", fmt.Sprint(*params.BeepOnCustomerEntrance)) + } + if params != nil && params.CallAccept != nil { + data.Set("CallAccept", fmt.Sprint(*params.CallAccept)) + } + if params != nil && params.CallFrom != nil { + data.Set("CallFrom", *params.CallFrom) + } + if params != nil && params.CallRecord != nil { + data.Set("CallRecord", *params.CallRecord) + } + if params != nil && params.CallStatusCallbackUrl != nil { + data.Set("CallStatusCallbackUrl", *params.CallStatusCallbackUrl) + } + if params != nil && params.CallTimeout != nil { + data.Set("CallTimeout", fmt.Sprint(*params.CallTimeout)) + } + if params != nil && params.CallTo != nil { + data.Set("CallTo", *params.CallTo) + } + if params != nil && params.CallUrl != nil { + data.Set("CallUrl", *params.CallUrl) + } + if params != nil && params.ConferenceRecord != nil { + data.Set("ConferenceRecord", *params.ConferenceRecord) + } + if params != nil && params.ConferenceRecordingStatusCallback != nil { + data.Set("ConferenceRecordingStatusCallback", *params.ConferenceRecordingStatusCallback) + } + if params != nil && params.ConferenceRecordingStatusCallbackMethod != nil { + data.Set("ConferenceRecordingStatusCallbackMethod", *params.ConferenceRecordingStatusCallbackMethod) + } + if params != nil && params.ConferenceStatusCallback != nil { + data.Set("ConferenceStatusCallback", *params.ConferenceStatusCallback) + } + if params != nil && params.ConferenceStatusCallbackEvent != nil { + data.Set("ConferenceStatusCallbackEvent", strings.Join(*params.ConferenceStatusCallbackEvent, ",")) + } + if params != nil && params.ConferenceStatusCallbackMethod != nil { + data.Set("ConferenceStatusCallbackMethod", *params.ConferenceStatusCallbackMethod) + } + if params != nil && params.ConferenceTrim != nil { + data.Set("ConferenceTrim", *params.ConferenceTrim) + } + if params != nil && params.DequeueFrom != nil { + data.Set("DequeueFrom", *params.DequeueFrom) + } + if params != nil && params.DequeuePostWorkActivitySid != nil { + data.Set("DequeuePostWorkActivitySid", *params.DequeuePostWorkActivitySid) + } + if params != nil && params.DequeueRecord != nil { + data.Set("DequeueRecord", *params.DequeueRecord) + } + if params != nil && params.DequeueStatusCallbackEvent != nil { + data.Set("DequeueStatusCallbackEvent", strings.Join(*params.DequeueStatusCallbackEvent, ",")) + } + if params != nil && params.DequeueStatusCallbackUrl != nil { + data.Set("DequeueStatusCallbackUrl", *params.DequeueStatusCallbackUrl) + } + if params != nil && params.DequeueTimeout != nil { + data.Set("DequeueTimeout", fmt.Sprint(*params.DequeueTimeout)) + } + if params != nil && params.DequeueTo != nil { + data.Set("DequeueTo", *params.DequeueTo) + } + if params != nil && params.EarlyMedia != nil { + data.Set("EarlyMedia", fmt.Sprint(*params.EarlyMedia)) + } + if params != nil && params.EndConferenceOnCustomerExit != nil { + data.Set("EndConferenceOnCustomerExit", fmt.Sprint(*params.EndConferenceOnCustomerExit)) + } + if params != nil && params.EndConferenceOnExit != nil { + data.Set("EndConferenceOnExit", fmt.Sprint(*params.EndConferenceOnExit)) + } + if params != nil && params.From != nil { + data.Set("From", *params.From) + } + if params != nil && params.Instruction != nil { + data.Set("Instruction", *params.Instruction) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.Muted != nil { + data.Set("Muted", fmt.Sprint(*params.Muted)) + } + if params != nil && params.PostWorkActivitySid != nil { + data.Set("PostWorkActivitySid", *params.PostWorkActivitySid) + } + if params != nil && params.Record != nil { + data.Set("Record", fmt.Sprint(*params.Record)) + } + if params != nil && params.RecordingChannels != nil { + data.Set("RecordingChannels", *params.RecordingChannels) + } + if params != nil && params.RecordingStatusCallback != nil { + data.Set("RecordingStatusCallback", *params.RecordingStatusCallback) + } + if params != nil && params.RecordingStatusCallbackMethod != nil { + data.Set("RecordingStatusCallbackMethod", *params.RecordingStatusCallbackMethod) + } + if params != nil && params.RedirectAccept != nil { + data.Set("RedirectAccept", fmt.Sprint(*params.RedirectAccept)) + } + if params != nil && params.RedirectCallSid != nil { + data.Set("RedirectCallSid", *params.RedirectCallSid) + } + if params != nil && params.RedirectUrl != nil { + data.Set("RedirectUrl", *params.RedirectUrl) + } + if params != nil && params.Region != nil { + data.Set("Region", *params.Region) + } + if params != nil && params.ReservationStatus != nil { + data.Set("ReservationStatus", *params.ReservationStatus) + } + if params != nil && params.SipAuthPassword != nil { + data.Set("SipAuthPassword", *params.SipAuthPassword) + } + if params != nil && params.SipAuthUsername != nil { + data.Set("SipAuthUsername", *params.SipAuthUsername) + } + if params != nil && params.StartConferenceOnEnter != nil { + data.Set("StartConferenceOnEnter", fmt.Sprint(*params.StartConferenceOnEnter)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackEvent != nil { + data.Set("StatusCallbackEvent", strings.Join(*params.StatusCallbackEvent, ",")) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Timeout != nil { + data.Set("Timeout", fmt.Sprint(*params.Timeout)) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.WaitMethod != nil { + data.Set("WaitMethod", *params.WaitMethod) + } + if params != nil && params.WaitUrl != nil { + data.Set("WaitUrl", *params.WaitUrl) + } + if params != nil && params.WorkerActivitySid != nil { + data.Set("WorkerActivitySid", *params.WorkerActivitySid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkerWorkerReservation{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWorkflowParams Optional parameters for the method 'UpdateWorkflow' +type UpdateWorkflowParams struct { + AssignmentCallbackUrl *string `json:"AssignmentCallbackUrl,omitempty"` + Configuration *string `json:"Configuration,omitempty"` + FallbackAssignmentCallbackUrl *string `json:"FallbackAssignmentCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + ReEvaluateTasks *string `json:"ReEvaluateTasks,omitempty"` + TaskReservationTimeout *int32 `json:"TaskReservationTimeout,omitempty"` +} + +/* +UpdateWorkflow Method for UpdateWorkflow + * @param WorkspaceSid The SID of the Workspace with the Workflow to update. + * @param Sid The SID of the Workflow resource to update. + * @param optional nil or *UpdateWorkflowOpts - Optional Parameters: + * @param "AssignmentCallbackUrl" (string) - The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. + * @param "Configuration" (string) - A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. + * @param "FallbackAssignmentCallbackUrl" (string) - The URL that we should call when a call to the `assignment_callback_url` fails. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. + * @param "ReEvaluateTasks" (string) - Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. + * @param "TaskReservationTimeout" (int32) - How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. +@return TaskrouterV1WorkspaceWorkflow +*/ +func (c *DefaultApiService) UpdateWorkflow(WorkspaceSid string, Sid string, params *UpdateWorkflowParams) (*TaskrouterV1WorkspaceWorkflow, error) { + path := "/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}" + path = strings.Replace(path, "{"+"WorkspaceSid"+"}", WorkspaceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AssignmentCallbackUrl != nil { + data.Set("AssignmentCallbackUrl", *params.AssignmentCallbackUrl) + } + if params != nil && params.Configuration != nil { + data.Set("Configuration", *params.Configuration) + } + if params != nil && params.FallbackAssignmentCallbackUrl != nil { + data.Set("FallbackAssignmentCallbackUrl", *params.FallbackAssignmentCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.ReEvaluateTasks != nil { + data.Set("ReEvaluateTasks", *params.ReEvaluateTasks) + } + if params != nil && params.TaskReservationTimeout != nil { + data.Set("TaskReservationTimeout", fmt.Sprint(*params.TaskReservationTimeout)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1WorkspaceWorkflow{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWorkspaceParams Optional parameters for the method 'UpdateWorkspace' +type UpdateWorkspaceParams struct { + DefaultActivitySid *string `json:"DefaultActivitySid,omitempty"` + EventCallbackUrl *string `json:"EventCallbackUrl,omitempty"` + EventsFilter *string `json:"EventsFilter,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + MultiTaskEnabled *bool `json:"MultiTaskEnabled,omitempty"` + PrioritizeQueueOrder *string `json:"PrioritizeQueueOrder,omitempty"` + TimeoutActivitySid *string `json:"TimeoutActivitySid,omitempty"` +} + +/* +UpdateWorkspace Method for UpdateWorkspace + * @param Sid The SID of the Workspace resource to update. + * @param optional nil or *UpdateWorkspaceOpts - Optional Parameters: + * @param "DefaultActivitySid" (string) - The SID of the Activity that will be used when new Workers are created in the Workspace. + * @param "EventCallbackUrl" (string) - The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. + * @param "EventsFilter" (string) - The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`. + * @param "MultiTaskEnabled" (bool) - Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. + * @param "PrioritizeQueueOrder" (string) - The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. + * @param "TimeoutActivitySid" (string) - The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. +@return TaskrouterV1Workspace +*/ +func (c *DefaultApiService) UpdateWorkspace(Sid string, params *UpdateWorkspaceParams) (*TaskrouterV1Workspace, error) { + path := "/v1/Workspaces/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DefaultActivitySid != nil { + data.Set("DefaultActivitySid", *params.DefaultActivitySid) + } + if params != nil && params.EventCallbackUrl != nil { + data.Set("EventCallbackUrl", *params.EventCallbackUrl) + } + if params != nil && params.EventsFilter != nil { + data.Set("EventsFilter", *params.EventsFilter) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.MultiTaskEnabled != nil { + data.Set("MultiTaskEnabled", fmt.Sprint(*params.MultiTaskEnabled)) + } + if params != nil && params.PrioritizeQueueOrder != nil { + data.Set("PrioritizeQueueOrder", *params.PrioritizeQueueOrder) + } + if params != nil && params.TimeoutActivitySid != nil { + data.Set("TimeoutActivitySid", *params.TimeoutActivitySid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TaskrouterV1Workspace{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/taskrouter/v1/docs/CreateActivityRequest.md b/rest/taskrouter/v1/docs/CreateActivityRequest.md new file mode 100644 index 000000000..bd4837a7e --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateActivityRequest.md @@ -0,0 +1,12 @@ +# CreateActivityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Available** | **bool** | Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateTaskChannelRequest.md b/rest/taskrouter/v1/docs/CreateTaskChannelRequest.md new file mode 100644 index 000000000..d12f98276 --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateTaskChannelRequest.md @@ -0,0 +1,13 @@ +# CreateTaskChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChannelOptimizedRouting** | **bool** | Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. | +**UniqueName** | **string** | An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateTaskQueueRequest.md b/rest/taskrouter/v1/docs/CreateTaskQueueRequest.md new file mode 100644 index 000000000..bc424e848 --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateTaskQueueRequest.md @@ -0,0 +1,16 @@ +# CreateTaskQueueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignmentActivitySid** | **string** | The SID of the Activity to assign Workers when a task is assigned to them. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. | +**MaxReservedWorkers** | **int32** | The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. | [optional] +**ReservationActivitySid** | **string** | The SID of the Activity to assign Workers when a task is reserved for them. | [optional] +**TargetWorkers** | **string** | A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\"language\" == \"spanish\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). | [optional] +**TaskOrder** | **string** | How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateTaskRequest.md b/rest/taskrouter/v1/docs/CreateTaskRequest.md new file mode 100644 index 000000000..dc5a76b6b --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateTaskRequest.md @@ -0,0 +1,15 @@ +# CreateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | **string** | A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \"task_type\": \"call\", \"twilio_call_sid\": \"CAxxx\", \"customer_ticket_number\": \"12345\" }`. | [optional] +**Priority** | **int32** | The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647). | [optional] +**TaskChannel** | **string** | When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`. | [optional] +**Timeout** | **int32** | The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. | [optional] +**WorkflowSid** | **string** | The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateWorkerRequest.md b/rest/taskrouter/v1/docs/CreateWorkerRequest.md new file mode 100644 index 000000000..639382e99 --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateWorkerRequest.md @@ -0,0 +1,13 @@ +# CreateWorkerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivitySid** | **string** | The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace. | [optional] +**Attributes** | **string** | A valid JSON string that describes the new Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateWorkflowRequest.md b/rest/taskrouter/v1/docs/CreateWorkflowRequest.md new file mode 100644 index 000000000..fca1a4ec6 --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateWorkflowRequest.md @@ -0,0 +1,15 @@ +# CreateWorkflowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignmentCallbackUrl** | **string** | The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. | [optional] +**Configuration** | **string** | A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. | +**FallbackAssignmentCallbackUrl** | **string** | The URL that we should call when a call to the `assignment_callback_url` fails. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. | +**TaskReservationTimeout** | **int32** | How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/CreateWorkspaceRequest.md b/rest/taskrouter/v1/docs/CreateWorkspaceRequest.md new file mode 100644 index 000000000..64621c8cd --- /dev/null +++ b/rest/taskrouter/v1/docs/CreateWorkspaceRequest.md @@ -0,0 +1,16 @@ +# CreateWorkspaceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventCallbackUrl** | **string** | The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. | [optional] +**EventsFilter** | **string** | The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`. | +**MultiTaskEnabled** | **bool** | Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. | [optional] +**PrioritizeQueueOrder** | **string** | The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. | [optional] +**Template** | **string** | An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/DefaultApi.md b/rest/taskrouter/v1/docs/DefaultApi.md new file mode 100644 index 000000000..dff6e5629 --- /dev/null +++ b/rest/taskrouter/v1/docs/DefaultApi.md @@ -0,0 +1,2737 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateActivity**](DefaultApi.md#CreateActivity) | **Post** /v1/Workspaces/{WorkspaceSid}/Activities | +[**CreateTask**](DefaultApi.md#CreateTask) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks | +[**CreateTaskChannel**](DefaultApi.md#CreateTaskChannel) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskChannels | +[**CreateTaskQueue**](DefaultApi.md#CreateTaskQueue) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskQueues | +[**CreateWorker**](DefaultApi.md#CreateWorker) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers | +[**CreateWorkflow**](DefaultApi.md#CreateWorkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows | +[**CreateWorkspace**](DefaultApi.md#CreateWorkspace) | **Post** /v1/Workspaces | +[**DeleteActivity**](DefaultApi.md#DeleteActivity) | **Delete** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +[**DeleteTask**](DefaultApi.md#DeleteTask) | **Delete** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +[**DeleteTaskChannel**](DefaultApi.md#DeleteTaskChannel) | **Delete** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +[**DeleteTaskQueue**](DefaultApi.md#DeleteTaskQueue) | **Delete** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +[**DeleteWorker**](DefaultApi.md#DeleteWorker) | **Delete** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +[**DeleteWorkflow**](DefaultApi.md#DeleteWorkflow) | **Delete** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +[**DeleteWorkspace**](DefaultApi.md#DeleteWorkspace) | **Delete** /v1/Workspaces/{Sid} | +[**FetchActivity**](DefaultApi.md#FetchActivity) | **Get** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +[**FetchEvent**](DefaultApi.md#FetchEvent) | **Get** /v1/Workspaces/{WorkspaceSid}/Events/{Sid} | +[**FetchTask**](DefaultApi.md#FetchTask) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +[**FetchTaskChannel**](DefaultApi.md#FetchTaskChannel) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +[**FetchTaskQueue**](DefaultApi.md#FetchTaskQueue) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +[**FetchTaskQueueCumulativeStatistics**](DefaultApi.md#FetchTaskQueueCumulativeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics | +[**FetchTaskQueueRealTimeStatistics**](DefaultApi.md#FetchTaskQueueRealTimeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics | +[**FetchTaskQueueStatistics**](DefaultApi.md#FetchTaskQueueStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/Statistics | +[**FetchTaskReservation**](DefaultApi.md#FetchTaskReservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid} | +[**FetchWorker**](DefaultApi.md#FetchWorker) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +[**FetchWorkerChannel**](DefaultApi.md#FetchWorkerChannel) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid} | +[**FetchWorkerInstanceStatistics**](DefaultApi.md#FetchWorkerInstanceStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics | +[**FetchWorkerReservation**](DefaultApi.md#FetchWorkerReservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid} | +[**FetchWorkerStatistics**](DefaultApi.md#FetchWorkerStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/Statistics | +[**FetchWorkersCumulativeStatistics**](DefaultApi.md#FetchWorkersCumulativeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/CumulativeStatistics | +[**FetchWorkersRealTimeStatistics**](DefaultApi.md#FetchWorkersRealTimeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics | +[**FetchWorkflow**](DefaultApi.md#FetchWorkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +[**FetchWorkflowCumulativeStatistics**](DefaultApi.md#FetchWorkflowCumulativeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics | +[**FetchWorkflowRealTimeStatistics**](DefaultApi.md#FetchWorkflowRealTimeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/RealTimeStatistics | +[**FetchWorkflowStatistics**](DefaultApi.md#FetchWorkflowStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/Statistics | +[**FetchWorkspace**](DefaultApi.md#FetchWorkspace) | **Get** /v1/Workspaces/{Sid} | +[**FetchWorkspaceCumulativeStatistics**](DefaultApi.md#FetchWorkspaceCumulativeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/CumulativeStatistics | +[**FetchWorkspaceRealTimeStatistics**](DefaultApi.md#FetchWorkspaceRealTimeStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/RealTimeStatistics | +[**FetchWorkspaceStatistics**](DefaultApi.md#FetchWorkspaceStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/Statistics | +[**ListActivity**](DefaultApi.md#ListActivity) | **Get** /v1/Workspaces/{WorkspaceSid}/Activities | +[**ListEvent**](DefaultApi.md#ListEvent) | **Get** /v1/Workspaces/{WorkspaceSid}/Events | +[**ListTask**](DefaultApi.md#ListTask) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks | +[**ListTaskChannel**](DefaultApi.md#ListTaskChannel) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskChannels | +[**ListTaskQueue**](DefaultApi.md#ListTaskQueue) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues | +[**ListTaskQueuesStatistics**](DefaultApi.md#ListTaskQueuesStatistics) | **Get** /v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics | +[**ListTaskReservation**](DefaultApi.md#ListTaskReservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations | +[**ListWorker**](DefaultApi.md#ListWorker) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers | +[**ListWorkerChannel**](DefaultApi.md#ListWorkerChannel) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels | +[**ListWorkerReservation**](DefaultApi.md#ListWorkerReservation) | **Get** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations | +[**ListWorkflow**](DefaultApi.md#ListWorkflow) | **Get** /v1/Workspaces/{WorkspaceSid}/Workflows | +[**ListWorkspace**](DefaultApi.md#ListWorkspace) | **Get** /v1/Workspaces | +[**UpdateActivity**](DefaultApi.md#UpdateActivity) | **Post** /v1/Workspaces/{WorkspaceSid}/Activities/{Sid} | +[**UpdateTask**](DefaultApi.md#UpdateTask) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} | +[**UpdateTaskChannel**](DefaultApi.md#UpdateTaskChannel) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid} | +[**UpdateTaskQueue**](DefaultApi.md#UpdateTaskQueue) | **Post** /v1/Workspaces/{WorkspaceSid}/TaskQueues/{Sid} | +[**UpdateTaskReservation**](DefaultApi.md#UpdateTaskReservation) | **Post** /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid} | +[**UpdateWorker**](DefaultApi.md#UpdateWorker) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{Sid} | +[**UpdateWorkerChannel**](DefaultApi.md#UpdateWorkerChannel) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid} | +[**UpdateWorkerReservation**](DefaultApi.md#UpdateWorkerReservation) | **Post** /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid} | +[**UpdateWorkflow**](DefaultApi.md#UpdateWorkflow) | **Post** /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid} | +[**UpdateWorkspace**](DefaultApi.md#UpdateWorkspace) | **Post** /v1/Workspaces/{Sid} | + + + +## CreateActivity + +> TaskrouterV1WorkspaceActivity CreateActivity(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new Activity belongs to. | + **optional** | ***CreateActivityOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateActivityOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Available** | **optional.Bool**| Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. | + +### Return type + +[**TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTask + +> TaskrouterV1WorkspaceTask CreateTask(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new Task belongs to. | + **optional** | ***CreateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Attributes** | **optional.String**| A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`. | + **Priority** | **optional.Int32**| The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647). | + **TaskChannel** | **optional.String**| When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`. | + **Timeout** | **optional.Int32**| The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. | + **WorkflowSid** | **optional.String**| The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. | + +### Return type + +[**TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTaskChannel + +> TaskrouterV1WorkspaceTaskChannel CreateTaskChannel(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new Task Channel belongs to. | + **optional** | ***CreateTaskChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTaskChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ChannelOptimizedRouting** | **optional.Bool**| Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. | + +### Return type + +[**TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTaskQueue + +> TaskrouterV1WorkspaceTaskQueue CreateTaskQueue(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new TaskQueue belongs to. | + **optional** | ***CreateTaskQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTaskQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AssignmentActivitySid** | **optional.String**| The SID of the Activity to assign Workers when a task is assigned to them. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. | + **MaxReservedWorkers** | **optional.Int32**| The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. | + **ReservationActivitySid** | **optional.String**| The SID of the Activity to assign Workers when a task is reserved for them. | + **TargetWorkers** | **optional.String**| A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). | + **TaskOrder** | **optional.String**| How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWorker + +> TaskrouterV1WorkspaceWorker CreateWorker(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new Worker belongs to. | + **optional** | ***CreateWorkerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWorkerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ActivitySid** | **optional.String**| The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace. | + **Attributes** | **optional.String**| A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. | + +### Return type + +[**TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWorkflow + +> TaskrouterV1WorkspaceWorkflow CreateWorkflow(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace that the new Workflow to create belongs to. | + **optional** | ***CreateWorkflowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWorkflowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AssignmentCallbackUrl** | **optional.String**| The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. | + **Configuration** | **optional.String**| A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. | + **FallbackAssignmentCallbackUrl** | **optional.String**| The URL that we should call when a call to the `assignment_callback_url` fails. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. | + **TaskReservationTimeout** | **optional.Int32**| How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWorkspace + +> TaskrouterV1Workspace CreateWorkspace(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateWorkspaceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWorkspaceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **EventCallbackUrl** | **optional.String**| The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. | + **EventsFilter** | **optional.String**| The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`. | + **MultiTaskEnabled** | **optional.Bool**| Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. | + **PrioritizeQueueOrder** | **optional.String**| The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. | + **Template** | **optional.String**| An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. | + +### Return type + +[**TaskrouterV1Workspace**](taskrouter.v1.workspace.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteActivity + +> DeleteActivity(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Activity resources to delete. | +**Sid** | **string**| The SID of the Activity resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTask + +> DeleteTask(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task to delete. | +**Sid** | **string**| The SID of the Task resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTaskChannel + +> DeleteTaskChannel(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task Channel to delete. | +**Sid** | **string**| The SID of the Task Channel resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTaskQueue + +> DeleteTaskQueue(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to delete. | +**Sid** | **string**| The SID of the TaskQueue resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWorker + +> DeleteWorker(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Worker to delete. | +**Sid** | **string**| The SID of the Worker resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWorkflow + +> DeleteWorkflow(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to delete. | +**Sid** | **string**| The SID of the Workflow resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWorkspace + +> DeleteWorkspace(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Workspace resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchActivity + +> TaskrouterV1WorkspaceActivity FetchActivity(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Activity resources to fetch. | +**Sid** | **string**| The SID of the Activity resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEvent + +> TaskrouterV1WorkspaceEvent FetchEvent(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Event to fetch. | +**Sid** | **string**| The SID of the Event resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceEvent**](taskrouter.v1.workspace.event.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTask + +> TaskrouterV1WorkspaceTask FetchTask(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task to fetch. | +**Sid** | **string**| The SID of the Task resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskChannel + +> TaskrouterV1WorkspaceTaskChannel FetchTaskChannel(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task Channel to fetch. | +**Sid** | **string**| The SID of the Task Channel resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskQueue + +> TaskrouterV1WorkspaceTaskQueue FetchTaskQueue(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to fetch. | +**Sid** | **string**| The SID of the TaskQueue resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskQueueCumulativeStatistics + +> TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics FetchTaskQueueCumulativeStatistics(ctx, WorkspaceSid, TaskQueueSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to fetch. | +**TaskQueueSid** | **string**| The SID of the TaskQueue for which to fetch statistics. | + **optional** | ***FetchTaskQueueCumulativeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchTaskQueueCumulativeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default is 15 minutes. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics**](taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskQueueRealTimeStatistics + +> TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics FetchTaskQueueRealTimeStatistics(ctx, WorkspaceSid, TaskQueueSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to fetch. | +**TaskQueueSid** | **string**| The SID of the TaskQueue for which to fetch statistics. | + **optional** | ***FetchTaskQueueRealTimeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchTaskQueueRealTimeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **TaskChannel** | **optional.String**| The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics**](taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskQueueStatistics + +> TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics FetchTaskQueueStatistics(ctx, WorkspaceSid, TaskQueueSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to fetch. | +**TaskQueueSid** | **string**| The SID of the TaskQueue for which to fetch statistics. | + **optional** | ***FetchTaskQueueStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchTaskQueueStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default is 15 minutes. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics**](taskrouter.v1.workspace.task_queue.task_queue_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTaskReservation + +> TaskrouterV1WorkspaceTaskTaskReservation FetchTaskReservation(ctx, WorkspaceSid, TaskSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskReservation resource to fetch. | +**TaskSid** | **string**| The SID of the reserved Task resource with the TaskReservation resource to fetch. | +**Sid** | **string**| The SID of the TaskReservation resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceTaskTaskReservation**](taskrouter.v1.workspace.task.task_reservation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorker + +> TaskrouterV1WorkspaceWorker FetchWorker(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Worker to fetch. | +**Sid** | **string**| The SID of the Worker resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkerChannel + +> TaskrouterV1WorkspaceWorkerWorkerChannel FetchWorkerChannel(ctx, WorkspaceSid, WorkerSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerChannel to fetch. | +**WorkerSid** | **string**| The SID of the Worker with the WorkerChannel to fetch. | +**Sid** | **string**| The SID of the WorkerChannel to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerChannel**](taskrouter.v1.workspace.worker.worker_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkerInstanceStatistics + +> TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics FetchWorkerInstanceStatistics(ctx, WorkspaceSid, WorkerSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerChannel to fetch. | +**WorkerSid** | **string**| The SID of the Worker with the WorkerChannel to fetch. | + **optional** | ***FetchWorkerInstanceStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkerInstanceStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **TaskChannel** | **optional.String**| Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics**](taskrouter.v1.workspace.worker.worker_instance_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkerReservation + +> TaskrouterV1WorkspaceWorkerWorkerReservation FetchWorkerReservation(ctx, WorkspaceSid, WorkerSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerReservation resource to fetch. | +**WorkerSid** | **string**| The SID of the reserved Worker resource with the WorkerReservation resource to fetch. | +**Sid** | **string**| The SID of the WorkerReservation resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerReservation**](taskrouter.v1.workspace.worker.worker_reservation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkerStatistics + +> TaskrouterV1WorkspaceWorkerWorkerStatistics FetchWorkerStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Worker to fetch. | + **optional** | ***FetchWorkerStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkerStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **TaskQueueSid** | **optional.String**| The SID of the TaskQueue for which to fetch Worker statistics. | + **TaskQueueName** | **optional.String**| The `friendly_name` of the TaskQueue for which to fetch Worker statistics. | + **FriendlyName** | **optional.String**| Only include Workers with `friendly_name` values that match this parameter. | + **TaskChannel** | **optional.String**| Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerStatistics**](taskrouter.v1.workspace.worker.worker_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkersCumulativeStatistics + +> TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics FetchWorkersCumulativeStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the resource to fetch. | + **optional** | ***FetchWorkersCumulativeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkersCumulativeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics**](taskrouter.v1.workspace.worker.workers_cumulative_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkersRealTimeStatistics + +> TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics FetchWorkersRealTimeStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the resource to fetch. | + **optional** | ***FetchWorkersRealTimeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkersRealTimeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **TaskChannel** | **optional.String**| Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics**](taskrouter.v1.workspace.worker.workers_real_time_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkflow + +> TaskrouterV1WorkspaceWorkflow FetchWorkflow(ctx, WorkspaceSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to fetch. | +**Sid** | **string**| The SID of the Workflow resource to fetch. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkflowCumulativeStatistics + +> TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics FetchWorkflowCumulativeStatistics(ctx, WorkspaceSid, WorkflowSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the resource to fetch. | +**WorkflowSid** | **string**| Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value. | + **optional** | ***FetchWorkflowCumulativeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkflowCumulativeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics**](taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkflowRealTimeStatistics + +> TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics FetchWorkflowRealTimeStatistics(ctx, WorkspaceSid, WorkflowSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to fetch. | +**WorkflowSid** | **string**| Returns the list of Tasks that are being controlled by the Workflow with the specified SID value. | + **optional** | ***FetchWorkflowRealTimeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkflowRealTimeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **TaskChannel** | **optional.String**| Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics**](taskrouter.v1.workspace.workflow.workflow_real_time_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkflowStatistics + +> TaskrouterV1WorkspaceWorkflowWorkflowStatistics FetchWorkflowStatistics(ctx, WorkspaceSid, WorkflowSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to fetch. | +**WorkflowSid** | **string**| Returns the list of Tasks that are being controlled by the Workflow with the specified SID value. | + **optional** | ***FetchWorkflowStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkflowStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **TaskChannel** | **optional.String**| Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflowWorkflowStatistics**](taskrouter.v1.workspace.workflow.workflow_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkspace + +> TaskrouterV1Workspace FetchWorkspace(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Workspace resource to fetch. | + +### Return type + +[**TaskrouterV1Workspace**](taskrouter.v1.workspace.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkspaceCumulativeStatistics + +> TaskrouterV1WorkspaceWorkspaceCumulativeStatistics FetchWorkspaceCumulativeStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace to fetch. | + **optional** | ***FetchWorkspaceCumulativeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkspaceCumulativeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EndDate** | **optional.Time**| Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. | + +### Return type + +[**TaskrouterV1WorkspaceWorkspaceCumulativeStatistics**](taskrouter.v1.workspace.workspace_cumulative_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkspaceRealTimeStatistics + +> TaskrouterV1WorkspaceWorkspaceRealTimeStatistics FetchWorkspaceRealTimeStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace to fetch. | + **optional** | ***FetchWorkspaceRealTimeStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkspaceRealTimeStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **TaskChannel** | **optional.String**| Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkspaceRealTimeStatistics**](taskrouter.v1.workspace.workspace_real_time_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWorkspaceStatistics + +> TaskrouterV1WorkspaceWorkspaceStatistics FetchWorkspaceStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace to fetch. | + **optional** | ***FetchWorkspaceStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a FetchWorkspaceStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **TaskChannel** | **optional.String**| Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. | + +### Return type + +[**TaskrouterV1WorkspaceWorkspaceStatistics**](taskrouter.v1.workspace.workspace_statistics.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListActivity + +> ListActivityResponse ListActivity(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Activity resources to read. | + **optional** | ***ListActivityOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListActivityOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| The `friendly_name` of the Activity resources to read. | + **Available** | **optional.String**| Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListActivityResponse**](ListActivityResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEvent + +> ListEventResponse ListEvent(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Events to read. Returns only the Events that pertain to the specified Workspace. | + **optional** | ***ListEventOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEventOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EndDate** | **optional.Time**| Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **EventType** | **optional.String**| The type of Events to read. Returns only Events of the type specified. | + **Minutes** | **optional.Int32**| The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted. | + **ReservationSid** | **optional.String**| The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation. | + **StartDate** | **optional.Time**| Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted. | + **TaskQueueSid** | **optional.String**| The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue. | + **TaskSid** | **optional.String**| The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task. | + **WorkerSid** | **optional.String**| The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker. | + **WorkflowSid** | **optional.String**| The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow. | + **TaskChannel** | **optional.String**| The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel. | + **Sid** | **optional.String**| The SID of the Event resource to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEventResponse**](ListEventResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTask + +> ListTaskResponse ListTask(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Tasks to read. | + **optional** | ***ListTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Priority** | **optional.Int32**| The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority. | + **AssignmentStatus** | [**optional.Interface of []string**](string.md)| The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`. | + **WorkflowSid** | **optional.String**| The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID. | + **WorkflowName** | **optional.String**| The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name. | + **TaskQueueSid** | **optional.String**| The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID. | + **TaskQueueName** | **optional.String**| The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. | + **EvaluateTaskAttributes** | **optional.String**| The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. | + **Ordering** | **optional.String**| How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. | + **HasAddons** | **optional.Bool**| Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskResponse**](ListTaskResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTaskChannel + +> ListTaskChannelResponse ListTaskChannel(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task Channel to read. | + **optional** | ***ListTaskChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskChannelResponse**](ListTaskChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTaskQueue + +> ListTaskQueueResponse ListTaskQueue(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to read. | + **optional** | ***ListTaskQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| The `friendly_name` of the TaskQueue resources to read. | + **EvaluateWorkerAttributes** | **optional.String**| The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter. | + **WorkerSid** | **optional.String**| The SID of the Worker with the TaskQueue resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskQueueResponse**](ListTaskQueueResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTaskQueuesStatistics + +> ListTaskQueuesStatisticsResponse ListTaskQueuesStatistics(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueues to read. | + **optional** | ***ListTaskQueuesStatisticsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskQueuesStatisticsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EndDate** | **optional.Time**| Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time. | + **FriendlyName** | **optional.String**| The `friendly_name` of the TaskQueue statistics to read. | + **Minutes** | **optional.Int32**| Only calculate statistics since this many minutes in the past. The default is 15 minutes. | + **StartDate** | **optional.Time**| Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | + **TaskChannel** | **optional.String**| Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + **SplitByWaitTime** | **optional.String**| A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskQueuesStatisticsResponse**](ListTaskQueuesStatisticsResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTaskReservation + +> ListTaskReservationResponse ListTaskReservation(ctx, WorkspaceSid, TaskSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskReservation resources to read. | +**TaskSid** | **string**| The SID of the reserved Task resource with the TaskReservation resources to read. | + **optional** | ***ListTaskReservationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTaskReservationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ReservationStatus** | **optional.String**| Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTaskReservationResponse**](ListTaskReservationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorker + +> ListWorkerResponse ListWorker(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workers to read. | + **optional** | ***ListWorkerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWorkerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ActivityName** | **optional.String**| The `activity_name` of the Worker resources to read. | + **ActivitySid** | **optional.String**| The `activity_sid` of the Worker resources to read. | + **Available** | **optional.String**| Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available. | + **FriendlyName** | **optional.String**| The `friendly_name` of the Worker resources to read. | + **TargetWorkersExpression** | **optional.String**| Filter by Workers that would match an expression on a TaskQueue. This is helpful for debugging which Workers would match a potential queue. | + **TaskQueueName** | **optional.String**| The `friendly_name` of the TaskQueue that the Workers to read are eligible for. | + **TaskQueueSid** | **optional.String**| The SID of the TaskQueue that the Workers to read are eligible for. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWorkerResponse**](ListWorkerResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkerChannel + +> ListWorkerChannelResponse ListWorkerChannel(ctx, WorkspaceSid, WorkerSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerChannels to read. | +**WorkerSid** | **string**| The SID of the Worker with the WorkerChannels to read. | + **optional** | ***ListWorkerChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWorkerChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWorkerChannelResponse**](ListWorkerChannelResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkerReservation + +> ListWorkerReservationResponse ListWorkerReservation(ctx, WorkspaceSid, WorkerSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerReservation resources to read. | +**WorkerSid** | **string**| The SID of the reserved Worker resource with the WorkerReservation resources to read. | + **optional** | ***ListWorkerReservationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWorkerReservationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ReservationStatus** | **optional.String**| Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWorkerReservationResponse**](ListWorkerReservationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkflow + +> ListWorkflowResponse ListWorkflow(ctx, WorkspaceSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to read. | + **optional** | ***ListWorkflowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWorkflowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| The `friendly_name` of the Workflow resources to read. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWorkflowResponse**](ListWorkflowResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkspace + +> ListWorkspaceResponse ListWorkspace(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListWorkspaceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWorkspaceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWorkspaceResponse**](ListWorkspaceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateActivity + +> TaskrouterV1WorkspaceActivity UpdateActivity(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Activity resources to update. | +**Sid** | **string**| The SID of the Activity resource to update. | + **optional** | ***UpdateActivityOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateActivityOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. | + +### Return type + +[**TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTask + +> TaskrouterV1WorkspaceTask UpdateTask(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task to update. | +**Sid** | **string**| The SID of the Task resource to update. | + **optional** | ***UpdateTaskOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AssignmentStatus** | **optional.String**| The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state. | + **Attributes** | **optional.String**| The JSON string that describes the custom attributes of the task. | + **Priority** | **optional.Int32**| The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647). | + **Reason** | **optional.String**| The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. | + **TaskChannel** | **optional.String**| When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | + +### Return type + +[**TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTaskChannel + +> TaskrouterV1WorkspaceTaskChannel UpdateTaskChannel(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Task Channel to update. | +**Sid** | **string**| The SID of the Task Channel resource to update. | + **optional** | ***UpdateTaskChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ChannelOptimizedRouting** | **optional.Bool**| Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. | + +### Return type + +[**TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTaskQueue + +> TaskrouterV1WorkspaceTaskQueue UpdateTaskQueue(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskQueue to update. | +**Sid** | **string**| The SID of the TaskQueue resource to update. | + **optional** | ***UpdateTaskQueueOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskQueueOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AssignmentActivitySid** | **optional.String**| The SID of the Activity to assign Workers when a task is assigned for them. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. | + **MaxReservedWorkers** | **optional.Int32**| The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. | + **ReservationActivitySid** | **optional.String**| The SID of the Activity to assign Workers when a task is reserved for them. | + **TargetWorkers** | **optional.String**| A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. | + **TaskOrder** | **optional.String**| How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). | + +### Return type + +[**TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTaskReservation + +> TaskrouterV1WorkspaceTaskTaskReservation UpdateTaskReservation(ctx, WorkspaceSid, TaskSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the TaskReservation resources to update. | +**TaskSid** | **string**| The SID of the reserved Task resource with the TaskReservation resources to update. | +**Sid** | **string**| The SID of the TaskReservation resource to update. | + **optional** | ***UpdateTaskReservationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTaskReservationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Beep** | **optional.String**| Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | + **BeepOnCustomerEntrance** | **optional.Bool**| Whether to play a notification beep when the customer joins. | + **CallAccept** | **optional.Bool**| Whether to accept a reservation when executing a Call instruction. | + **CallFrom** | **optional.String**| The Caller ID of the outbound call when executing a Call instruction. | + **CallRecord** | **optional.String**| Whether to record both legs of a call when executing a Call instruction or which leg to record. | + **CallStatusCallbackUrl** | **optional.String**| The URL to call for the completed call event when executing a Call instruction. | + **CallTimeout** | **optional.Int32**| Timeout for call when executing a Call instruction. | + **CallTo** | **optional.String**| The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **CallUrl** | **optional.String**| TwiML URI executed on answering the worker's leg as a result of the Call instruction. | + **ConferenceRecord** | **optional.String**| Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | + **ConferenceRecordingStatusCallback** | **optional.String**| The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | + **ConferenceRecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceStatusCallback** | **optional.String**| The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | + **ConferenceStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. | + **ConferenceStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceTrim** | **optional.String**| How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | + **DequeueFrom** | **optional.String**| The Caller ID of the call to the worker when executing a Dequeue instruction. | + **DequeuePostWorkActivitySid** | **optional.String**| The SID of the Activity resource to start after executing a Dequeue instruction. | + **DequeueRecord** | **optional.String**| Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. | + **DequeueStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The Call progress events sent via webhooks as a result of a Dequeue instruction. | + **DequeueStatusCallbackUrl** | **optional.String**| The Callback URL for completed call event when executing a Dequeue instruction. | + **DequeueTimeout** | **optional.Int32**| Timeout for call when executing a Dequeue instruction. | + **DequeueTo** | **optional.String**| The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **EarlyMedia** | **optional.Bool**| Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. | + **EndConferenceOnCustomerExit** | **optional.Bool**| Whether to end the conference when the customer leaves. | + **EndConferenceOnExit** | **optional.Bool**| Whether to end the conference when the agent leaves. | + **From** | **optional.String**| The Caller ID of the call to the worker when executing a Conference instruction. | + **Instruction** | **optional.String**| The assignment instruction for reservation. | + **MaxParticipants** | **optional.Int32**| The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | + **Muted** | **optional.Bool**| Whether the agent is muted in the conference. The default is `false`. | + **PostWorkActivitySid** | **optional.String**| The new worker activity SID after executing a Conference instruction. | + **Record** | **optional.Bool**| Whether to record the participant and their conferences, including the time between conferences. The default is `false`. | + **RecordingChannels** | **optional.String**| The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | + **RecordingStatusCallback** | **optional.String**| The URL that we should call using the `recording_status_callback_method` when the recording status changes. | + **RecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **RedirectAccept** | **optional.Bool**| Whether the reservation should be accepted when executing a Redirect instruction. | + **RedirectCallSid** | **optional.String**| The Call SID of the call parked in the queue when executing a Redirect instruction. | + **RedirectUrl** | **optional.String**| TwiML URI to redirect the call to when executing the Redirect instruction. | + **Region** | **optional.String**| The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | + **ReservationStatus** | **optional.String**| The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`. | + **SipAuthPassword** | **optional.String**| The SIP password for authentication. | + **SipAuthUsername** | **optional.String**| The SIP username used for authentication. | + **StartConferenceOnEnter** | **optional.Bool**| Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | + **Supervisor** | **optional.String**| The Supervisor SID/URI when executing the Supervise instruction. | + **SupervisorMode** | **optional.String**| The Supervisor mode when executing the Supervise instruction. | + **Timeout** | **optional.Int32**| Timeout for call when executing a Conference instruction. | + **To** | **optional.String**| The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **WaitMethod** | **optional.String**| The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | + **WaitUrl** | **optional.String**| The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | + **WorkerActivitySid** | **optional.String**| The new worker activity SID if rejecting a reservation. | + +### Return type + +[**TaskrouterV1WorkspaceTaskTaskReservation**](taskrouter.v1.workspace.task.task_reservation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorker + +> TaskrouterV1WorkspaceWorker UpdateWorker(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Worker to update. | +**Sid** | **string**| The SID of the Worker resource to update. | + **optional** | ***UpdateWorkerOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWorkerOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ActivitySid** | **optional.String**| The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. | + **Attributes** | **optional.String**| The JSON string that describes the Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Worker. It can be up to 64 characters long. | + **RejectPendingReservations** | **optional.Bool**| Whether to reject pending reservations. | + +### Return type + +[**TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkerChannel + +> TaskrouterV1WorkspaceWorkerWorkerChannel UpdateWorkerChannel(ctx, WorkspaceSid, WorkerSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerChannel to update. | +**WorkerSid** | **string**| The SID of the Worker with the WorkerChannel to update. | +**Sid** | **string**| The SID of the WorkerChannel to update. | + **optional** | ***UpdateWorkerChannelOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWorkerChannelOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Available** | **optional.Bool**| Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. | + **Capacity** | **optional.Int32**| The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerChannel**](taskrouter.v1.workspace.worker.worker_channel.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkerReservation + +> TaskrouterV1WorkspaceWorkerWorkerReservation UpdateWorkerReservation(ctx, WorkspaceSid, WorkerSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the WorkerReservation resources to update. | +**WorkerSid** | **string**| The SID of the reserved Worker resource with the WorkerReservation resources to update. | +**Sid** | **string**| The SID of the WorkerReservation resource to update. | + **optional** | ***UpdateWorkerReservationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWorkerReservationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Beep** | **optional.String**| Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | + **BeepOnCustomerEntrance** | **optional.Bool**| Whether to play a notification beep when the customer joins. | + **CallAccept** | **optional.Bool**| Whether to accept a reservation when executing a Call instruction. | + **CallFrom** | **optional.String**| The Caller ID of the outbound call when executing a Call instruction. | + **CallRecord** | **optional.String**| Whether to record both legs of a call when executing a Call instruction. | + **CallStatusCallbackUrl** | **optional.String**| The URL to call for the completed call event when executing a Call instruction. | + **CallTimeout** | **optional.Int32**| The timeout for a call when executing a Call instruction. | + **CallTo** | **optional.String**| The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **CallUrl** | **optional.String**| TwiML URI executed on answering the worker's leg as a result of the Call instruction. | + **ConferenceRecord** | **optional.String**| Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | + **ConferenceRecordingStatusCallback** | **optional.String**| The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | + **ConferenceRecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceStatusCallback** | **optional.String**| The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | + **ConferenceStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. | + **ConferenceStatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **ConferenceTrim** | **optional.String**| Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | + **DequeueFrom** | **optional.String**| The caller ID of the call to the worker when executing a Dequeue instruction. | + **DequeuePostWorkActivitySid** | **optional.String**| The SID of the Activity resource to start after executing a Dequeue instruction. | + **DequeueRecord** | **optional.String**| Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. | + **DequeueStatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The call progress events sent via webhooks as a result of a Dequeue instruction. | + **DequeueStatusCallbackUrl** | **optional.String**| The callback URL for completed call event when executing a Dequeue instruction. | + **DequeueTimeout** | **optional.Int32**| The timeout for call when executing a Dequeue instruction. | + **DequeueTo** | **optional.String**| The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **EarlyMedia** | **optional.Bool**| Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. | + **EndConferenceOnCustomerExit** | **optional.Bool**| Whether to end the conference when the customer leaves. | + **EndConferenceOnExit** | **optional.Bool**| Whether to end the conference when the agent leaves. | + **From** | **optional.String**| The caller ID of the call to the worker when executing a Conference instruction. | + **Instruction** | **optional.String**| The assignment instruction for the reservation. | + **MaxParticipants** | **optional.Int32**| The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | + **Muted** | **optional.Bool**| Whether the agent is muted in the conference. Defaults to `false`. | + **PostWorkActivitySid** | **optional.String**| The new worker activity SID after executing a Conference instruction. | + **Record** | **optional.Bool**| Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. | + **RecordingChannels** | **optional.String**| The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | + **RecordingStatusCallback** | **optional.String**| The URL that we should call using the `recording_status_callback_method` when the recording status changes. | + **RecordingStatusCallbackMethod** | **optional.String**| The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | + **RedirectAccept** | **optional.Bool**| Whether the reservation should be accepted when executing a Redirect instruction. | + **RedirectCallSid** | **optional.String**| The Call SID of the call parked in the queue when executing a Redirect instruction. | + **RedirectUrl** | **optional.String**| TwiML URI to redirect the call to when executing the Redirect instruction. | + **Region** | **optional.String**| The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | + **ReservationStatus** | **optional.String**| The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. | + **SipAuthPassword** | **optional.String**| The SIP password for authentication. | + **SipAuthUsername** | **optional.String**| The SIP username used for authentication. | + **StartConferenceOnEnter** | **optional.Bool**| Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application. | + **StatusCallbackEvent** | [**optional.Interface of []string**](string.md)| The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | + **Timeout** | **optional.Int32**| The timeout for a call when executing a Conference instruction. | + **To** | **optional.String**| The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | + **WaitMethod** | **optional.String**| The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | + **WaitUrl** | **optional.String**| The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | + **WorkerActivitySid** | **optional.String**| The new worker activity SID if rejecting a reservation. | + +### Return type + +[**TaskrouterV1WorkspaceWorkerWorkerReservation**](taskrouter.v1.workspace.worker.worker_reservation.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkflow + +> TaskrouterV1WorkspaceWorkflow UpdateWorkflow(ctx, WorkspaceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**WorkspaceSid** | **string**| The SID of the Workspace with the Workflow to update. | +**Sid** | **string**| The SID of the Workflow resource to update. | + **optional** | ***UpdateWorkflowOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWorkflowOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **AssignmentCallbackUrl** | **optional.String**| The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. | + **Configuration** | **optional.String**| A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. | + **FallbackAssignmentCallbackUrl** | **optional.String**| The URL that we should call when a call to the `assignment_callback_url` fails. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. | + **ReEvaluateTasks** | **optional.String**| Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. | + **TaskReservationTimeout** | **optional.Int32**| How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. | + +### Return type + +[**TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkspace + +> TaskrouterV1Workspace UpdateWorkspace(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Workspace resource to update. | + **optional** | ***UpdateWorkspaceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWorkspaceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **DefaultActivitySid** | **optional.String**| The SID of the Activity that will be used when new Workers are created in the Workspace. | + **EventCallbackUrl** | **optional.String**| The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. | + **EventsFilter** | **optional.String**| The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`. | + **MultiTaskEnabled** | **optional.Bool**| Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. | + **PrioritizeQueueOrder** | **optional.String**| The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. | + **TimeoutActivitySid** | **optional.String**| The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. | + +### Return type + +[**TaskrouterV1Workspace**](taskrouter.v1.workspace.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/taskrouter/v1/docs/ListActivityResponse.md b/rest/taskrouter/v1/docs/ListActivityResponse.md new file mode 100644 index 000000000..60af47137 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListActivityResponse.md @@ -0,0 +1,12 @@ +# ListActivityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Activities** | [**[]TaskrouterV1WorkspaceActivity**](taskrouter.v1.workspace.activity.md) | | [optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListEventResponse.md b/rest/taskrouter/v1/docs/ListEventResponse.md new file mode 100644 index 000000000..3656ceb6d --- /dev/null +++ b/rest/taskrouter/v1/docs/ListEventResponse.md @@ -0,0 +1,12 @@ +# ListEventResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]TaskrouterV1WorkspaceEvent**](taskrouter.v1.workspace.event.md) | | [optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListTaskChannelResponse.md b/rest/taskrouter/v1/docs/ListTaskChannelResponse.md new file mode 100644 index 000000000..d2ac76963 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListTaskChannelResponse.md @@ -0,0 +1,12 @@ +# ListTaskChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]TaskrouterV1WorkspaceTaskChannel**](taskrouter.v1.workspace.task_channel.md) | | [optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListTaskQueueResponse.md b/rest/taskrouter/v1/docs/ListTaskQueueResponse.md new file mode 100644 index 000000000..6ec6111ea --- /dev/null +++ b/rest/taskrouter/v1/docs/ListTaskQueueResponse.md @@ -0,0 +1,12 @@ +# ListTaskQueueResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**TaskQueues** | [**[]TaskrouterV1WorkspaceTaskQueue**](taskrouter.v1.workspace.task_queue.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md b/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md new file mode 100644 index 000000000..6861016b8 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListTaskQueuesStatisticsResponse.md @@ -0,0 +1,12 @@ +# ListTaskQueuesStatisticsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**TaskQueuesStatistics** | [**[]TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics**](taskrouter.v1.workspace.task_queue.task_queues_statistics.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListTaskReservationResponse.md b/rest/taskrouter/v1/docs/ListTaskReservationResponse.md new file mode 100644 index 000000000..50413b6e0 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListTaskReservationResponse.md @@ -0,0 +1,12 @@ +# ListTaskReservationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Reservations** | [**[]TaskrouterV1WorkspaceTaskTaskReservation**](taskrouter.v1.workspace.task.task_reservation.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListTaskResponse.md b/rest/taskrouter/v1/docs/ListTaskResponse.md new file mode 100644 index 000000000..c22bc5a53 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListTaskResponse.md @@ -0,0 +1,12 @@ +# ListTaskResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Tasks** | [**[]TaskrouterV1WorkspaceTask**](taskrouter.v1.workspace.task.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md b/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md new file mode 100644 index 000000000..97347db8a --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkerChannelResponse.md @@ -0,0 +1,12 @@ +# ListWorkerChannelResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Channels** | [**[]TaskrouterV1WorkspaceWorkerWorkerChannel**](taskrouter.v1.workspace.worker.worker_channel.md) | | [optional] +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md b/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md new file mode 100644 index 000000000..5e20df80f --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkerReservationResponse.md @@ -0,0 +1,12 @@ +# ListWorkerReservationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Reservations** | [**[]TaskrouterV1WorkspaceWorkerWorkerReservation**](taskrouter.v1.workspace.worker.worker_reservation.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkerResponse.md b/rest/taskrouter/v1/docs/ListWorkerResponse.md new file mode 100644 index 000000000..128f9808a --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkerResponse.md @@ -0,0 +1,12 @@ +# ListWorkerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Workers** | [**[]TaskrouterV1WorkspaceWorker**](taskrouter.v1.workspace.worker.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkflowResponse.md b/rest/taskrouter/v1/docs/ListWorkflowResponse.md new file mode 100644 index 000000000..17838a642 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkflowResponse.md @@ -0,0 +1,12 @@ +# ListWorkflowResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Workflows** | [**[]TaskrouterV1WorkspaceWorkflow**](taskrouter.v1.workspace.workflow.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkspaceResponse.md b/rest/taskrouter/v1/docs/ListWorkspaceResponse.md new file mode 100644 index 000000000..ddd8368f0 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkspaceResponse.md @@ -0,0 +1,12 @@ +# ListWorkspaceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListWorkspaceResponseMeta**](ListWorkspaceResponse_meta.md) | | [optional] +**Workspaces** | [**[]TaskrouterV1Workspace**](taskrouter.v1.workspace.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md b/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md new file mode 100644 index 000000000..783eb99b0 --- /dev/null +++ b/rest/taskrouter/v1/docs/ListWorkspaceResponseMeta.md @@ -0,0 +1,17 @@ +# ListWorkspaceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md b/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md new file mode 100644 index 000000000..746bac298 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1Workspace.md @@ -0,0 +1,25 @@ +# TaskrouterV1Workspace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DefaultActivityName** | **string** | | [optional] +**DefaultActivitySid** | **string** | | [optional] +**EventCallbackUrl** | **string** | | [optional] +**EventsFilter** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MultiTaskEnabled** | **bool** | | [optional] +**PrioritizeQueueOrder** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TimeoutActivityName** | **string** | | [optional] +**TimeoutActivitySid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md new file mode 100644 index 000000000..678ab2d20 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceActivity.md @@ -0,0 +1,18 @@ +# TaskrouterV1WorkspaceActivity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Available** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md new file mode 100644 index 000000000..c3dcf515d --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceEvent.md @@ -0,0 +1,27 @@ +# TaskrouterV1WorkspaceEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActorSid** | **string** | | [optional] +**ActorType** | **string** | | [optional] +**ActorUrl** | **string** | | [optional] +**Description** | **string** | | [optional] +**EventData** | [**map[string]interface{}**](.md) | | [optional] +**EventDate** | [**time.Time**](time.Time.md) | | [optional] +**EventDateMs** | **int32** | | [optional] +**EventType** | **string** | | [optional] +**ResourceSid** | **string** | | [optional] +**ResourceType** | **string** | | [optional] +**ResourceUrl** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Source** | **string** | | [optional] +**SourceIpAddress** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md new file mode 100644 index 000000000..66caa5a65 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTask.md @@ -0,0 +1,31 @@ +# TaskrouterV1WorkspaceTask + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Addons** | **string** | | [optional] +**Age** | **int32** | | [optional] +**AssignmentStatus** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Priority** | **int32** | | [optional] +**Reason** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskChannelSid** | **string** | | [optional] +**TaskChannelUniqueName** | **string** | | [optional] +**TaskQueueEnteredDate** | [**time.Time**](time.Time.md) | | [optional] +**TaskQueueFriendlyName** | **string** | | [optional] +**TaskQueueSid** | **string** | | [optional] +**Timeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkflowFriendlyName** | **string** | | [optional] +**WorkflowSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md new file mode 100644 index 000000000..d8f226c07 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskChannel.md @@ -0,0 +1,20 @@ +# TaskrouterV1WorkspaceTaskChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ChannelOptimizedRouting** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md new file mode 100644 index 000000000..771e51f88 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueue.md @@ -0,0 +1,25 @@ +# TaskrouterV1WorkspaceTaskQueue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssignmentActivityName** | **string** | | [optional] +**AssignmentActivitySid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MaxReservedWorkers** | **int32** | | [optional] +**ReservationActivityName** | **string** | | [optional] +**ReservationActivitySid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TargetWorkers** | **string** | | [optional] +**TaskOrder** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md new file mode 100644 index 000000000..c471c7f9d --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics.md @@ -0,0 +1,32 @@ +# TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AvgTaskAcceptanceTime** | **int32** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**ReservationsAccepted** | **int32** | | [optional] +**ReservationsCanceled** | **int32** | | [optional] +**ReservationsCreated** | **int32** | | [optional] +**ReservationsRejected** | **int32** | | [optional] +**ReservationsRescinded** | **int32** | | [optional] +**ReservationsTimedOut** | **int32** | | [optional] +**SplitByWaitTime** | [**map[string]interface{}**](.md) | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**TaskQueueSid** | **string** | | [optional] +**TasksCanceled** | **int32** | | [optional] +**TasksCompleted** | **int32** | | [optional] +**TasksDeleted** | **int32** | | [optional] +**TasksEntered** | **int32** | | [optional] +**TasksMoved** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WaitDurationInQueueUntilAccepted** | [**map[string]interface{}**](.md) | | [optional] +**WaitDurationUntilAccepted** | [**map[string]interface{}**](.md) | | [optional] +**WaitDurationUntilCanceled** | [**map[string]interface{}**](.md) | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md new file mode 100644 index 000000000..2f5de69b9 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics.md @@ -0,0 +1,24 @@ +# TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActivityStatistics** | **[]map[string]interface{}** | | [optional] +**LongestRelativeTaskAgeInQueue** | **int32** | | [optional] +**LongestRelativeTaskSidInQueue** | **string** | | [optional] +**LongestTaskWaitingAge** | **int32** | | [optional] +**LongestTaskWaitingSid** | **string** | | [optional] +**TaskQueueSid** | **string** | | [optional] +**TasksByPriority** | [**map[string]interface{}**](.md) | | [optional] +**TasksByStatus** | [**map[string]interface{}**](.md) | | [optional] +**TotalAvailableWorkers** | **int32** | | [optional] +**TotalEligibleWorkers** | **int32** | | [optional] +**TotalTasks** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md new file mode 100644 index 000000000..44254d74a --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics.md @@ -0,0 +1,16 @@ +# TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Realtime** | [**map[string]interface{}**](.md) | | [optional] +**TaskQueueSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md new file mode 100644 index 000000000..3c9b6a5a9 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics.md @@ -0,0 +1,15 @@ +# TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Realtime** | [**map[string]interface{}**](.md) | | [optional] +**TaskQueueSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md new file mode 100644 index 000000000..0f2822b33 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceTaskTaskReservation.md @@ -0,0 +1,21 @@ +# TaskrouterV1WorkspaceTaskTaskReservation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ReservationStatus** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkerName** | **string** | | [optional] +**WorkerSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md new file mode 100644 index 000000000..878bae94d --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorker.md @@ -0,0 +1,23 @@ +# TaskrouterV1WorkspaceWorker + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActivityName** | **string** | | [optional] +**ActivitySid** | **string** | | [optional] +**Attributes** | **string** | | [optional] +**Available** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateStatusChanged** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md new file mode 100644 index 000000000..b64410b37 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerChannel.md @@ -0,0 +1,23 @@ +# TaskrouterV1WorkspaceWorkerWorkerChannel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssignedTasks** | **int32** | | [optional] +**Available** | **bool** | | [optional] +**AvailableCapacityPercentage** | **int32** | | [optional] +**ConfiguredCapacity** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Sid** | **string** | | [optional] +**TaskChannelSid** | **string** | | [optional] +**TaskChannelUniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkerSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md new file mode 100644 index 000000000..e624f3612 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics.md @@ -0,0 +1,15 @@ +# TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] +**WorkerSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md new file mode 100644 index 000000000..26a720ee1 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerReservation.md @@ -0,0 +1,21 @@ +# TaskrouterV1WorkspaceWorkerWorkerReservation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**ReservationStatus** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TaskSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**WorkerName** | **string** | | [optional] +**WorkerSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md new file mode 100644 index 000000000..8c0ba8e1b --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkerStatistics.md @@ -0,0 +1,15 @@ +# TaskrouterV1WorkspaceWorkerWorkerStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Realtime** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md new file mode 100644 index 000000000..79765d3cb --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics.md @@ -0,0 +1,22 @@ +# TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActivityDurations** | **[]map[string]interface{}** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**ReservationsAccepted** | **int32** | | [optional] +**ReservationsCanceled** | **int32** | | [optional] +**ReservationsCreated** | **int32** | | [optional] +**ReservationsRejected** | **int32** | | [optional] +**ReservationsRescinded** | **int32** | | [optional] +**ReservationsTimedOut** | **int32** | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md new file mode 100644 index 000000000..012a19684 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics.md @@ -0,0 +1,15 @@ +# TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActivityStatistics** | **[]map[string]interface{}** | | [optional] +**TotalWorkers** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md new file mode 100644 index 000000000..d24a51fdf --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflow.md @@ -0,0 +1,23 @@ +# TaskrouterV1WorkspaceWorkflow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AssignmentCallbackUrl** | **string** | | [optional] +**Configuration** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DocumentContentType** | **string** | | [optional] +**FallbackAssignmentCallbackUrl** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**TaskReservationTimeout** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md new file mode 100644 index 000000000..f84e63367 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics.md @@ -0,0 +1,32 @@ +# TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AvgTaskAcceptanceTime** | **int32** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**ReservationsAccepted** | **int32** | | [optional] +**ReservationsCanceled** | **int32** | | [optional] +**ReservationsCreated** | **int32** | | [optional] +**ReservationsRejected** | **int32** | | [optional] +**ReservationsRescinded** | **int32** | | [optional] +**ReservationsTimedOut** | **int32** | | [optional] +**SplitByWaitTime** | [**map[string]interface{}**](.md) | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**TasksCanceled** | **int32** | | [optional] +**TasksCompleted** | **int32** | | [optional] +**TasksDeleted** | **int32** | | [optional] +**TasksEntered** | **int32** | | [optional] +**TasksMoved** | **int32** | | [optional] +**TasksTimedOutInWorkflow** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WaitDurationUntilAccepted** | [**map[string]interface{}**](.md) | | [optional] +**WaitDurationUntilCanceled** | [**map[string]interface{}**](.md) | | [optional] +**WorkflowSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md new file mode 100644 index 000000000..7805da399 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics.md @@ -0,0 +1,19 @@ +# TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**LongestTaskWaitingAge** | **int32** | | [optional] +**LongestTaskWaitingSid** | **string** | | [optional] +**TasksByPriority** | [**map[string]interface{}**](.md) | | [optional] +**TasksByStatus** | [**map[string]interface{}**](.md) | | [optional] +**TotalTasks** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkflowSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md new file mode 100644 index 000000000..5c20a982e --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkflowWorkflowStatistics.md @@ -0,0 +1,16 @@ +# TaskrouterV1WorkspaceWorkflowWorkflowStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Realtime** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] +**WorkflowSid** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md new file mode 100644 index 000000000..18df1e090 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceCumulativeStatistics.md @@ -0,0 +1,31 @@ +# TaskrouterV1WorkspaceWorkspaceCumulativeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AvgTaskAcceptanceTime** | **int32** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**ReservationsAccepted** | **int32** | | [optional] +**ReservationsCanceled** | **int32** | | [optional] +**ReservationsCreated** | **int32** | | [optional] +**ReservationsRejected** | **int32** | | [optional] +**ReservationsRescinded** | **int32** | | [optional] +**ReservationsTimedOut** | **int32** | | [optional] +**SplitByWaitTime** | [**map[string]interface{}**](.md) | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**TasksCanceled** | **int32** | | [optional] +**TasksCompleted** | **int32** | | [optional] +**TasksCreated** | **int32** | | [optional] +**TasksDeleted** | **int32** | | [optional] +**TasksMoved** | **int32** | | [optional] +**TasksTimedOutInWorkflow** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WaitDurationUntilAccepted** | [**map[string]interface{}**](.md) | | [optional] +**WaitDurationUntilCanceled** | [**map[string]interface{}**](.md) | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md new file mode 100644 index 000000000..dd6e5b66b --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceRealTimeStatistics.md @@ -0,0 +1,20 @@ +# TaskrouterV1WorkspaceWorkspaceRealTimeStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ActivityStatistics** | **[]map[string]interface{}** | | [optional] +**LongestTaskWaitingAge** | **int32** | | [optional] +**LongestTaskWaitingSid** | **string** | | [optional] +**TasksByPriority** | [**map[string]interface{}**](.md) | | [optional] +**TasksByStatus** | [**map[string]interface{}**](.md) | | [optional] +**TotalTasks** | **int32** | | [optional] +**TotalWorkers** | **int32** | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md new file mode 100644 index 000000000..c7f7d5e34 --- /dev/null +++ b/rest/taskrouter/v1/docs/TaskrouterV1WorkspaceWorkspaceStatistics.md @@ -0,0 +1,15 @@ +# TaskrouterV1WorkspaceWorkspaceStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Cumulative** | [**map[string]interface{}**](.md) | | [optional] +**Realtime** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] +**WorkspaceSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateActivityRequest.md b/rest/taskrouter/v1/docs/UpdateActivityRequest.md new file mode 100644 index 000000000..c472efa00 --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateActivityRequest.md @@ -0,0 +1,11 @@ +# UpdateActivityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateTaskChannelRequest.md b/rest/taskrouter/v1/docs/UpdateTaskChannelRequest.md new file mode 100644 index 000000000..e00b03fab --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateTaskChannelRequest.md @@ -0,0 +1,12 @@ +# UpdateTaskChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChannelOptimizedRouting** | **bool** | Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateTaskQueueRequest.md b/rest/taskrouter/v1/docs/UpdateTaskQueueRequest.md new file mode 100644 index 000000000..8942b98e9 --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateTaskQueueRequest.md @@ -0,0 +1,16 @@ +# UpdateTaskQueueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignmentActivitySid** | **string** | The SID of the Activity to assign Workers when a task is assigned for them. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. | [optional] +**MaxReservedWorkers** | **int32** | The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. | [optional] +**ReservationActivitySid** | **string** | The SID of the Activity to assign Workers when a task is reserved for them. | [optional] +**TargetWorkers** | **string** | A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\"language\" == \"spanish\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. | [optional] +**TaskOrder** | **string** | How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateTaskRequest.md b/rest/taskrouter/v1/docs/UpdateTaskRequest.md new file mode 100644 index 000000000..a179b651f --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateTaskRequest.md @@ -0,0 +1,15 @@ +# UpdateTaskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignmentStatus** | **string** | The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state. | [optional] +**Attributes** | **string** | The JSON string that describes the custom attributes of the task. | [optional] +**Priority** | **int32** | The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647). | [optional] +**Reason** | **string** | The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. | [optional] +**TaskChannel** | **string** | When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateTaskReservationRequest.md b/rest/taskrouter/v1/docs/UpdateTaskReservationRequest.md new file mode 100644 index 000000000..2b27ab0a4 --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateTaskReservationRequest.md @@ -0,0 +1,63 @@ +# UpdateTaskReservationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Beep** | **string** | Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | [optional] +**BeepOnCustomerEntrance** | **bool** | Whether to play a notification beep when the customer joins. | [optional] +**CallAccept** | **bool** | Whether to accept a reservation when executing a Call instruction. | [optional] +**CallFrom** | **string** | The Caller ID of the outbound call when executing a Call instruction. | [optional] +**CallRecord** | **string** | Whether to record both legs of a call when executing a Call instruction or which leg to record. | [optional] +**CallStatusCallbackUrl** | **string** | The URL to call for the completed call event when executing a Call instruction. | [optional] +**CallTimeout** | **int32** | Timeout for call when executing a Call instruction. | [optional] +**CallTo** | **string** | The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**CallUrl** | **string** | TwiML URI executed on answering the worker's leg as a result of the Call instruction. | [optional] +**ConferenceRecord** | **string** | Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | [optional] +**ConferenceRecordingStatusCallback** | **string** | The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | [optional] +**ConferenceRecordingStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceStatusCallback** | **string** | The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | [optional] +**ConferenceStatusCallbackEvent** | **[]string** | The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. | [optional] +**ConferenceStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceTrim** | **string** | How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | [optional] +**DequeueFrom** | **string** | The Caller ID of the call to the worker when executing a Dequeue instruction. | [optional] +**DequeuePostWorkActivitySid** | **string** | The SID of the Activity resource to start after executing a Dequeue instruction. | [optional] +**DequeueRecord** | **string** | Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. | [optional] +**DequeueStatusCallbackEvent** | **[]string** | The Call progress events sent via webhooks as a result of a Dequeue instruction. | [optional] +**DequeueStatusCallbackUrl** | **string** | The Callback URL for completed call event when executing a Dequeue instruction. | [optional] +**DequeueTimeout** | **int32** | Timeout for call when executing a Dequeue instruction. | [optional] +**DequeueTo** | **string** | The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**EarlyMedia** | **bool** | Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. | [optional] +**EndConferenceOnCustomerExit** | **bool** | Whether to end the conference when the customer leaves. | [optional] +**EndConferenceOnExit** | **bool** | Whether to end the conference when the agent leaves. | [optional] +**From** | **string** | The Caller ID of the call to the worker when executing a Conference instruction. | [optional] +**Instruction** | **string** | The assignment instruction for reservation. | [optional] +**MaxParticipants** | **int32** | The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | [optional] +**Muted** | **bool** | Whether the agent is muted in the conference. The default is `false`. | [optional] +**PostWorkActivitySid** | **string** | The new worker activity SID after executing a Conference instruction. | [optional] +**Record** | **bool** | Whether to record the participant and their conferences, including the time between conferences. The default is `false`. | [optional] +**RecordingChannels** | **string** | The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | [optional] +**RecordingStatusCallback** | **string** | The URL that we should call using the `recording_status_callback_method` when the recording status changes. | [optional] +**RecordingStatusCallbackMethod** | **string** | The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**RedirectAccept** | **bool** | Whether the reservation should be accepted when executing a Redirect instruction. | [optional] +**RedirectCallSid** | **string** | The Call SID of the call parked in the queue when executing a Redirect instruction. | [optional] +**RedirectUrl** | **string** | TwiML URI to redirect the call to when executing the Redirect instruction. | [optional] +**Region** | **string** | The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | [optional] +**ReservationStatus** | **string** | The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`. | [optional] +**SipAuthPassword** | **string** | The SIP password for authentication. | [optional] +**SipAuthUsername** | **string** | The SIP username used for authentication. | [optional] +**StartConferenceOnEnter** | **bool** | Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackEvent** | **[]string** | The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | [optional] +**Supervisor** | **string** | The Supervisor SID/URI when executing the Supervise instruction. | [optional] +**SupervisorMode** | **string** | The Supervisor mode when executing the Supervise instruction. | [optional] +**Timeout** | **int32** | Timeout for call when executing a Conference instruction. | [optional] +**To** | **string** | The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**WaitMethod** | **string** | The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | [optional] +**WaitUrl** | **string** | The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | [optional] +**WorkerActivitySid** | **string** | The new worker activity SID if rejecting a reservation. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateWorkerChannelRequest.md b/rest/taskrouter/v1/docs/UpdateWorkerChannelRequest.md new file mode 100644 index 000000000..4b7fa1dbb --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateWorkerChannelRequest.md @@ -0,0 +1,12 @@ +# UpdateWorkerChannelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Available** | **bool** | Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. | [optional] +**Capacity** | **int32** | The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateWorkerRequest.md b/rest/taskrouter/v1/docs/UpdateWorkerRequest.md new file mode 100644 index 000000000..d14f39a62 --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateWorkerRequest.md @@ -0,0 +1,14 @@ +# UpdateWorkerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActivitySid** | **string** | The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. | [optional] +**Attributes** | **string** | The JSON string that describes the Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Worker. It can be up to 64 characters long. | [optional] +**RejectPendingReservations** | **bool** | Whether to reject pending reservations. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateWorkerReservationRequest.md b/rest/taskrouter/v1/docs/UpdateWorkerReservationRequest.md new file mode 100644 index 000000000..ec7ae9a8d --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateWorkerReservationRequest.md @@ -0,0 +1,61 @@ +# UpdateWorkerReservationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Beep** | **string** | Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. | [optional] +**BeepOnCustomerEntrance** | **bool** | Whether to play a notification beep when the customer joins. | [optional] +**CallAccept** | **bool** | Whether to accept a reservation when executing a Call instruction. | [optional] +**CallFrom** | **string** | The Caller ID of the outbound call when executing a Call instruction. | [optional] +**CallRecord** | **string** | Whether to record both legs of a call when executing a Call instruction. | [optional] +**CallStatusCallbackUrl** | **string** | The URL to call for the completed call event when executing a Call instruction. | [optional] +**CallTimeout** | **int32** | The timeout for a call when executing a Call instruction. | [optional] +**CallTo** | **string** | The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**CallUrl** | **string** | TwiML URI executed on answering the worker's leg as a result of the Call instruction. | [optional] +**ConferenceRecord** | **string** | Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. | [optional] +**ConferenceRecordingStatusCallback** | **string** | The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. | [optional] +**ConferenceRecordingStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceStatusCallback** | **string** | The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. | [optional] +**ConferenceStatusCallbackEvent** | **[]string** | The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. | [optional] +**ConferenceStatusCallbackMethod** | **string** | The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**ConferenceTrim** | **string** | Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. | [optional] +**DequeueFrom** | **string** | The caller ID of the call to the worker when executing a Dequeue instruction. | [optional] +**DequeuePostWorkActivitySid** | **string** | The SID of the Activity resource to start after executing a Dequeue instruction. | [optional] +**DequeueRecord** | **string** | Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. | [optional] +**DequeueStatusCallbackEvent** | **[]string** | The call progress events sent via webhooks as a result of a Dequeue instruction. | [optional] +**DequeueStatusCallbackUrl** | **string** | The callback URL for completed call event when executing a Dequeue instruction. | [optional] +**DequeueTimeout** | **int32** | The timeout for call when executing a Dequeue instruction. | [optional] +**DequeueTo** | **string** | The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**EarlyMedia** | **bool** | Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. | [optional] +**EndConferenceOnCustomerExit** | **bool** | Whether to end the conference when the customer leaves. | [optional] +**EndConferenceOnExit** | **bool** | Whether to end the conference when the agent leaves. | [optional] +**From** | **string** | The caller ID of the call to the worker when executing a Conference instruction. | [optional] +**Instruction** | **string** | The assignment instruction for the reservation. | [optional] +**MaxParticipants** | **int32** | The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. | [optional] +**Muted** | **bool** | Whether the agent is muted in the conference. Defaults to `false`. | [optional] +**PostWorkActivitySid** | **string** | The new worker activity SID after executing a Conference instruction. | [optional] +**Record** | **bool** | Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. | [optional] +**RecordingChannels** | **string** | The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. | [optional] +**RecordingStatusCallback** | **string** | The URL that we should call using the `recording_status_callback_method` when the recording status changes. | [optional] +**RecordingStatusCallbackMethod** | **string** | The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. | [optional] +**RedirectAccept** | **bool** | Whether the reservation should be accepted when executing a Redirect instruction. | [optional] +**RedirectCallSid** | **string** | The Call SID of the call parked in the queue when executing a Redirect instruction. | [optional] +**RedirectUrl** | **string** | TwiML URI to redirect the call to when executing the Redirect instruction. | [optional] +**Region** | **string** | The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. | [optional] +**ReservationStatus** | **string** | The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. | [optional] +**SipAuthPassword** | **string** | The SIP password for authentication. | [optional] +**SipAuthUsername** | **string** | The SIP username used for authentication. | [optional] +**StartConferenceOnEnter** | **bool** | Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application. | [optional] +**StatusCallbackEvent** | **[]string** | The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | [optional] +**Timeout** | **int32** | The timeout for a call when executing a Conference instruction. | [optional] +**To** | **string** | The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. | [optional] +**WaitMethod** | **string** | The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. | [optional] +**WaitUrl** | **string** | The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). | [optional] +**WorkerActivitySid** | **string** | The new worker activity SID if rejecting a reservation. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateWorkflowRequest.md b/rest/taskrouter/v1/docs/UpdateWorkflowRequest.md new file mode 100644 index 000000000..17a97a340 --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateWorkflowRequest.md @@ -0,0 +1,16 @@ +# UpdateWorkflowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AssignmentCallbackUrl** | **string** | The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. | [optional] +**Configuration** | **string** | A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. | [optional] +**FallbackAssignmentCallbackUrl** | **string** | The URL that we should call when a call to the `assignment_callback_url` fails. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. | [optional] +**ReEvaluateTasks** | **string** | Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. | [optional] +**TaskReservationTimeout** | **int32** | How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/docs/UpdateWorkspaceRequest.md b/rest/taskrouter/v1/docs/UpdateWorkspaceRequest.md new file mode 100644 index 000000000..2ecd3352d --- /dev/null +++ b/rest/taskrouter/v1/docs/UpdateWorkspaceRequest.md @@ -0,0 +1,17 @@ +# UpdateWorkspaceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultActivitySid** | **string** | The SID of the Activity that will be used when new Workers are created in the Workspace. | [optional] +**EventCallbackUrl** | **string** | The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. | [optional] +**EventsFilter** | **string** | The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`. | [optional] +**MultiTaskEnabled** | **bool** | Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. | [optional] +**PrioritizeQueueOrder** | **string** | The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. | [optional] +**TimeoutActivitySid** | **string** | The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/taskrouter/v1/model_create_activity_request.go b/rest/taskrouter/v1/model_create_activity_request.go new file mode 100644 index 000000000..f05451283 --- /dev/null +++ b/rest/taskrouter/v1/model_create_activity_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateActivityRequest struct for CreateActivityRequest +type CreateActivityRequest struct { + // Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created. + Available bool `json:"Available,omitempty"` + // A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/taskrouter/v1/model_create_task_channel_request.go b/rest/taskrouter/v1/model_create_task_channel_request.go new file mode 100644 index 000000000..36f803ef3 --- /dev/null +++ b/rest/taskrouter/v1/model_create_task_channel_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTaskChannelRequest struct for CreateTaskChannelRequest +type CreateTaskChannelRequest struct { + // Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. + ChannelOptimizedRouting bool `json:"ChannelOptimizedRouting,omitempty"` + // A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`. + UniqueName string `json:"UniqueName"` +} diff --git a/rest/taskrouter/v1/model_create_task_queue_request.go b/rest/taskrouter/v1/model_create_task_queue_request.go new file mode 100644 index 000000000..2afc120ff --- /dev/null +++ b/rest/taskrouter/v1/model_create_task_queue_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTaskQueueRequest struct for CreateTaskQueueRequest +type CreateTaskQueueRequest struct { + // The SID of the Activity to assign Workers when a task is assigned to them. + AssignmentActivitySid string `json:"AssignmentActivitySid,omitempty"` + // A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. + FriendlyName string `json:"FriendlyName"` + // The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. + MaxReservedWorkers int32 `json:"MaxReservedWorkers,omitempty"` + // The SID of the Activity to assign Workers when a task is reserved for them. + ReservationActivitySid string `json:"ReservationActivitySid,omitempty"` + // A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\"language\" == \"spanish\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). + TargetWorkers string `json:"TargetWorkers,omitempty"` + // How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more. + TaskOrder string `json:"TaskOrder,omitempty"` +} diff --git a/rest/taskrouter/v1/model_create_task_request.go b/rest/taskrouter/v1/model_create_task_request.go new file mode 100644 index 000000000..0cedfc05b --- /dev/null +++ b/rest/taskrouter/v1/model_create_task_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTaskRequest struct for CreateTaskRequest +type CreateTaskRequest struct { + // A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \"task_type\": \"call\", \"twilio_call_sid\": \"CAxxx\", \"customer_ticket_number\": \"12345\" }`. + Attributes string `json:"Attributes,omitempty"` + // The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647). + Priority int32 `json:"Priority,omitempty"` + // When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`. + TaskChannel string `json:"TaskChannel,omitempty"` + // The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`. + Timeout int32 `json:"Timeout,omitempty"` + // The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional. + WorkflowSid string `json:"WorkflowSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_create_worker_request.go b/rest/taskrouter/v1/model_create_worker_request.go new file mode 100644 index 000000000..79b54cfc7 --- /dev/null +++ b/rest/taskrouter/v1/model_create_worker_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWorkerRequest struct for CreateWorkerRequest +type CreateWorkerRequest struct { + // The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace. + ActivitySid string `json:"ActivitySid,omitempty"` + // A valid JSON string that describes the new Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the new Worker. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/taskrouter/v1/model_create_workflow_request.go b/rest/taskrouter/v1/model_create_workflow_request.go new file mode 100644 index 000000000..28e11ac4d --- /dev/null +++ b/rest/taskrouter/v1/model_create_workflow_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWorkflowRequest struct for CreateWorkflowRequest +type CreateWorkflowRequest struct { + // The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. + AssignmentCallbackUrl string `json:"AssignmentCallbackUrl,omitempty"` + // A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. + Configuration string `json:"Configuration"` + // The URL that we should call when a call to the `assignment_callback_url` fails. + FallbackAssignmentCallbackUrl string `json:"FallbackAssignmentCallbackUrl,omitempty"` + // A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. + FriendlyName string `json:"FriendlyName"` + // How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. + TaskReservationTimeout int32 `json:"TaskReservationTimeout,omitempty"` +} diff --git a/rest/taskrouter/v1/model_create_workspace_request.go b/rest/taskrouter/v1/model_create_workspace_request.go new file mode 100644 index 000000000..df53a4b54 --- /dev/null +++ b/rest/taskrouter/v1/model_create_workspace_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWorkspaceRequest struct for CreateWorkspaceRequest +type CreateWorkspaceRequest struct { + // The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. + EventCallbackUrl string `json:"EventCallbackUrl,omitempty"` + // The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. + EventsFilter string `json:"EventsFilter,omitempty"` + // A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`. + FriendlyName string `json:"FriendlyName"` + // Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. + MultiTaskEnabled bool `json:"MultiTaskEnabled,omitempty"` + // The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. + PrioritizeQueueOrder string `json:"PrioritizeQueueOrder,omitempty"` + // An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter. + Template string `json:"Template,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_activity_response.go b/rest/taskrouter/v1/model_list_activity_response.go new file mode 100644 index 000000000..85cb27540 --- /dev/null +++ b/rest/taskrouter/v1/model_list_activity_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListActivityResponse struct for ListActivityResponse +type ListActivityResponse struct { + Activities []TaskrouterV1WorkspaceActivity `json:"Activities,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_event_response.go b/rest/taskrouter/v1/model_list_event_response.go new file mode 100644 index 000000000..c8abbc62a --- /dev/null +++ b/rest/taskrouter/v1/model_list_event_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEventResponse struct for ListEventResponse +type ListEventResponse struct { + Events []TaskrouterV1WorkspaceEvent `json:"Events,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_task_channel_response.go b/rest/taskrouter/v1/model_list_task_channel_response.go new file mode 100644 index 000000000..6fdd9d067 --- /dev/null +++ b/rest/taskrouter/v1/model_list_task_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskChannelResponse struct for ListTaskChannelResponse +type ListTaskChannelResponse struct { + Channels []TaskrouterV1WorkspaceTaskChannel `json:"Channels,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_task_queue_response.go b/rest/taskrouter/v1/model_list_task_queue_response.go new file mode 100644 index 000000000..677585bb8 --- /dev/null +++ b/rest/taskrouter/v1/model_list_task_queue_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskQueueResponse struct for ListTaskQueueResponse +type ListTaskQueueResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + TaskQueues []TaskrouterV1WorkspaceTaskQueue `json:"TaskQueues,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_task_queues_statistics_response.go b/rest/taskrouter/v1/model_list_task_queues_statistics_response.go new file mode 100644 index 000000000..b4c65f5fb --- /dev/null +++ b/rest/taskrouter/v1/model_list_task_queues_statistics_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskQueuesStatisticsResponse struct for ListTaskQueuesStatisticsResponse +type ListTaskQueuesStatisticsResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + TaskQueuesStatistics []TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics `json:"TaskQueuesStatistics,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_task_reservation_response.go b/rest/taskrouter/v1/model_list_task_reservation_response.go new file mode 100644 index 000000000..76a1cdc6b --- /dev/null +++ b/rest/taskrouter/v1/model_list_task_reservation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskReservationResponse struct for ListTaskReservationResponse +type ListTaskReservationResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Reservations []TaskrouterV1WorkspaceTaskTaskReservation `json:"Reservations,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_task_response.go b/rest/taskrouter/v1/model_list_task_response.go new file mode 100644 index 000000000..201e78a05 --- /dev/null +++ b/rest/taskrouter/v1/model_list_task_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTaskResponse struct for ListTaskResponse +type ListTaskResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Tasks []TaskrouterV1WorkspaceTask `json:"Tasks,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_worker_channel_response.go b/rest/taskrouter/v1/model_list_worker_channel_response.go new file mode 100644 index 000000000..2ffffc3f3 --- /dev/null +++ b/rest/taskrouter/v1/model_list_worker_channel_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkerChannelResponse struct for ListWorkerChannelResponse +type ListWorkerChannelResponse struct { + Channels []TaskrouterV1WorkspaceWorkerWorkerChannel `json:"Channels,omitempty"` + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_worker_reservation_response.go b/rest/taskrouter/v1/model_list_worker_reservation_response.go new file mode 100644 index 000000000..5d4146c93 --- /dev/null +++ b/rest/taskrouter/v1/model_list_worker_reservation_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkerReservationResponse struct for ListWorkerReservationResponse +type ListWorkerReservationResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Reservations []TaskrouterV1WorkspaceWorkerWorkerReservation `json:"Reservations,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_worker_response.go b/rest/taskrouter/v1/model_list_worker_response.go new file mode 100644 index 000000000..f9561e341 --- /dev/null +++ b/rest/taskrouter/v1/model_list_worker_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkerResponse struct for ListWorkerResponse +type ListWorkerResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Workers []TaskrouterV1WorkspaceWorker `json:"Workers,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_workflow_response.go b/rest/taskrouter/v1/model_list_workflow_response.go new file mode 100644 index 000000000..5497e37c7 --- /dev/null +++ b/rest/taskrouter/v1/model_list_workflow_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkflowResponse struct for ListWorkflowResponse +type ListWorkflowResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Workflows []TaskrouterV1WorkspaceWorkflow `json:"Workflows,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_workspace_response.go b/rest/taskrouter/v1/model_list_workspace_response.go new file mode 100644 index 000000000..64cbee94c --- /dev/null +++ b/rest/taskrouter/v1/model_list_workspace_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkspaceResponse struct for ListWorkspaceResponse +type ListWorkspaceResponse struct { + Meta ListWorkspaceResponseMeta `json:"Meta,omitempty"` + Workspaces []TaskrouterV1Workspace `json:"Workspaces,omitempty"` +} diff --git a/rest/taskrouter/v1/model_list_workspace_response_meta.go b/rest/taskrouter/v1/model_list_workspace_response_meta.go new file mode 100644 index 000000000..e5d428d6d --- /dev/null +++ b/rest/taskrouter/v1/model_list_workspace_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWorkspaceResponseMeta struct for ListWorkspaceResponseMeta +type ListWorkspaceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace.go new file mode 100644 index 000000000..c33995f6f --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace.go @@ -0,0 +1,32 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1Workspace struct for TaskrouterV1Workspace +type TaskrouterV1Workspace struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DefaultActivityName string `json:"DefaultActivityName,omitempty"` + DefaultActivitySid string `json:"DefaultActivitySid,omitempty"` + EventCallbackUrl string `json:"EventCallbackUrl,omitempty"` + EventsFilter string `json:"EventsFilter,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MultiTaskEnabled bool `json:"MultiTaskEnabled,omitempty"` + PrioritizeQueueOrder string `json:"PrioritizeQueueOrder,omitempty"` + Sid string `json:"Sid,omitempty"` + TimeoutActivityName string `json:"TimeoutActivityName,omitempty"` + TimeoutActivitySid string `json:"TimeoutActivitySid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go new file mode 100644 index 000000000..7b1c5e044 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_activity.go @@ -0,0 +1,25 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceActivity struct for TaskrouterV1WorkspaceActivity +type TaskrouterV1WorkspaceActivity struct { + AccountSid string `json:"AccountSid,omitempty"` + Available bool `json:"Available,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go new file mode 100644 index 000000000..3836c1df8 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_event.go @@ -0,0 +1,34 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceEvent struct for TaskrouterV1WorkspaceEvent +type TaskrouterV1WorkspaceEvent struct { + AccountSid string `json:"AccountSid,omitempty"` + ActorSid string `json:"ActorSid,omitempty"` + ActorType string `json:"ActorType,omitempty"` + ActorUrl string `json:"ActorUrl,omitempty"` + Description string `json:"Description,omitempty"` + EventData map[string]interface{} `json:"EventData,omitempty"` + EventDate time.Time `json:"EventDate,omitempty"` + EventDateMs int32 `json:"EventDateMs,omitempty"` + EventType string `json:"EventType,omitempty"` + ResourceSid string `json:"ResourceSid,omitempty"` + ResourceType string `json:"ResourceType,omitempty"` + ResourceUrl string `json:"ResourceUrl,omitempty"` + Sid string `json:"Sid,omitempty"` + Source string `json:"Source,omitempty"` + SourceIpAddress string `json:"SourceIpAddress,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go new file mode 100644 index 000000000..bc8e246b0 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task.go @@ -0,0 +1,38 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceTask struct for TaskrouterV1WorkspaceTask +type TaskrouterV1WorkspaceTask struct { + AccountSid string `json:"AccountSid,omitempty"` + Addons string `json:"Addons,omitempty"` + Age int32 `json:"Age,omitempty"` + AssignmentStatus string `json:"AssignmentStatus,omitempty"` + Attributes string `json:"Attributes,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Priority int32 `json:"Priority,omitempty"` + Reason string `json:"Reason,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskChannelSid string `json:"TaskChannelSid,omitempty"` + TaskChannelUniqueName string `json:"TaskChannelUniqueName,omitempty"` + TaskQueueEnteredDate time.Time `json:"TaskQueueEnteredDate,omitempty"` + TaskQueueFriendlyName string `json:"TaskQueueFriendlyName,omitempty"` + TaskQueueSid string `json:"TaskQueueSid,omitempty"` + Timeout int32 `json:"Timeout,omitempty"` + Url string `json:"Url,omitempty"` + WorkflowFriendlyName string `json:"WorkflowFriendlyName,omitempty"` + WorkflowSid string `json:"WorkflowSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go new file mode 100644 index 000000000..710c9bf8b --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_channel.go @@ -0,0 +1,27 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceTaskChannel struct for TaskrouterV1WorkspaceTaskChannel +type TaskrouterV1WorkspaceTaskChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + ChannelOptimizedRouting bool `json:"ChannelOptimizedRouting,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go new file mode 100644 index 000000000..7b6074840 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue.go @@ -0,0 +1,32 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceTaskQueue struct for TaskrouterV1WorkspaceTaskQueue +type TaskrouterV1WorkspaceTaskQueue struct { + AccountSid string `json:"AccountSid,omitempty"` + AssignmentActivityName string `json:"AssignmentActivityName,omitempty"` + AssignmentActivitySid string `json:"AssignmentActivitySid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MaxReservedWorkers int32 `json:"MaxReservedWorkers,omitempty"` + ReservationActivityName string `json:"ReservationActivityName,omitempty"` + ReservationActivitySid string `json:"ReservationActivitySid,omitempty"` + Sid string `json:"Sid,omitempty"` + TargetWorkers string `json:"TargetWorkers,omitempty"` + TaskOrder string `json:"TaskOrder,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go new file mode 100644 index 000000000..ce61c8dff --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_cumulative_statistics.go @@ -0,0 +1,39 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics +type TaskrouterV1WorkspaceTaskQueueTaskQueueCumulativeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + AvgTaskAcceptanceTime int32 `json:"AvgTaskAcceptanceTime,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + ReservationsAccepted int32 `json:"ReservationsAccepted,omitempty"` + ReservationsCanceled int32 `json:"ReservationsCanceled,omitempty"` + ReservationsCreated int32 `json:"ReservationsCreated,omitempty"` + ReservationsRejected int32 `json:"ReservationsRejected,omitempty"` + ReservationsRescinded int32 `json:"ReservationsRescinded,omitempty"` + ReservationsTimedOut int32 `json:"ReservationsTimedOut,omitempty"` + SplitByWaitTime map[string]interface{} `json:"SplitByWaitTime,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + TaskQueueSid string `json:"TaskQueueSid,omitempty"` + TasksCanceled int32 `json:"TasksCanceled,omitempty"` + TasksCompleted int32 `json:"TasksCompleted,omitempty"` + TasksDeleted int32 `json:"TasksDeleted,omitempty"` + TasksEntered int32 `json:"TasksEntered,omitempty"` + TasksMoved int32 `json:"TasksMoved,omitempty"` + Url string `json:"Url,omitempty"` + WaitDurationInQueueUntilAccepted map[string]interface{} `json:"WaitDurationInQueueUntilAccepted,omitempty"` + WaitDurationUntilAccepted map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + WaitDurationUntilCanceled map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go new file mode 100644 index 000000000..f4bdaae66 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_real_time_statistics.go @@ -0,0 +1,28 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics +type TaskrouterV1WorkspaceTaskQueueTaskQueueRealTimeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + ActivityStatistics []map[string]interface{} `json:"ActivityStatistics,omitempty"` + LongestRelativeTaskAgeInQueue int32 `json:"LongestRelativeTaskAgeInQueue,omitempty"` + LongestRelativeTaskSidInQueue string `json:"LongestRelativeTaskSidInQueue,omitempty"` + LongestTaskWaitingAge int32 `json:"LongestTaskWaitingAge,omitempty"` + LongestTaskWaitingSid string `json:"LongestTaskWaitingSid,omitempty"` + TaskQueueSid string `json:"TaskQueueSid,omitempty"` + TasksByPriority map[string]interface{} `json:"TasksByPriority,omitempty"` + TasksByStatus map[string]interface{} `json:"TasksByStatus,omitempty"` + TotalAvailableWorkers int32 `json:"TotalAvailableWorkers,omitempty"` + TotalEligibleWorkers int32 `json:"TotalEligibleWorkers,omitempty"` + TotalTasks int32 `json:"TotalTasks,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go new file mode 100644 index 000000000..4217b7224 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queue_statistics.go @@ -0,0 +1,20 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics +type TaskrouterV1WorkspaceTaskQueueTaskQueueStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Realtime map[string]interface{} `json:"Realtime,omitempty"` + TaskQueueSid string `json:"TaskQueueSid,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go new file mode 100644 index 000000000..06ab2001c --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_queue_task_queues_statistics.go @@ -0,0 +1,19 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct for TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics +type TaskrouterV1WorkspaceTaskQueueTaskQueuesStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Realtime map[string]interface{} `json:"Realtime,omitempty"` + TaskQueueSid string `json:"TaskQueueSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go new file mode 100644 index 000000000..b302a3401 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_task_task_reservation.go @@ -0,0 +1,28 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceTaskTaskReservation struct for TaskrouterV1WorkspaceTaskTaskReservation +type TaskrouterV1WorkspaceTaskTaskReservation struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ReservationStatus string `json:"ReservationStatus,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` + WorkerName string `json:"WorkerName,omitempty"` + WorkerSid string `json:"WorkerSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go new file mode 100644 index 000000000..d764d3266 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker.go @@ -0,0 +1,30 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorker struct for TaskrouterV1WorkspaceWorker +type TaskrouterV1WorkspaceWorker struct { + AccountSid string `json:"AccountSid,omitempty"` + ActivityName string `json:"ActivityName,omitempty"` + ActivitySid string `json:"ActivitySid,omitempty"` + Attributes string `json:"Attributes,omitempty"` + Available bool `json:"Available,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateStatusChanged time.Time `json:"DateStatusChanged,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go new file mode 100644 index 000000000..661cff0af --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_channel.go @@ -0,0 +1,30 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkerWorkerChannel struct for TaskrouterV1WorkspaceWorkerWorkerChannel +type TaskrouterV1WorkspaceWorkerWorkerChannel struct { + AccountSid string `json:"AccountSid,omitempty"` + AssignedTasks int32 `json:"AssignedTasks,omitempty"` + Available bool `json:"Available,omitempty"` + AvailableCapacityPercentage int32 `json:"AvailableCapacityPercentage,omitempty"` + ConfiguredCapacity int32 `json:"ConfiguredCapacity,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskChannelSid string `json:"TaskChannelSid,omitempty"` + TaskChannelUniqueName string `json:"TaskChannelUniqueName,omitempty"` + Url string `json:"Url,omitempty"` + WorkerSid string `json:"WorkerSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go new file mode 100644 index 000000000..1a1cc5116 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_instance_statistics.go @@ -0,0 +1,19 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct for TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics +type TaskrouterV1WorkspaceWorkerWorkerInstanceStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Url string `json:"Url,omitempty"` + WorkerSid string `json:"WorkerSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go new file mode 100644 index 000000000..45010db49 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_reservation.go @@ -0,0 +1,28 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkerWorkerReservation struct for TaskrouterV1WorkspaceWorkerWorkerReservation +type TaskrouterV1WorkspaceWorkerWorkerReservation struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ReservationStatus string `json:"ReservationStatus,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskSid string `json:"TaskSid,omitempty"` + Url string `json:"Url,omitempty"` + WorkerName string `json:"WorkerName,omitempty"` + WorkerSid string `json:"WorkerSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go new file mode 100644 index 000000000..76bd9c2f2 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_worker_statistics.go @@ -0,0 +1,19 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkerWorkerStatistics struct for TaskrouterV1WorkspaceWorkerWorkerStatistics +type TaskrouterV1WorkspaceWorkerWorkerStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Realtime map[string]interface{} `json:"Realtime,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go new file mode 100644 index 000000000..fa95ae21b --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_cumulative_statistics.go @@ -0,0 +1,29 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics +type TaskrouterV1WorkspaceWorkerWorkersCumulativeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + ActivityDurations []map[string]interface{} `json:"ActivityDurations,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + ReservationsAccepted int32 `json:"ReservationsAccepted,omitempty"` + ReservationsCanceled int32 `json:"ReservationsCanceled,omitempty"` + ReservationsCreated int32 `json:"ReservationsCreated,omitempty"` + ReservationsRejected int32 `json:"ReservationsRejected,omitempty"` + ReservationsRescinded int32 `json:"ReservationsRescinded,omitempty"` + ReservationsTimedOut int32 `json:"ReservationsTimedOut,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go new file mode 100644 index 000000000..ec3c9811c --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_worker_workers_real_time_statistics.go @@ -0,0 +1,19 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct for TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics +type TaskrouterV1WorkspaceWorkerWorkersRealTimeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + ActivityStatistics []map[string]interface{} `json:"ActivityStatistics,omitempty"` + TotalWorkers int32 `json:"TotalWorkers,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go new file mode 100644 index 000000000..6684f39ff --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow.go @@ -0,0 +1,30 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkflow struct for TaskrouterV1WorkspaceWorkflow +type TaskrouterV1WorkspaceWorkflow struct { + AccountSid string `json:"AccountSid,omitempty"` + AssignmentCallbackUrl string `json:"AssignmentCallbackUrl,omitempty"` + Configuration string `json:"Configuration,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DocumentContentType string `json:"DocumentContentType,omitempty"` + FallbackAssignmentCallbackUrl string `json:"FallbackAssignmentCallbackUrl,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + TaskReservationTimeout int32 `json:"TaskReservationTimeout,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go new file mode 100644 index 000000000..006661ed4 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_cumulative_statistics.go @@ -0,0 +1,39 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics +type TaskrouterV1WorkspaceWorkflowWorkflowCumulativeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + AvgTaskAcceptanceTime int32 `json:"AvgTaskAcceptanceTime,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + ReservationsAccepted int32 `json:"ReservationsAccepted,omitempty"` + ReservationsCanceled int32 `json:"ReservationsCanceled,omitempty"` + ReservationsCreated int32 `json:"ReservationsCreated,omitempty"` + ReservationsRejected int32 `json:"ReservationsRejected,omitempty"` + ReservationsRescinded int32 `json:"ReservationsRescinded,omitempty"` + ReservationsTimedOut int32 `json:"ReservationsTimedOut,omitempty"` + SplitByWaitTime map[string]interface{} `json:"SplitByWaitTime,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + TasksCanceled int32 `json:"TasksCanceled,omitempty"` + TasksCompleted int32 `json:"TasksCompleted,omitempty"` + TasksDeleted int32 `json:"TasksDeleted,omitempty"` + TasksEntered int32 `json:"TasksEntered,omitempty"` + TasksMoved int32 `json:"TasksMoved,omitempty"` + TasksTimedOutInWorkflow int32 `json:"TasksTimedOutInWorkflow,omitempty"` + Url string `json:"Url,omitempty"` + WaitDurationUntilAccepted map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + WaitDurationUntilCanceled map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` + WorkflowSid string `json:"WorkflowSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go new file mode 100644 index 000000000..d43827f81 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_real_time_statistics.go @@ -0,0 +1,23 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics +type TaskrouterV1WorkspaceWorkflowWorkflowRealTimeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + LongestTaskWaitingAge int32 `json:"LongestTaskWaitingAge,omitempty"` + LongestTaskWaitingSid string `json:"LongestTaskWaitingSid,omitempty"` + TasksByPriority map[string]interface{} `json:"TasksByPriority,omitempty"` + TasksByStatus map[string]interface{} `json:"TasksByStatus,omitempty"` + TotalTasks int32 `json:"TotalTasks,omitempty"` + Url string `json:"Url,omitempty"` + WorkflowSid string `json:"WorkflowSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go new file mode 100644 index 000000000..8d6287438 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workflow_workflow_statistics.go @@ -0,0 +1,20 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct for TaskrouterV1WorkspaceWorkflowWorkflowStatistics +type TaskrouterV1WorkspaceWorkflowWorkflowStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Realtime map[string]interface{} `json:"Realtime,omitempty"` + Url string `json:"Url,omitempty"` + WorkflowSid string `json:"WorkflowSid,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go new file mode 100644 index 000000000..94a64368d --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_cumulative_statistics.go @@ -0,0 +1,38 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct for TaskrouterV1WorkspaceWorkspaceCumulativeStatistics +type TaskrouterV1WorkspaceWorkspaceCumulativeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + AvgTaskAcceptanceTime int32 `json:"AvgTaskAcceptanceTime,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + ReservationsAccepted int32 `json:"ReservationsAccepted,omitempty"` + ReservationsCanceled int32 `json:"ReservationsCanceled,omitempty"` + ReservationsCreated int32 `json:"ReservationsCreated,omitempty"` + ReservationsRejected int32 `json:"ReservationsRejected,omitempty"` + ReservationsRescinded int32 `json:"ReservationsRescinded,omitempty"` + ReservationsTimedOut int32 `json:"ReservationsTimedOut,omitempty"` + SplitByWaitTime map[string]interface{} `json:"SplitByWaitTime,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + TasksCanceled int32 `json:"TasksCanceled,omitempty"` + TasksCompleted int32 `json:"TasksCompleted,omitempty"` + TasksCreated int32 `json:"TasksCreated,omitempty"` + TasksDeleted int32 `json:"TasksDeleted,omitempty"` + TasksMoved int32 `json:"TasksMoved,omitempty"` + TasksTimedOutInWorkflow int32 `json:"TasksTimedOutInWorkflow,omitempty"` + Url string `json:"Url,omitempty"` + WaitDurationUntilAccepted map[string]interface{} `json:"WaitDurationUntilAccepted,omitempty"` + WaitDurationUntilCanceled map[string]interface{} `json:"WaitDurationUntilCanceled,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go new file mode 100644 index 000000000..7feafd25c --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_real_time_statistics.go @@ -0,0 +1,24 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct for TaskrouterV1WorkspaceWorkspaceRealTimeStatistics +type TaskrouterV1WorkspaceWorkspaceRealTimeStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + ActivityStatistics []map[string]interface{} `json:"ActivityStatistics,omitempty"` + LongestTaskWaitingAge int32 `json:"LongestTaskWaitingAge,omitempty"` + LongestTaskWaitingSid string `json:"LongestTaskWaitingSid,omitempty"` + TasksByPriority map[string]interface{} `json:"TasksByPriority,omitempty"` + TasksByStatus map[string]interface{} `json:"TasksByStatus,omitempty"` + TotalTasks int32 `json:"TotalTasks,omitempty"` + TotalWorkers int32 `json:"TotalWorkers,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go new file mode 100644 index 000000000..8943361c8 --- /dev/null +++ b/rest/taskrouter/v1/model_taskrouter_v1_workspace_workspace_statistics.go @@ -0,0 +1,19 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TaskrouterV1WorkspaceWorkspaceStatistics struct for TaskrouterV1WorkspaceWorkspaceStatistics +type TaskrouterV1WorkspaceWorkspaceStatistics struct { + AccountSid string `json:"AccountSid,omitempty"` + Cumulative map[string]interface{} `json:"Cumulative,omitempty"` + Realtime map[string]interface{} `json:"Realtime,omitempty"` + Url string `json:"Url,omitempty"` + WorkspaceSid string `json:"WorkspaceSid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_activity_request.go b/rest/taskrouter/v1/model_update_activity_request.go new file mode 100644 index 000000000..66f477b2f --- /dev/null +++ b/rest/taskrouter/v1/model_update_activity_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateActivityRequest struct for UpdateActivityRequest +type UpdateActivityRequest struct { + // A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_task_channel_request.go b/rest/taskrouter/v1/model_update_task_channel_request.go new file mode 100644 index 000000000..7b1f68702 --- /dev/null +++ b/rest/taskrouter/v1/model_update_task_channel_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskChannelRequest struct for UpdateTaskChannelRequest +type UpdateTaskChannelRequest struct { + // Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized. + ChannelOptimizedRouting bool `json:"ChannelOptimizedRouting,omitempty"` + // A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_task_queue_request.go b/rest/taskrouter/v1/model_update_task_queue_request.go new file mode 100644 index 000000000..3b671c0e1 --- /dev/null +++ b/rest/taskrouter/v1/model_update_task_queue_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskQueueRequest struct for UpdateTaskQueueRequest +type UpdateTaskQueueRequest struct { + // The SID of the Activity to assign Workers when a task is assigned for them. + AssignmentActivitySid string `json:"AssignmentActivitySid,omitempty"` + // A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. + FriendlyName string `json:"FriendlyName,omitempty"` + // The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. + MaxReservedWorkers int32 `json:"MaxReservedWorkers,omitempty"` + // The SID of the Activity to assign Workers when a task is reserved for them. + ReservationActivitySid string `json:"ReservationActivitySid,omitempty"` + // A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\"language\" == \"spanish\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. + TargetWorkers string `json:"TargetWorkers,omitempty"` + // How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo). + TaskOrder string `json:"TaskOrder,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_task_request.go b/rest/taskrouter/v1/model_update_task_request.go new file mode 100644 index 000000000..3314b642b --- /dev/null +++ b/rest/taskrouter/v1/model_update_task_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskRequest struct for UpdateTaskRequest +type UpdateTaskRequest struct { + // The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state. + AssignmentStatus string `json:"AssignmentStatus,omitempty"` + // The JSON string that describes the custom attributes of the task. + Attributes string `json:"Attributes,omitempty"` + // The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647). + Priority int32 `json:"Priority,omitempty"` + // The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason. + Reason string `json:"Reason,omitempty"` + // When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`. + TaskChannel string `json:"TaskChannel,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_task_reservation_request.go b/rest/taskrouter/v1/model_update_task_reservation_request.go new file mode 100644 index 000000000..22ed5c534 --- /dev/null +++ b/rest/taskrouter/v1/model_update_task_reservation_request.go @@ -0,0 +1,120 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTaskReservationRequest struct for UpdateTaskReservationRequest +type UpdateTaskReservationRequest struct { + // Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + Beep string `json:"Beep,omitempty"` + // Whether to play a notification beep when the customer joins. + BeepOnCustomerEntrance bool `json:"BeepOnCustomerEntrance,omitempty"` + // Whether to accept a reservation when executing a Call instruction. + CallAccept bool `json:"CallAccept,omitempty"` + // The Caller ID of the outbound call when executing a Call instruction. + CallFrom string `json:"CallFrom,omitempty"` + // Whether to record both legs of a call when executing a Call instruction or which leg to record. + CallRecord string `json:"CallRecord,omitempty"` + // The URL to call for the completed call event when executing a Call instruction. + CallStatusCallbackUrl string `json:"CallStatusCallbackUrl,omitempty"` + // Timeout for call when executing a Call instruction. + CallTimeout int32 `json:"CallTimeout,omitempty"` + // The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + CallTo string `json:"CallTo,omitempty"` + // TwiML URI executed on answering the worker's leg as a result of the Call instruction. + CallUrl string `json:"CallUrl,omitempty"` + // Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + ConferenceRecord string `json:"ConferenceRecord,omitempty"` + // The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + ConferenceRecordingStatusCallback string `json:"ConferenceRecordingStatusCallback,omitempty"` + // The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceRecordingStatusCallbackMethod string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + // The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + ConferenceStatusCallback string `json:"ConferenceStatusCallback,omitempty"` + // The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. + ConferenceStatusCallbackEvent []string `json:"ConferenceStatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceStatusCallbackMethod string `json:"ConferenceStatusCallbackMethod,omitempty"` + // How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + ConferenceTrim string `json:"ConferenceTrim,omitempty"` + // The Caller ID of the call to the worker when executing a Dequeue instruction. + DequeueFrom string `json:"DequeueFrom,omitempty"` + // The SID of the Activity resource to start after executing a Dequeue instruction. + DequeuePostWorkActivitySid string `json:"DequeuePostWorkActivitySid,omitempty"` + // Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. + DequeueRecord string `json:"DequeueRecord,omitempty"` + // The Call progress events sent via webhooks as a result of a Dequeue instruction. + DequeueStatusCallbackEvent []string `json:"DequeueStatusCallbackEvent,omitempty"` + // The Callback URL for completed call event when executing a Dequeue instruction. + DequeueStatusCallbackUrl string `json:"DequeueStatusCallbackUrl,omitempty"` + // Timeout for call when executing a Dequeue instruction. + DequeueTimeout int32 `json:"DequeueTimeout,omitempty"` + // The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + DequeueTo string `json:"DequeueTo,omitempty"` + // Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. + EarlyMedia bool `json:"EarlyMedia,omitempty"` + // Whether to end the conference when the customer leaves. + EndConferenceOnCustomerExit bool `json:"EndConferenceOnCustomerExit,omitempty"` + // Whether to end the conference when the agent leaves. + EndConferenceOnExit bool `json:"EndConferenceOnExit,omitempty"` + // The Caller ID of the call to the worker when executing a Conference instruction. + From string `json:"From,omitempty"` + // The assignment instruction for reservation. + Instruction string `json:"Instruction,omitempty"` + // The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + MaxParticipants int32 `json:"MaxParticipants,omitempty"` + // Whether the agent is muted in the conference. The default is `false`. + Muted bool `json:"Muted,omitempty"` + // The new worker activity SID after executing a Conference instruction. + PostWorkActivitySid string `json:"PostWorkActivitySid,omitempty"` + // Whether to record the participant and their conferences, including the time between conferences. The default is `false`. + Record bool `json:"Record,omitempty"` + // The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + RecordingChannels string `json:"RecordingChannels,omitempty"` + // The URL that we should call using the `recording_status_callback_method` when the recording status changes. + RecordingStatusCallback string `json:"RecordingStatusCallback,omitempty"` + // The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + RecordingStatusCallbackMethod string `json:"RecordingStatusCallbackMethod,omitempty"` + // Whether the reservation should be accepted when executing a Redirect instruction. + RedirectAccept bool `json:"RedirectAccept,omitempty"` + // The Call SID of the call parked in the queue when executing a Redirect instruction. + RedirectCallSid string `json:"RedirectCallSid,omitempty"` + // TwiML URI to redirect the call to when executing the Redirect instruction. + RedirectUrl string `json:"RedirectUrl,omitempty"` + // The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + Region string `json:"Region,omitempty"` + // The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`. + ReservationStatus string `json:"ReservationStatus,omitempty"` + // The SIP password for authentication. + SipAuthPassword string `json:"SipAuthPassword,omitempty"` + // The SIP username used for authentication. + SipAuthUsername string `json:"SipAuthUsername,omitempty"` + // Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + StartConferenceOnEnter bool `json:"StartConferenceOnEnter,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. + StatusCallbackEvent []string `json:"StatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The Supervisor SID/URI when executing the Supervise instruction. + Supervisor string `json:"Supervisor,omitempty"` + // The Supervisor mode when executing the Supervise instruction. + SupervisorMode string `json:"SupervisorMode,omitempty"` + // Timeout for call when executing a Conference instruction. + Timeout int32 `json:"Timeout,omitempty"` + // The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + To string `json:"To,omitempty"` + // The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + WaitMethod string `json:"WaitMethod,omitempty"` + // The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitUrl string `json:"WaitUrl,omitempty"` + // The new worker activity SID if rejecting a reservation. + WorkerActivitySid string `json:"WorkerActivitySid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_worker_channel_request.go b/rest/taskrouter/v1/model_update_worker_channel_request.go new file mode 100644 index 000000000..f646c4aa5 --- /dev/null +++ b/rest/taskrouter/v1/model_update_worker_channel_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWorkerChannelRequest struct for UpdateWorkerChannelRequest +type UpdateWorkerChannelRequest struct { + // Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type. + Available bool `json:"Available,omitempty"` + // The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created. + Capacity int32 `json:"Capacity,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_worker_request.go b/rest/taskrouter/v1/model_update_worker_request.go new file mode 100644 index 000000000..eaeb7ae6c --- /dev/null +++ b/rest/taskrouter/v1/model_update_worker_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWorkerRequest struct for UpdateWorkerRequest +type UpdateWorkerRequest struct { + // The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. + ActivitySid string `json:"ActivitySid,omitempty"` + // The JSON string that describes the Worker. For example: `{ \"email\": \"Bob@example.com\", \"phone\": \"+5095551234\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}. + Attributes string `json:"Attributes,omitempty"` + // A descriptive string that you create to describe the Worker. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether to reject pending reservations. + RejectPendingReservations bool `json:"RejectPendingReservations,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_worker_reservation_request.go b/rest/taskrouter/v1/model_update_worker_reservation_request.go new file mode 100644 index 000000000..73a662c1e --- /dev/null +++ b/rest/taskrouter/v1/model_update_worker_reservation_request.go @@ -0,0 +1,116 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWorkerReservationRequest struct for UpdateWorkerReservationRequest +type UpdateWorkerReservationRequest struct { + // Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`. + Beep string `json:"Beep,omitempty"` + // Whether to play a notification beep when the customer joins. + BeepOnCustomerEntrance bool `json:"BeepOnCustomerEntrance,omitempty"` + // Whether to accept a reservation when executing a Call instruction. + CallAccept bool `json:"CallAccept,omitempty"` + // The Caller ID of the outbound call when executing a Call instruction. + CallFrom string `json:"CallFrom,omitempty"` + // Whether to record both legs of a call when executing a Call instruction. + CallRecord string `json:"CallRecord,omitempty"` + // The URL to call for the completed call event when executing a Call instruction. + CallStatusCallbackUrl string `json:"CallStatusCallbackUrl,omitempty"` + // The timeout for a call when executing a Call instruction. + CallTimeout int32 `json:"CallTimeout,omitempty"` + // The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + CallTo string `json:"CallTo,omitempty"` + // TwiML URI executed on answering the worker's leg as a result of the Call instruction. + CallUrl string `json:"CallUrl,omitempty"` + // Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`. + ConferenceRecord string `json:"ConferenceRecord,omitempty"` + // The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available. + ConferenceRecordingStatusCallback string `json:"ConferenceRecordingStatusCallback,omitempty"` + // The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceRecordingStatusCallbackMethod string `json:"ConferenceRecordingStatusCallbackMethod,omitempty"` + // The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored. + ConferenceStatusCallback string `json:"ConferenceStatusCallback,omitempty"` + // The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`. + ConferenceStatusCallbackEvent []string `json:"ConferenceStatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + ConferenceStatusCallbackMethod string `json:"ConferenceStatusCallbackMethod,omitempty"` + // Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`. + ConferenceTrim string `json:"ConferenceTrim,omitempty"` + // The caller ID of the call to the worker when executing a Dequeue instruction. + DequeueFrom string `json:"DequeueFrom,omitempty"` + // The SID of the Activity resource to start after executing a Dequeue instruction. + DequeuePostWorkActivitySid string `json:"DequeuePostWorkActivitySid,omitempty"` + // Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. + DequeueRecord string `json:"DequeueRecord,omitempty"` + // The call progress events sent via webhooks as a result of a Dequeue instruction. + DequeueStatusCallbackEvent []string `json:"DequeueStatusCallbackEvent,omitempty"` + // The callback URL for completed call event when executing a Dequeue instruction. + DequeueStatusCallbackUrl string `json:"DequeueStatusCallbackUrl,omitempty"` + // The timeout for call when executing a Dequeue instruction. + DequeueTimeout int32 `json:"DequeueTimeout,omitempty"` + // The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + DequeueTo string `json:"DequeueTo,omitempty"` + // Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`. + EarlyMedia bool `json:"EarlyMedia,omitempty"` + // Whether to end the conference when the customer leaves. + EndConferenceOnCustomerExit bool `json:"EndConferenceOnCustomerExit,omitempty"` + // Whether to end the conference when the agent leaves. + EndConferenceOnExit bool `json:"EndConferenceOnExit,omitempty"` + // The caller ID of the call to the worker when executing a Conference instruction. + From string `json:"From,omitempty"` + // The assignment instruction for the reservation. + Instruction string `json:"Instruction,omitempty"` + // The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`. + MaxParticipants int32 `json:"MaxParticipants,omitempty"` + // Whether the agent is muted in the conference. Defaults to `false`. + Muted bool `json:"Muted,omitempty"` + // The new worker activity SID after executing a Conference instruction. + PostWorkActivitySid string `json:"PostWorkActivitySid,omitempty"` + // Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`. + Record bool `json:"Record,omitempty"` + // The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`. + RecordingChannels string `json:"RecordingChannels,omitempty"` + // The URL that we should call using the `recording_status_callback_method` when the recording status changes. + RecordingStatusCallback string `json:"RecordingStatusCallback,omitempty"` + // The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`. + RecordingStatusCallbackMethod string `json:"RecordingStatusCallbackMethod,omitempty"` + // Whether the reservation should be accepted when executing a Redirect instruction. + RedirectAccept bool `json:"RedirectAccept,omitempty"` + // The Call SID of the call parked in the queue when executing a Redirect instruction. + RedirectCallSid string `json:"RedirectCallSid,omitempty"` + // TwiML URI to redirect the call to when executing the Redirect instruction. + RedirectUrl string `json:"RedirectUrl,omitempty"` + // The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`. + Region string `json:"Region,omitempty"` + // The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`. + ReservationStatus string `json:"ReservationStatus,omitempty"` + // The SIP password for authentication. + SipAuthPassword string `json:"SipAuthPassword,omitempty"` + // The SIP username used for authentication. + SipAuthUsername string `json:"SipAuthUsername,omitempty"` + // Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference. + StartConferenceOnEnter bool `json:"StartConferenceOnEnter,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application. + StatusCallback string `json:"StatusCallback,omitempty"` + // The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`. + StatusCallbackEvent []string `json:"StatusCallbackEvent,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The timeout for a call when executing a Conference instruction. + Timeout int32 `json:"Timeout,omitempty"` + // The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination. + To string `json:"To,omitempty"` + // The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. + WaitMethod string `json:"WaitMethod,omitempty"` + // The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic). + WaitUrl string `json:"WaitUrl,omitempty"` + // The new worker activity SID if rejecting a reservation. + WorkerActivitySid string `json:"WorkerActivitySid,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_workflow_request.go b/rest/taskrouter/v1/model_update_workflow_request.go new file mode 100644 index 000000000..e32c35d3c --- /dev/null +++ b/rest/taskrouter/v1/model_update_workflow_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWorkflowRequest struct for UpdateWorkflowRequest +type UpdateWorkflowRequest struct { + // The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details. + AssignmentCallbackUrl string `json:"AssignmentCallbackUrl,omitempty"` + // A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information. + Configuration string `json:"Configuration,omitempty"` + // The URL that we should call when a call to the `assignment_callback_url` fails. + FallbackAssignmentCallbackUrl string `json:"FallbackAssignmentCallbackUrl,omitempty"` + // A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again. + ReEvaluateTasks string `json:"ReEvaluateTasks,omitempty"` + // How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`. + TaskReservationTimeout int32 `json:"TaskReservationTimeout,omitempty"` +} diff --git a/rest/taskrouter/v1/model_update_workspace_request.go b/rest/taskrouter/v1/model_update_workspace_request.go new file mode 100644 index 000000000..db1726c31 --- /dev/null +++ b/rest/taskrouter/v1/model_update_workspace_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWorkspaceRequest struct for UpdateWorkspaceRequest +type UpdateWorkspaceRequest struct { + // The SID of the Activity that will be used when new Workers are created in the Workspace. + DefaultActivitySid string `json:"DefaultActivitySid,omitempty"` + // The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. + EventCallbackUrl string `json:"EventCallbackUrl,omitempty"` + // The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated. + EventsFilter string `json:"EventsFilter,omitempty"` + // A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking]. + MultiTaskEnabled bool `json:"MultiTaskEnabled,omitempty"` + // The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo]. + PrioritizeQueueOrder string `json:"PrioritizeQueueOrder,omitempty"` + // The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response. + TimeoutActivitySid string `json:"TimeoutActivitySid,omitempty"` +} diff --git a/rest/taskrouter/v1/response.go b/rest/taskrouter/v1/response.go new file mode 100644 index 000000000..0d1b0b3e6 --- /dev/null +++ b/rest/taskrouter/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Taskrouter + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/trunking/v1/.openapi-generator-ignore b/rest/trunking/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/trunking/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/trunking/v1/README.md b/rest/trunking/v1/README.md new file mode 100644 index 000000000..5b1345245 --- /dev/null +++ b/rest/trunking/v1/README.md @@ -0,0 +1,106 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateCredentialList**](docs/DefaultApi.md#createcredentiallist) | **Post** /v1/Trunks/{TrunkSid}/CredentialLists | +*DefaultApi* | [**CreateIpAccessControlList**](docs/DefaultApi.md#createipaccesscontrollist) | **Post** /v1/Trunks/{TrunkSid}/IpAccessControlLists | +*DefaultApi* | [**CreateOriginationUrl**](docs/DefaultApi.md#createoriginationurl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls | +*DefaultApi* | [**CreatePhoneNumber**](docs/DefaultApi.md#createphonenumber) | **Post** /v1/Trunks/{TrunkSid}/PhoneNumbers | +*DefaultApi* | [**CreateTrunk**](docs/DefaultApi.md#createtrunk) | **Post** /v1/Trunks | +*DefaultApi* | [**DeleteCredentialList**](docs/DefaultApi.md#deletecredentiallist) | **Delete** /v1/Trunks/{TrunkSid}/CredentialLists/{Sid} | +*DefaultApi* | [**DeleteIpAccessControlList**](docs/DefaultApi.md#deleteipaccesscontrollist) | **Delete** /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid} | +*DefaultApi* | [**DeleteOriginationUrl**](docs/DefaultApi.md#deleteoriginationurl) | **Delete** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +*DefaultApi* | [**DeletePhoneNumber**](docs/DefaultApi.md#deletephonenumber) | **Delete** /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**DeleteTrunk**](docs/DefaultApi.md#deletetrunk) | **Delete** /v1/Trunks/{Sid} | +*DefaultApi* | [**FetchCredentialList**](docs/DefaultApi.md#fetchcredentiallist) | **Get** /v1/Trunks/{TrunkSid}/CredentialLists/{Sid} | +*DefaultApi* | [**FetchIpAccessControlList**](docs/DefaultApi.md#fetchipaccesscontrollist) | **Get** /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid} | +*DefaultApi* | [**FetchOriginationUrl**](docs/DefaultApi.md#fetchoriginationurl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +*DefaultApi* | [**FetchPhoneNumber**](docs/DefaultApi.md#fetchphonenumber) | **Get** /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid} | +*DefaultApi* | [**FetchRecording**](docs/DefaultApi.md#fetchrecording) | **Get** /v1/Trunks/{TrunkSid}/Recording | +*DefaultApi* | [**FetchTrunk**](docs/DefaultApi.md#fetchtrunk) | **Get** /v1/Trunks/{Sid} | +*DefaultApi* | [**ListCredentialList**](docs/DefaultApi.md#listcredentiallist) | **Get** /v1/Trunks/{TrunkSid}/CredentialLists | +*DefaultApi* | [**ListIpAccessControlList**](docs/DefaultApi.md#listipaccesscontrollist) | **Get** /v1/Trunks/{TrunkSid}/IpAccessControlLists | +*DefaultApi* | [**ListOriginationUrl**](docs/DefaultApi.md#listoriginationurl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls | +*DefaultApi* | [**ListPhoneNumber**](docs/DefaultApi.md#listphonenumber) | **Get** /v1/Trunks/{TrunkSid}/PhoneNumbers | +*DefaultApi* | [**ListTrunk**](docs/DefaultApi.md#listtrunk) | **Get** /v1/Trunks | +*DefaultApi* | [**UpdateOriginationUrl**](docs/DefaultApi.md#updateoriginationurl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +*DefaultApi* | [**UpdateRecording**](docs/DefaultApi.md#updaterecording) | **Post** /v1/Trunks/{TrunkSid}/Recording | +*DefaultApi* | [**UpdateTrunk**](docs/DefaultApi.md#updatetrunk) | **Post** /v1/Trunks/{Sid} | + + +## Documentation For Models + + - [CreateCredentialListRequest](docs/CreateCredentialListRequest.md) + - [CreateIpAccessControlListRequest](docs/CreateIpAccessControlListRequest.md) + - [CreateOriginationUrlRequest](docs/CreateOriginationUrlRequest.md) + - [CreatePhoneNumberRequest](docs/CreatePhoneNumberRequest.md) + - [CreateTrunkRequest](docs/CreateTrunkRequest.md) + - [ListCredentialListResponse](docs/ListCredentialListResponse.md) + - [ListIpAccessControlListResponse](docs/ListIpAccessControlListResponse.md) + - [ListOriginationUrlResponse](docs/ListOriginationUrlResponse.md) + - [ListPhoneNumberResponse](docs/ListPhoneNumberResponse.md) + - [ListTrunkResponse](docs/ListTrunkResponse.md) + - [ListTrunkResponseMeta](docs/ListTrunkResponseMeta.md) + - [TrunkingV1Trunk](docs/TrunkingV1Trunk.md) + - [TrunkingV1TrunkCredentialList](docs/TrunkingV1TrunkCredentialList.md) + - [TrunkingV1TrunkIpAccessControlList](docs/TrunkingV1TrunkIpAccessControlList.md) + - [TrunkingV1TrunkOriginationUrl](docs/TrunkingV1TrunkOriginationUrl.md) + - [TrunkingV1TrunkPhoneNumber](docs/TrunkingV1TrunkPhoneNumber.md) + - [TrunkingV1TrunkRecording](docs/TrunkingV1TrunkRecording.md) + - [UpdateOriginationUrlRequest](docs/UpdateOriginationUrlRequest.md) + - [UpdateRecordingRequest](docs/UpdateRecordingRequest.md) + - [UpdateTrunkRequest](docs/UpdateTrunkRequest.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/trunking/v1/api_default.go b/rest/trunking/v1/api_default.go new file mode 100644 index 000000000..61bb928e3 --- /dev/null +++ b/rest/trunking/v1/api_default.go @@ -0,0 +1,960 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://trunking.twilio.com"), + } +} +// CreateCredentialListParams Optional parameters for the method 'CreateCredentialList' +type CreateCredentialListParams struct { + CredentialListSid *string `json:"CredentialListSid,omitempty"` +} + +/* +CreateCredentialList Method for CreateCredentialList + * @param TrunkSid The SID of the Trunk to associate the credential list with. + * @param optional nil or *CreateCredentialListOpts - Optional Parameters: + * @param "CredentialListSid" (string) - The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. +@return TrunkingV1TrunkCredentialList +*/ +func (c *DefaultApiService) CreateCredentialList(TrunkSid string, params *CreateCredentialListParams) (*TrunkingV1TrunkCredentialList, error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CredentialListSid != nil { + data.Set("CredentialListSid", *params.CredentialListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIpAccessControlListParams Optional parameters for the method 'CreateIpAccessControlList' +type CreateIpAccessControlListParams struct { + IpAccessControlListSid *string `json:"IpAccessControlListSid,omitempty"` +} + +/* +CreateIpAccessControlList Method for CreateIpAccessControlList +Associate an IP Access Control List with a Trunk + * @param TrunkSid The SID of the Trunk to associate the IP Access Control List with. + * @param optional nil or *CreateIpAccessControlListOpts - Optional Parameters: + * @param "IpAccessControlListSid" (string) - The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. +@return TrunkingV1TrunkIpAccessControlList +*/ +func (c *DefaultApiService) CreateIpAccessControlList(TrunkSid string, params *CreateIpAccessControlListParams) (*TrunkingV1TrunkIpAccessControlList, error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.IpAccessControlListSid != nil { + data.Set("IpAccessControlListSid", *params.IpAccessControlListSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateOriginationUrlParams Optional parameters for the method 'CreateOriginationUrl' +type CreateOriginationUrlParams struct { + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` +} + +/* +CreateOriginationUrl Method for CreateOriginationUrl + * @param TrunkSid The SID of the Trunk to associate the resource with. + * @param optional nil or *CreateOriginationUrlOpts - Optional Parameters: + * @param "Enabled" (bool) - Whether the URL is enabled. The default is `true`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "Priority" (int32) - The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. + * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. + * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. +@return TrunkingV1TrunkOriginationUrl +*/ +func (c *DefaultApiService) CreateOriginationUrl(TrunkSid string, params *CreateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreatePhoneNumberParams Optional parameters for the method 'CreatePhoneNumber' +type CreatePhoneNumberParams struct { + PhoneNumberSid *string `json:"PhoneNumberSid,omitempty"` +} + +/* +CreatePhoneNumber Method for CreatePhoneNumber + * @param TrunkSid The SID of the Trunk to associate the phone number with. + * @param optional nil or *CreatePhoneNumberOpts - Optional Parameters: + * @param "PhoneNumberSid" (string) - The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. +@return TrunkingV1TrunkPhoneNumber +*/ +func (c *DefaultApiService) CreatePhoneNumber(TrunkSid string, params *CreatePhoneNumberParams) (*TrunkingV1TrunkPhoneNumber, error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PhoneNumberSid != nil { + data.Set("PhoneNumberSid", *params.PhoneNumberSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateTrunkParams Optional parameters for the method 'CreateTrunk' +type CreateTrunkParams struct { + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` +} + +/* +CreateTrunk Method for CreateTrunk + * @param optional nil or *CreateTrunkOpts - Optional Parameters: + * @param "CnamLookupEnabled" (bool) - Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + * @param "DisasterRecoveryMethod" (string) - The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. + * @param "DisasterRecoveryUrl" (string) - The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. + * @param "DomainName" (string) - The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. + * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. +@return TrunkingV1Trunk +*/ +func (c *DefaultApiService) CreateTrunk(params *CreateTrunkParams) (*TrunkingV1Trunk, error) { + path := "/v1/Trunks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) + } + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteCredentialList Method for DeleteCredentialList + * @param TrunkSid The SID of the Trunk from which to delete the credential list. + * @param Sid The unique string that we created to identify the CredentialList resource to delete. +*/ +func (c *DefaultApiService) DeleteCredentialList(TrunkSid string, Sid string) (error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteIpAccessControlList Method for DeleteIpAccessControlList +Remove an associated IP Access Control List from a Trunk + * @param TrunkSid The SID of the Trunk from which to delete the IP Access Control List. + * @param Sid The unique string that we created to identify the IpAccessControlList resource to delete. +*/ +func (c *DefaultApiService) DeleteIpAccessControlList(TrunkSid string, Sid string) (error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteOriginationUrl Method for DeleteOriginationUrl + * @param TrunkSid The SID of the Trunk from which to delete the OriginationUrl. + * @param Sid The unique string that we created to identify the OriginationUrl resource to delete. +*/ +func (c *DefaultApiService) DeleteOriginationUrl(TrunkSid string, Sid string) (error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeletePhoneNumber Method for DeletePhoneNumber + * @param TrunkSid The SID of the Trunk from which to delete the PhoneNumber resource. + * @param Sid The unique string that we created to identify the PhoneNumber resource to delete. +*/ +func (c *DefaultApiService) DeletePhoneNumber(TrunkSid string, Sid string) (error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteTrunk Method for DeleteTrunk + * @param Sid The unique string that we created to identify the Trunk resource to delete. +*/ +func (c *DefaultApiService) DeleteTrunk(Sid string) (error) { + path := "/v1/Trunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchCredentialList Method for FetchCredentialList + * @param TrunkSid The SID of the Trunk from which to fetch the credential list. + * @param Sid The unique string that we created to identify the CredentialList resource to fetch. +@return TrunkingV1TrunkCredentialList +*/ +func (c *DefaultApiService) FetchCredentialList(TrunkSid string, Sid string) (*TrunkingV1TrunkCredentialList, error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkCredentialList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchIpAccessControlList Method for FetchIpAccessControlList + * @param TrunkSid The SID of the Trunk from which to fetch the IP Access Control List. + * @param Sid The unique string that we created to identify the IpAccessControlList resource to fetch. +@return TrunkingV1TrunkIpAccessControlList +*/ +func (c *DefaultApiService) FetchIpAccessControlList(TrunkSid string, Sid string) (*TrunkingV1TrunkIpAccessControlList, error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkIpAccessControlList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchOriginationUrl Method for FetchOriginationUrl + * @param TrunkSid The SID of the Trunk from which to fetch the OriginationUrl. + * @param Sid The unique string that we created to identify the OriginationUrl resource to fetch. +@return TrunkingV1TrunkOriginationUrl +*/ +func (c *DefaultApiService) FetchOriginationUrl(TrunkSid string, Sid string) (*TrunkingV1TrunkOriginationUrl, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchPhoneNumber Method for FetchPhoneNumber + * @param TrunkSid The SID of the Trunk from which to fetch the PhoneNumber resource. + * @param Sid The unique string that we created to identify the PhoneNumber resource to fetch. +@return TrunkingV1TrunkPhoneNumber +*/ +func (c *DefaultApiService) FetchPhoneNumber(TrunkSid string, Sid string) (*TrunkingV1TrunkPhoneNumber, error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkPhoneNumber{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecording Method for FetchRecording + * @param TrunkSid The SID of the Trunk from which to fetch the recording settings. +@return TrunkingV1TrunkRecording +*/ +func (c *DefaultApiService) FetchRecording(TrunkSid string) (*TrunkingV1TrunkRecording, error) { + path := "/v1/Trunks/{TrunkSid}/Recording" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchTrunk Method for FetchTrunk + * @param Sid The unique string that we created to identify the Trunk resource to fetch. +@return TrunkingV1Trunk +*/ +func (c *DefaultApiService) FetchTrunk(Sid string) (*TrunkingV1Trunk, error) { + path := "/v1/Trunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCredentialListParams Optional parameters for the method 'ListCredentialList' +type ListCredentialListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCredentialList Method for ListCredentialList + * @param TrunkSid The SID of the Trunk from which to read the credential lists. + * @param optional nil or *ListCredentialListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCredentialListResponse +*/ +func (c *DefaultApiService) ListCredentialList(TrunkSid string, params *ListCredentialListParams) (*ListCredentialListResponse, error) { + path := "/v1/Trunks/{TrunkSid}/CredentialLists" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCredentialListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIpAccessControlListParams Optional parameters for the method 'ListIpAccessControlList' +type ListIpAccessControlListParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIpAccessControlList Method for ListIpAccessControlList +List all IP Access Control Lists for a Trunk + * @param TrunkSid The SID of the Trunk from which to read the IP Access Control Lists. + * @param optional nil or *ListIpAccessControlListOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIpAccessControlListResponse +*/ +func (c *DefaultApiService) ListIpAccessControlList(TrunkSid string, params *ListIpAccessControlListParams) (*ListIpAccessControlListResponse, error) { + path := "/v1/Trunks/{TrunkSid}/IpAccessControlLists" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIpAccessControlListResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListOriginationUrlParams Optional parameters for the method 'ListOriginationUrl' +type ListOriginationUrlParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListOriginationUrl Method for ListOriginationUrl + * @param TrunkSid The SID of the Trunk from which to read the OriginationUrl. + * @param optional nil or *ListOriginationUrlOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListOriginationUrlResponse +*/ +func (c *DefaultApiService) ListOriginationUrl(TrunkSid string, params *ListOriginationUrlParams) (*ListOriginationUrlResponse, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListOriginationUrlResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListPhoneNumberParams Optional parameters for the method 'ListPhoneNumber' +type ListPhoneNumberParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListPhoneNumber Method for ListPhoneNumber + * @param TrunkSid The SID of the Trunk from which to read the PhoneNumber resources. + * @param optional nil or *ListPhoneNumberOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListPhoneNumberResponse +*/ +func (c *DefaultApiService) ListPhoneNumber(TrunkSid string, params *ListPhoneNumberParams) (*ListPhoneNumberResponse, error) { + path := "/v1/Trunks/{TrunkSid}/PhoneNumbers" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListPhoneNumberResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListTrunkParams Optional parameters for the method 'ListTrunk' +type ListTrunkParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListTrunk Method for ListTrunk + * @param optional nil or *ListTrunkOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListTrunkResponse +*/ +func (c *DefaultApiService) ListTrunk(params *ListTrunkParams) (*ListTrunkResponse, error) { + path := "/v1/Trunks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateOriginationUrlParams Optional parameters for the method 'UpdateOriginationUrl' +type UpdateOriginationUrlParams struct { + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + SipUrl *string `json:"SipUrl,omitempty"` + Weight *int32 `json:"Weight,omitempty"` +} + +/* +UpdateOriginationUrl Method for UpdateOriginationUrl + * @param TrunkSid The SID of the Trunk from which to update the OriginationUrl. + * @param Sid The unique string that we created to identify the OriginationUrl resource to update. + * @param optional nil or *UpdateOriginationUrlOpts - Optional Parameters: + * @param "Enabled" (bool) - Whether the URL is enabled. The default is `true`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "Priority" (int32) - The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. + * @param "SipUrl" (string) - The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. + * @param "Weight" (int32) - The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. +@return TrunkingV1TrunkOriginationUrl +*/ +func (c *DefaultApiService) UpdateOriginationUrl(TrunkSid string, Sid string, params *UpdateOriginationUrlParams) (*TrunkingV1TrunkOriginationUrl, error) { + path := "/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.SipUrl != nil { + data.Set("SipUrl", *params.SipUrl) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkOriginationUrl{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRecordingParams Optional parameters for the method 'UpdateRecording' +type UpdateRecordingParams struct { + Mode *string `json:"Mode,omitempty"` + Trim *string `json:"Trim,omitempty"` +} + +/* +UpdateRecording Method for UpdateRecording + * @param TrunkSid The SID of the Trunk that will have its recording settings updated. + * @param optional nil or *UpdateRecordingOpts - Optional Parameters: + * @param "Mode" (string) - The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. + * @param "Trim" (string) - The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. +@return TrunkingV1TrunkRecording +*/ +func (c *DefaultApiService) UpdateRecording(TrunkSid string, params *UpdateRecordingParams) (*TrunkingV1TrunkRecording, error) { + path := "/v1/Trunks/{TrunkSid}/Recording" + path = strings.Replace(path, "{"+"TrunkSid"+"}", TrunkSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Mode != nil { + data.Set("Mode", *params.Mode) + } + if params != nil && params.Trim != nil { + data.Set("Trim", *params.Trim) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1TrunkRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateTrunkParams Optional parameters for the method 'UpdateTrunk' +type UpdateTrunkParams struct { + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + DisasterRecoveryMethod *string `json:"DisasterRecoveryMethod,omitempty"` + DisasterRecoveryUrl *string `json:"DisasterRecoveryUrl,omitempty"` + DomainName *string `json:"DomainName,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Secure *bool `json:"Secure,omitempty"` + TransferMode *string `json:"TransferMode,omitempty"` +} + +/* +UpdateTrunk Method for UpdateTrunk + * @param Sid The unique string that we created to identify the OriginationUrl resource to update. + * @param optional nil or *UpdateTrunkOpts - Optional Parameters: + * @param "CnamLookupEnabled" (bool) - Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + * @param "DisasterRecoveryMethod" (string) - The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. + * @param "DisasterRecoveryUrl" (string) - The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. + * @param "DomainName" (string) - The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 64 characters long. + * @param "Secure" (bool) - Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. + * @param "TransferMode" (string) - The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. +@return TrunkingV1Trunk +*/ +func (c *DefaultApiService) UpdateTrunk(Sid string, params *UpdateTrunkParams) (*TrunkingV1Trunk, error) { + path := "/v1/Trunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.DisasterRecoveryMethod != nil { + data.Set("DisasterRecoveryMethod", *params.DisasterRecoveryMethod) + } + if params != nil && params.DisasterRecoveryUrl != nil { + data.Set("DisasterRecoveryUrl", *params.DisasterRecoveryUrl) + } + if params != nil && params.DomainName != nil { + data.Set("DomainName", *params.DomainName) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Secure != nil { + data.Set("Secure", fmt.Sprint(*params.Secure)) + } + if params != nil && params.TransferMode != nil { + data.Set("TransferMode", *params.TransferMode) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &TrunkingV1Trunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/trunking/v1/docs/CreateCredentialListRequest.md b/rest/trunking/v1/docs/CreateCredentialListRequest.md new file mode 100644 index 000000000..e45ddb5df --- /dev/null +++ b/rest/trunking/v1/docs/CreateCredentialListRequest.md @@ -0,0 +1,11 @@ +# CreateCredentialListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialListSid** | **string** | The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/CreateIpAccessControlListRequest.md b/rest/trunking/v1/docs/CreateIpAccessControlListRequest.md new file mode 100644 index 000000000..07385c185 --- /dev/null +++ b/rest/trunking/v1/docs/CreateIpAccessControlListRequest.md @@ -0,0 +1,11 @@ +# CreateIpAccessControlListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAccessControlListSid** | **string** | The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/CreateOriginationUrlRequest.md b/rest/trunking/v1/docs/CreateOriginationUrlRequest.md new file mode 100644 index 000000000..d452c2e92 --- /dev/null +++ b/rest/trunking/v1/docs/CreateOriginationUrlRequest.md @@ -0,0 +1,15 @@ +# CreateOriginationUrlRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the URL is enabled. The default is `true`. | +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | +**Priority** | **int32** | The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. | +**SipUrl** | **string** | The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. | +**Weight** | **int32** | The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/CreatePhoneNumberRequest.md b/rest/trunking/v1/docs/CreatePhoneNumberRequest.md new file mode 100644 index 000000000..4e24e7bd9 --- /dev/null +++ b/rest/trunking/v1/docs/CreatePhoneNumberRequest.md @@ -0,0 +1,11 @@ +# CreatePhoneNumberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PhoneNumberSid** | **string** | The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/CreateTrunkRequest.md b/rest/trunking/v1/docs/CreateTrunkRequest.md new file mode 100644 index 000000000..3717b9d0a --- /dev/null +++ b/rest/trunking/v1/docs/CreateTrunkRequest.md @@ -0,0 +1,17 @@ +# CreateTrunkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | [optional] +**DisasterRecoveryMethod** | **string** | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. | [optional] +**DisasterRecoveryUrl** | **string** | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. | [optional] +**DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**Secure** | **bool** | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. | [optional] +**TransferMode** | **string** | The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/DefaultApi.md b/rest/trunking/v1/docs/DefaultApi.md new file mode 100644 index 000000000..04492fd45 --- /dev/null +++ b/rest/trunking/v1/docs/DefaultApi.md @@ -0,0 +1,976 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCredentialList**](DefaultApi.md#CreateCredentialList) | **Post** /v1/Trunks/{TrunkSid}/CredentialLists | +[**CreateIpAccessControlList**](DefaultApi.md#CreateIpAccessControlList) | **Post** /v1/Trunks/{TrunkSid}/IpAccessControlLists | +[**CreateOriginationUrl**](DefaultApi.md#CreateOriginationUrl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls | +[**CreatePhoneNumber**](DefaultApi.md#CreatePhoneNumber) | **Post** /v1/Trunks/{TrunkSid}/PhoneNumbers | +[**CreateTrunk**](DefaultApi.md#CreateTrunk) | **Post** /v1/Trunks | +[**DeleteCredentialList**](DefaultApi.md#DeleteCredentialList) | **Delete** /v1/Trunks/{TrunkSid}/CredentialLists/{Sid} | +[**DeleteIpAccessControlList**](DefaultApi.md#DeleteIpAccessControlList) | **Delete** /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid} | +[**DeleteOriginationUrl**](DefaultApi.md#DeleteOriginationUrl) | **Delete** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +[**DeletePhoneNumber**](DefaultApi.md#DeletePhoneNumber) | **Delete** /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid} | +[**DeleteTrunk**](DefaultApi.md#DeleteTrunk) | **Delete** /v1/Trunks/{Sid} | +[**FetchCredentialList**](DefaultApi.md#FetchCredentialList) | **Get** /v1/Trunks/{TrunkSid}/CredentialLists/{Sid} | +[**FetchIpAccessControlList**](DefaultApi.md#FetchIpAccessControlList) | **Get** /v1/Trunks/{TrunkSid}/IpAccessControlLists/{Sid} | +[**FetchOriginationUrl**](DefaultApi.md#FetchOriginationUrl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +[**FetchPhoneNumber**](DefaultApi.md#FetchPhoneNumber) | **Get** /v1/Trunks/{TrunkSid}/PhoneNumbers/{Sid} | +[**FetchRecording**](DefaultApi.md#FetchRecording) | **Get** /v1/Trunks/{TrunkSid}/Recording | +[**FetchTrunk**](DefaultApi.md#FetchTrunk) | **Get** /v1/Trunks/{Sid} | +[**ListCredentialList**](DefaultApi.md#ListCredentialList) | **Get** /v1/Trunks/{TrunkSid}/CredentialLists | +[**ListIpAccessControlList**](DefaultApi.md#ListIpAccessControlList) | **Get** /v1/Trunks/{TrunkSid}/IpAccessControlLists | +[**ListOriginationUrl**](DefaultApi.md#ListOriginationUrl) | **Get** /v1/Trunks/{TrunkSid}/OriginationUrls | +[**ListPhoneNumber**](DefaultApi.md#ListPhoneNumber) | **Get** /v1/Trunks/{TrunkSid}/PhoneNumbers | +[**ListTrunk**](DefaultApi.md#ListTrunk) | **Get** /v1/Trunks | +[**UpdateOriginationUrl**](DefaultApi.md#UpdateOriginationUrl) | **Post** /v1/Trunks/{TrunkSid}/OriginationUrls/{Sid} | +[**UpdateRecording**](DefaultApi.md#UpdateRecording) | **Post** /v1/Trunks/{TrunkSid}/Recording | +[**UpdateTrunk**](DefaultApi.md#UpdateTrunk) | **Post** /v1/Trunks/{Sid} | + + + +## CreateCredentialList + +> TrunkingV1TrunkCredentialList CreateCredentialList(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk to associate the credential list with. | + **optional** | ***CreateCredentialListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCredentialListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CredentialListSid** | **optional.String**| The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. | + +### Return type + +[**TrunkingV1TrunkCredentialList**](trunking.v1.trunk.credential_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIpAccessControlList + +> TrunkingV1TrunkIpAccessControlList CreateIpAccessControlList(ctx, TrunkSid, optional) + + + +Associate an IP Access Control List with a Trunk + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk to associate the IP Access Control List with. | + **optional** | ***CreateIpAccessControlListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIpAccessControlListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **IpAccessControlListSid** | **optional.String**| The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. | + +### Return type + +[**TrunkingV1TrunkIpAccessControlList**](trunking.v1.trunk.ip_access_control_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateOriginationUrl + +> TrunkingV1TrunkOriginationUrl CreateOriginationUrl(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk to associate the resource with. | + **optional** | ***CreateOriginationUrlOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateOriginationUrlOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Enabled** | **optional.Bool**| Whether the URL is enabled. The default is `true`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **Priority** | **optional.Int32**| The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. | + **SipUrl** | **optional.String**| The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. | + **Weight** | **optional.Int32**| The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. | + +### Return type + +[**TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePhoneNumber + +> TrunkingV1TrunkPhoneNumber CreatePhoneNumber(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk to associate the phone number with. | + **optional** | ***CreatePhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreatePhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PhoneNumberSid** | **optional.String**| The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. | + +### Return type + +[**TrunkingV1TrunkPhoneNumber**](trunking.v1.trunk.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTrunk + +> TrunkingV1Trunk CreateTrunk(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CnamLookupEnabled** | **optional.Bool**| Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | + **DisasterRecoveryMethod** | **optional.String**| The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. | + **DisasterRecoveryUrl** | **optional.String**| The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. | + **DomainName** | **optional.String**| The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **Secure** | **optional.Bool**| Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. | + **TransferMode** | **optional.String**| The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. | + +### Return type + +[**TrunkingV1Trunk**](trunking.v1.trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredentialList + +> DeleteCredentialList(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to delete the credential list. | +**Sid** | **string**| The unique string that we created to identify the CredentialList resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteIpAccessControlList + +> DeleteIpAccessControlList(ctx, TrunkSid, Sid) + + + +Remove an associated IP Access Control List from a Trunk + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to delete the IP Access Control List. | +**Sid** | **string**| The unique string that we created to identify the IpAccessControlList resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteOriginationUrl + +> DeleteOriginationUrl(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to delete the OriginationUrl. | +**Sid** | **string**| The unique string that we created to identify the OriginationUrl resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePhoneNumber + +> DeletePhoneNumber(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to delete the PhoneNumber resource. | +**Sid** | **string**| The unique string that we created to identify the PhoneNumber resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTrunk + +> DeleteTrunk(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Trunk resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCredentialList + +> TrunkingV1TrunkCredentialList FetchCredentialList(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to fetch the credential list. | +**Sid** | **string**| The unique string that we created to identify the CredentialList resource to fetch. | + +### Return type + +[**TrunkingV1TrunkCredentialList**](trunking.v1.trunk.credential_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchIpAccessControlList + +> TrunkingV1TrunkIpAccessControlList FetchIpAccessControlList(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to fetch the IP Access Control List. | +**Sid** | **string**| The unique string that we created to identify the IpAccessControlList resource to fetch. | + +### Return type + +[**TrunkingV1TrunkIpAccessControlList**](trunking.v1.trunk.ip_access_control_list.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchOriginationUrl + +> TrunkingV1TrunkOriginationUrl FetchOriginationUrl(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to fetch the OriginationUrl. | +**Sid** | **string**| The unique string that we created to identify the OriginationUrl resource to fetch. | + +### Return type + +[**TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchPhoneNumber + +> TrunkingV1TrunkPhoneNumber FetchPhoneNumber(ctx, TrunkSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to fetch the PhoneNumber resource. | +**Sid** | **string**| The unique string that we created to identify the PhoneNumber resource to fetch. | + +### Return type + +[**TrunkingV1TrunkPhoneNumber**](trunking.v1.trunk.phone_number.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecording + +> TrunkingV1TrunkRecording FetchRecording(ctx, TrunkSid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to fetch the recording settings. | + +### Return type + +[**TrunkingV1TrunkRecording**](trunking.v1.trunk.recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchTrunk + +> TrunkingV1Trunk FetchTrunk(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Trunk resource to fetch. | + +### Return type + +[**TrunkingV1Trunk**](trunking.v1.trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredentialList + +> ListCredentialListResponse ListCredentialList(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to read the credential lists. | + **optional** | ***ListCredentialListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCredentialListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCredentialListResponse**](ListCredentialListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIpAccessControlList + +> ListIpAccessControlListResponse ListIpAccessControlList(ctx, TrunkSid, optional) + + + +List all IP Access Control Lists for a Trunk + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to read the IP Access Control Lists. | + **optional** | ***ListIpAccessControlListOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIpAccessControlListOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIpAccessControlListResponse**](ListIpAccessControlListResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListOriginationUrl + +> ListOriginationUrlResponse ListOriginationUrl(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to read the OriginationUrl. | + **optional** | ***ListOriginationUrlOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListOriginationUrlOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListOriginationUrlResponse**](ListOriginationUrlResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPhoneNumber + +> ListPhoneNumberResponse ListPhoneNumber(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to read the PhoneNumber resources. | + **optional** | ***ListPhoneNumberOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListPhoneNumberOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListPhoneNumberResponse**](ListPhoneNumberResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTrunk + +> ListTrunkResponse ListTrunk(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListTrunkResponse**](ListTrunkResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateOriginationUrl + +> TrunkingV1TrunkOriginationUrl UpdateOriginationUrl(ctx, TrunkSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk from which to update the OriginationUrl. | +**Sid** | **string**| The unique string that we created to identify the OriginationUrl resource to update. | + **optional** | ***UpdateOriginationUrlOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateOriginationUrlOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Enabled** | **optional.Bool**| Whether the URL is enabled. The default is `true`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **Priority** | **optional.Int32**| The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. | + **SipUrl** | **optional.String**| The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. | + **Weight** | **optional.Int32**| The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. | + +### Return type + +[**TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRecording + +> TrunkingV1TrunkRecording UpdateRecording(ctx, TrunkSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TrunkSid** | **string**| The SID of the Trunk that will have its recording settings updated. | + **optional** | ***UpdateRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Mode** | **optional.String**| The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. | + **Trim** | **optional.String**| The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. | + +### Return type + +[**TrunkingV1TrunkRecording**](trunking.v1.trunk.recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTrunk + +> TrunkingV1Trunk UpdateTrunk(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the OriginationUrl resource to update. | + **optional** | ***UpdateTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CnamLookupEnabled** | **optional.Bool**| Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | + **DisasterRecoveryMethod** | **optional.String**| The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. | + **DisasterRecoveryUrl** | **optional.String**| The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. | + **DomainName** | **optional.String**| The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 64 characters long. | + **Secure** | **optional.Bool**| Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. | + **TransferMode** | **optional.String**| The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. | + +### Return type + +[**TrunkingV1Trunk**](trunking.v1.trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/trunking/v1/docs/ListCredentialListResponse.md b/rest/trunking/v1/docs/ListCredentialListResponse.md new file mode 100644 index 000000000..977fe2f18 --- /dev/null +++ b/rest/trunking/v1/docs/ListCredentialListResponse.md @@ -0,0 +1,12 @@ +# ListCredentialListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CredentialLists** | [**[]TrunkingV1TrunkCredentialList**](trunking.v1.trunk.credential_list.md) | | [optional] +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/ListIpAccessControlListResponse.md b/rest/trunking/v1/docs/ListIpAccessControlListResponse.md new file mode 100644 index 000000000..f1ec94c0a --- /dev/null +++ b/rest/trunking/v1/docs/ListIpAccessControlListResponse.md @@ -0,0 +1,12 @@ +# ListIpAccessControlListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAccessControlLists** | [**[]TrunkingV1TrunkIpAccessControlList**](trunking.v1.trunk.ip_access_control_list.md) | | [optional] +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/ListOriginationUrlResponse.md b/rest/trunking/v1/docs/ListOriginationUrlResponse.md new file mode 100644 index 000000000..f17eb0013 --- /dev/null +++ b/rest/trunking/v1/docs/ListOriginationUrlResponse.md @@ -0,0 +1,12 @@ +# ListOriginationUrlResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | | [optional] +**OriginationUrls** | [**[]TrunkingV1TrunkOriginationUrl**](trunking.v1.trunk.origination_url.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/ListPhoneNumberResponse.md b/rest/trunking/v1/docs/ListPhoneNumberResponse.md new file mode 100644 index 000000000..e71a7c305 --- /dev/null +++ b/rest/trunking/v1/docs/ListPhoneNumberResponse.md @@ -0,0 +1,12 @@ +# ListPhoneNumberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | | [optional] +**PhoneNumbers** | [**[]TrunkingV1TrunkPhoneNumber**](trunking.v1.trunk.phone_number.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/ListTrunkResponse.md b/rest/trunking/v1/docs/ListTrunkResponse.md new file mode 100644 index 000000000..0cc869958 --- /dev/null +++ b/rest/trunking/v1/docs/ListTrunkResponse.md @@ -0,0 +1,12 @@ +# ListTrunkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListTrunkResponseMeta**](ListTrunkResponse_meta.md) | | [optional] +**Trunks** | [**[]TrunkingV1Trunk**](trunking.v1.trunk.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/ListTrunkResponseMeta.md b/rest/trunking/v1/docs/ListTrunkResponseMeta.md new file mode 100644 index 000000000..2ababeaff --- /dev/null +++ b/rest/trunking/v1/docs/ListTrunkResponseMeta.md @@ -0,0 +1,17 @@ +# ListTrunkResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1Trunk.md b/rest/trunking/v1/docs/TrunkingV1Trunk.md new file mode 100644 index 000000000..241f9b0af --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1Trunk.md @@ -0,0 +1,26 @@ +# TrunkingV1Trunk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AuthType** | **string** | | [optional] +**AuthTypeSet** | **[]string** | | [optional] +**CnamLookupEnabled** | **bool** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DisasterRecoveryMethod** | **string** | | [optional] +**DisasterRecoveryUrl** | **string** | | [optional] +**DomainName** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Recording** | [**map[string]interface{}**](.md) | | [optional] +**Secure** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**TransferMode** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md b/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md new file mode 100644 index 000000000..c91abfc00 --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1TrunkCredentialList.md @@ -0,0 +1,17 @@ +# TrunkingV1TrunkCredentialList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md b/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md new file mode 100644 index 000000000..a9955084e --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1TrunkIpAccessControlList.md @@ -0,0 +1,17 @@ +# TrunkingV1TrunkIpAccessControlList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Sid** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md b/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md new file mode 100644 index 000000000..3ab02d7d6 --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1TrunkOriginationUrl.md @@ -0,0 +1,21 @@ +# TrunkingV1TrunkOriginationUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**Priority** | **int32** | | [optional] +**Sid** | **string** | | [optional] +**SipUrl** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**Weight** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md b/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md new file mode 100644 index 000000000..3a00971a7 --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1TrunkPhoneNumber.md @@ -0,0 +1,36 @@ +# TrunkingV1TrunkPhoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AddressRequirements** | **string** | | [optional] +**ApiVersion** | **string** | | [optional] +**Beta** | **bool** | | [optional] +**Capabilities** | [**map[string]interface{}**](.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**PhoneNumber** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsApplicationSid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**TrunkSid** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceApplicationSid** | **string** | | [optional] +**VoiceCallerIdLookup** | **bool** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md b/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md new file mode 100644 index 000000000..7e2e3db62 --- /dev/null +++ b/rest/trunking/v1/docs/TrunkingV1TrunkRecording.md @@ -0,0 +1,12 @@ +# TrunkingV1TrunkRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | **string** | | [optional] +**Trim** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/UpdateOriginationUrlRequest.md b/rest/trunking/v1/docs/UpdateOriginationUrlRequest.md new file mode 100644 index 000000000..78f8c7aaf --- /dev/null +++ b/rest/trunking/v1/docs/UpdateOriginationUrlRequest.md @@ -0,0 +1,15 @@ +# UpdateOriginationUrlRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the URL is enabled. The default is `true`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**Priority** | **int32** | The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. | [optional] +**SipUrl** | **string** | The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. | [optional] +**Weight** | **int32** | The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/UpdateRecordingRequest.md b/rest/trunking/v1/docs/UpdateRecordingRequest.md new file mode 100644 index 000000000..ce39ed334 --- /dev/null +++ b/rest/trunking/v1/docs/UpdateRecordingRequest.md @@ -0,0 +1,12 @@ +# UpdateRecordingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | **string** | The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. | [optional] +**Trim** | **string** | The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/docs/UpdateTrunkRequest.md b/rest/trunking/v1/docs/UpdateTrunkRequest.md new file mode 100644 index 000000000..a2091271e --- /dev/null +++ b/rest/trunking/v1/docs/UpdateTrunkRequest.md @@ -0,0 +1,17 @@ +# UpdateTrunkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | [optional] +**DisasterRecoveryMethod** | **string** | The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. | [optional] +**DisasterRecoveryUrl** | **string** | The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. | [optional] +**DomainName** | **string** | The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 64 characters long. | [optional] +**Secure** | **bool** | Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. | [optional] +**TransferMode** | **string** | The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/trunking/v1/model_create_credential_list_request.go b/rest/trunking/v1/model_create_credential_list_request.go new file mode 100644 index 000000000..e702d5ab8 --- /dev/null +++ b/rest/trunking/v1/model_create_credential_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCredentialListRequest struct for CreateCredentialListRequest +type CreateCredentialListRequest struct { + // The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list. + CredentialListSid string `json:"CredentialListSid"` +} diff --git a/rest/trunking/v1/model_create_ip_access_control_list_request.go b/rest/trunking/v1/model_create_ip_access_control_list_request.go new file mode 100644 index 000000000..832bbd1f2 --- /dev/null +++ b/rest/trunking/v1/model_create_ip_access_control_list_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIpAccessControlListRequest struct for CreateIpAccessControlListRequest +type CreateIpAccessControlListRequest struct { + // The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk. + IpAccessControlListSid string `json:"IpAccessControlListSid"` +} diff --git a/rest/trunking/v1/model_create_origination_url_request.go b/rest/trunking/v1/model_create_origination_url_request.go new file mode 100644 index 000000000..c208ad7ae --- /dev/null +++ b/rest/trunking/v1/model_create_origination_url_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateOriginationUrlRequest struct for CreateOriginationUrlRequest +type CreateOriginationUrlRequest struct { + // Whether the URL is enabled. The default is `true`. + Enabled bool `json:"Enabled"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName"` + // The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. + Priority int32 `json:"Priority"` + // The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. + SipUrl string `json:"SipUrl"` + // The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. + Weight int32 `json:"Weight"` +} diff --git a/rest/trunking/v1/model_create_phone_number_request.go b/rest/trunking/v1/model_create_phone_number_request.go new file mode 100644 index 000000000..afa0f2db1 --- /dev/null +++ b/rest/trunking/v1/model_create_phone_number_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreatePhoneNumberRequest struct for CreatePhoneNumberRequest +type CreatePhoneNumberRequest struct { + // The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk. + PhoneNumberSid string `json:"PhoneNumberSid"` +} diff --git a/rest/trunking/v1/model_create_trunk_request.go b/rest/trunking/v1/model_create_trunk_request.go new file mode 100644 index 000000000..0e94d8645 --- /dev/null +++ b/rest/trunking/v1/model_create_trunk_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateTrunkRequest struct for CreateTrunkRequest +type CreateTrunkRequest struct { + // Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + // The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. + DisasterRecoveryMethod string `json:"DisasterRecoveryMethod,omitempty"` + // The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. + DisasterRecoveryUrl string `json:"DisasterRecoveryUrl,omitempty"` + // The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. + DomainName string `json:"DomainName,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. + Secure bool `json:"Secure,omitempty"` + // The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. + TransferMode string `json:"TransferMode,omitempty"` +} diff --git a/rest/trunking/v1/model_list_credential_list_response.go b/rest/trunking/v1/model_list_credential_list_response.go new file mode 100644 index 000000000..3f5c1955e --- /dev/null +++ b/rest/trunking/v1/model_list_credential_list_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCredentialListResponse struct for ListCredentialListResponse +type ListCredentialListResponse struct { + CredentialLists []TrunkingV1TrunkCredentialList `json:"CredentialLists,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/trunking/v1/model_list_ip_access_control_list_response.go b/rest/trunking/v1/model_list_ip_access_control_list_response.go new file mode 100644 index 000000000..7f94c9915 --- /dev/null +++ b/rest/trunking/v1/model_list_ip_access_control_list_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIpAccessControlListResponse struct for ListIpAccessControlListResponse +type ListIpAccessControlListResponse struct { + IpAccessControlLists []TrunkingV1TrunkIpAccessControlList `json:"IpAccessControlLists,omitempty"` + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/trunking/v1/model_list_origination_url_response.go b/rest/trunking/v1/model_list_origination_url_response.go new file mode 100644 index 000000000..17c5ce1ee --- /dev/null +++ b/rest/trunking/v1/model_list_origination_url_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListOriginationUrlResponse struct for ListOriginationUrlResponse +type ListOriginationUrlResponse struct { + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + OriginationUrls []TrunkingV1TrunkOriginationUrl `json:"OriginationUrls,omitempty"` +} diff --git a/rest/trunking/v1/model_list_phone_number_response.go b/rest/trunking/v1/model_list_phone_number_response.go new file mode 100644 index 000000000..4e7a28053 --- /dev/null +++ b/rest/trunking/v1/model_list_phone_number_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListPhoneNumberResponse struct for ListPhoneNumberResponse +type ListPhoneNumberResponse struct { + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + PhoneNumbers []TrunkingV1TrunkPhoneNumber `json:"PhoneNumbers,omitempty"` +} diff --git a/rest/trunking/v1/model_list_trunk_response.go b/rest/trunking/v1/model_list_trunk_response.go new file mode 100644 index 000000000..d7139d163 --- /dev/null +++ b/rest/trunking/v1/model_list_trunk_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTrunkResponse struct for ListTrunkResponse +type ListTrunkResponse struct { + Meta ListTrunkResponseMeta `json:"Meta,omitempty"` + Trunks []TrunkingV1Trunk `json:"Trunks,omitempty"` +} diff --git a/rest/trunking/v1/model_list_trunk_response_meta.go b/rest/trunking/v1/model_list_trunk_response_meta.go new file mode 100644 index 000000000..61d4b2881 --- /dev/null +++ b/rest/trunking/v1/model_list_trunk_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListTrunkResponseMeta struct for ListTrunkResponseMeta +type ListTrunkResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk.go b/rest/trunking/v1/model_trunking_v1_trunk.go new file mode 100644 index 000000000..0a08484ce --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk.go @@ -0,0 +1,33 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TrunkingV1Trunk struct for TrunkingV1Trunk +type TrunkingV1Trunk struct { + AccountSid string `json:"AccountSid,omitempty"` + AuthType string `json:"AuthType,omitempty"` + AuthTypeSet []string `json:"AuthTypeSet,omitempty"` + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DisasterRecoveryMethod string `json:"DisasterRecoveryMethod,omitempty"` + DisasterRecoveryUrl string `json:"DisasterRecoveryUrl,omitempty"` + DomainName string `json:"DomainName,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Recording map[string]interface{} `json:"Recording,omitempty"` + Secure bool `json:"Secure,omitempty"` + Sid string `json:"Sid,omitempty"` + TransferMode string `json:"TransferMode,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go b/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go new file mode 100644 index 000000000..c2806cdf9 --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk_credential_list.go @@ -0,0 +1,24 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TrunkingV1TrunkCredentialList struct for TrunkingV1TrunkCredentialList +type TrunkingV1TrunkCredentialList struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go b/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go new file mode 100644 index 000000000..bc378f831 --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk_ip_access_control_list.go @@ -0,0 +1,24 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TrunkingV1TrunkIpAccessControlList struct for TrunkingV1TrunkIpAccessControlList +type TrunkingV1TrunkIpAccessControlList struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Sid string `json:"Sid,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go b/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go new file mode 100644 index 000000000..715d2cc15 --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk_origination_url.go @@ -0,0 +1,28 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TrunkingV1TrunkOriginationUrl struct for TrunkingV1TrunkOriginationUrl +type TrunkingV1TrunkOriginationUrl struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Priority int32 `json:"Priority,omitempty"` + Sid string `json:"Sid,omitempty"` + SipUrl string `json:"SipUrl,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Url string `json:"Url,omitempty"` + Weight int32 `json:"Weight,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go b/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go new file mode 100644 index 000000000..3720b3c7a --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk_phone_number.go @@ -0,0 +1,43 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// TrunkingV1TrunkPhoneNumber struct for TrunkingV1TrunkPhoneNumber +type TrunkingV1TrunkPhoneNumber struct { + AccountSid string `json:"AccountSid,omitempty"` + AddressRequirements string `json:"AddressRequirements,omitempty"` + ApiVersion string `json:"ApiVersion,omitempty"` + Beta bool `json:"Beta,omitempty"` + Capabilities map[string]interface{} `json:"Capabilities,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + PhoneNumber string `json:"PhoneNumber,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsApplicationSid string `json:"SmsApplicationSid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + TrunkSid string `json:"TrunkSid,omitempty"` + Url string `json:"Url,omitempty"` + VoiceApplicationSid string `json:"VoiceApplicationSid,omitempty"` + VoiceCallerIdLookup bool `json:"VoiceCallerIdLookup,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/trunking/v1/model_trunking_v1_trunk_recording.go b/rest/trunking/v1/model_trunking_v1_trunk_recording.go new file mode 100644 index 000000000..1db67d5c3 --- /dev/null +++ b/rest/trunking/v1/model_trunking_v1_trunk_recording.go @@ -0,0 +1,16 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// TrunkingV1TrunkRecording struct for TrunkingV1TrunkRecording +type TrunkingV1TrunkRecording struct { + Mode string `json:"Mode,omitempty"` + Trim string `json:"Trim,omitempty"` +} diff --git a/rest/trunking/v1/model_update_origination_url_request.go b/rest/trunking/v1/model_update_origination_url_request.go new file mode 100644 index 000000000..438736302 --- /dev/null +++ b/rest/trunking/v1/model_update_origination_url_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateOriginationUrlRequest struct for UpdateOriginationUrlRequest +type UpdateOriginationUrlRequest struct { + // Whether the URL is enabled. The default is `true`. + Enabled bool `json:"Enabled,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI. + Priority int32 `json:"Priority,omitempty"` + // The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported. + SipUrl string `json:"SipUrl,omitempty"` + // The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority. + Weight int32 `json:"Weight,omitempty"` +} diff --git a/rest/trunking/v1/model_update_recording_request.go b/rest/trunking/v1/model_update_recording_request.go new file mode 100644 index 000000000..bf1ed9036 --- /dev/null +++ b/rest/trunking/v1/model_update_recording_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRecordingRequest struct for UpdateRecordingRequest +type UpdateRecordingRequest struct { + // The recording mode for the trunk. Can be do-not-record (default), record-from-ringing, record-from-answer, record-from-ringing-dual, or record-from-answer-dual. + Mode string `json:"Mode,omitempty"` + // The recording trim setting for the trunk. Can be do-not-trim (default) or trim-silence. + Trim string `json:"Trim,omitempty"` +} diff --git a/rest/trunking/v1/model_update_trunk_request.go b/rest/trunking/v1/model_update_trunk_request.go new file mode 100644 index 000000000..69e17d4d8 --- /dev/null +++ b/rest/trunking/v1/model_update_trunk_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateTrunkRequest struct for UpdateTrunkRequest +type UpdateTrunkRequest struct { + // Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + // The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`. + DisasterRecoveryMethod string `json:"DisasterRecoveryMethod,omitempty"` + // The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information. + DisasterRecoveryUrl string `json:"DisasterRecoveryUrl,omitempty"` + // The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information. + DomainName string `json:"DomainName,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 64 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information. + Secure bool `json:"Secure,omitempty"` + // The call transfer settings for the trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more information. + TransferMode string `json:"TransferMode,omitempty"` +} diff --git a/rest/trunking/v1/response.go b/rest/trunking/v1/response.go new file mode 100644 index 000000000..da18a8457 --- /dev/null +++ b/rest/trunking/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Trunking + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/verify/v2/.openapi-generator-ignore b/rest/verify/v2/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/verify/v2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/verify/v2/README.md b/rest/verify/v2/README.md new file mode 100644 index 000000000..3a83a26de --- /dev/null +++ b/rest/verify/v2/README.md @@ -0,0 +1,146 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateAccessToken**](docs/DefaultApi.md#createaccesstoken) | **Post** /v2/Services/{ServiceSid}/AccessTokens | +*DefaultApi* | [**CreateBucket**](docs/DefaultApi.md#createbucket) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | +*DefaultApi* | [**CreateChallenge**](docs/DefaultApi.md#createchallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | +*DefaultApi* | [**CreateEntity**](docs/DefaultApi.md#createentity) | **Post** /v2/Services/{ServiceSid}/Entities | +*DefaultApi* | [**CreateFactor**](docs/DefaultApi.md#createfactor) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | +*DefaultApi* | [**CreateMessagingConfiguration**](docs/DefaultApi.md#createmessagingconfiguration) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations | +*DefaultApi* | [**CreateRateLimit**](docs/DefaultApi.md#createratelimit) | **Post** /v2/Services/{ServiceSid}/RateLimits | +*DefaultApi* | [**CreateService**](docs/DefaultApi.md#createservice) | **Post** /v2/Services | +*DefaultApi* | [**CreateVerification**](docs/DefaultApi.md#createverification) | **Post** /v2/Services/{ServiceSid}/Verifications | +*DefaultApi* | [**CreateVerificationCheck**](docs/DefaultApi.md#createverificationcheck) | **Post** /v2/Services/{ServiceSid}/VerificationCheck | +*DefaultApi* | [**CreateWebhook**](docs/DefaultApi.md#createwebhook) | **Post** /v2/Services/{ServiceSid}/Webhooks | +*DefaultApi* | [**DeleteBucket**](docs/DefaultApi.md#deletebucket) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +*DefaultApi* | [**DeleteEntity**](docs/DefaultApi.md#deleteentity) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity} | +*DefaultApi* | [**DeleteFactor**](docs/DefaultApi.md#deletefactor) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +*DefaultApi* | [**DeleteMessagingConfiguration**](docs/DefaultApi.md#deletemessagingconfiguration) | **Delete** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +*DefaultApi* | [**DeleteRateLimit**](docs/DefaultApi.md#deleteratelimit) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +*DefaultApi* | [**DeleteService**](docs/DefaultApi.md#deleteservice) | **Delete** /v2/Services/{Sid} | +*DefaultApi* | [**DeleteWebhook**](docs/DefaultApi.md#deletewebhook) | **Delete** /v2/Services/{ServiceSid}/Webhooks/{Sid} | +*DefaultApi* | [**FetchBucket**](docs/DefaultApi.md#fetchbucket) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +*DefaultApi* | [**FetchChallenge**](docs/DefaultApi.md#fetchchallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | +*DefaultApi* | [**FetchEntity**](docs/DefaultApi.md#fetchentity) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity} | +*DefaultApi* | [**FetchFactor**](docs/DefaultApi.md#fetchfactor) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +*DefaultApi* | [**FetchForm**](docs/DefaultApi.md#fetchform) | **Get** /v2/Forms/{FormType} | +*DefaultApi* | [**FetchMessagingConfiguration**](docs/DefaultApi.md#fetchmessagingconfiguration) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +*DefaultApi* | [**FetchRateLimit**](docs/DefaultApi.md#fetchratelimit) | **Get** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +*DefaultApi* | [**FetchService**](docs/DefaultApi.md#fetchservice) | **Get** /v2/Services/{Sid} | +*DefaultApi* | [**FetchVerification**](docs/DefaultApi.md#fetchverification) | **Get** /v2/Services/{ServiceSid}/Verifications/{Sid} | +*DefaultApi* | [**FetchWebhook**](docs/DefaultApi.md#fetchwebhook) | **Get** /v2/Services/{ServiceSid}/Webhooks/{Sid} | +*DefaultApi* | [**ListBucket**](docs/DefaultApi.md#listbucket) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | +*DefaultApi* | [**ListChallenge**](docs/DefaultApi.md#listchallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | +*DefaultApi* | [**ListEntity**](docs/DefaultApi.md#listentity) | **Get** /v2/Services/{ServiceSid}/Entities | +*DefaultApi* | [**ListFactor**](docs/DefaultApi.md#listfactor) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | +*DefaultApi* | [**ListMessagingConfiguration**](docs/DefaultApi.md#listmessagingconfiguration) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations | +*DefaultApi* | [**ListRateLimit**](docs/DefaultApi.md#listratelimit) | **Get** /v2/Services/{ServiceSid}/RateLimits | +*DefaultApi* | [**ListService**](docs/DefaultApi.md#listservice) | **Get** /v2/Services | +*DefaultApi* | [**ListWebhook**](docs/DefaultApi.md#listwebhook) | **Get** /v2/Services/{ServiceSid}/Webhooks | +*DefaultApi* | [**UpdateBucket**](docs/DefaultApi.md#updatebucket) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +*DefaultApi* | [**UpdateChallenge**](docs/DefaultApi.md#updatechallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | +*DefaultApi* | [**UpdateFactor**](docs/DefaultApi.md#updatefactor) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +*DefaultApi* | [**UpdateMessagingConfiguration**](docs/DefaultApi.md#updatemessagingconfiguration) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +*DefaultApi* | [**UpdateRateLimit**](docs/DefaultApi.md#updateratelimit) | **Post** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +*DefaultApi* | [**UpdateService**](docs/DefaultApi.md#updateservice) | **Post** /v2/Services/{Sid} | +*DefaultApi* | [**UpdateVerification**](docs/DefaultApi.md#updateverification) | **Post** /v2/Services/{ServiceSid}/Verifications/{Sid} | +*DefaultApi* | [**UpdateWebhook**](docs/DefaultApi.md#updatewebhook) | **Post** /v2/Services/{ServiceSid}/Webhooks/{Sid} | + + +## Documentation For Models + + - [CreateAccessTokenRequest](docs/CreateAccessTokenRequest.md) + - [CreateBucketRequest](docs/CreateBucketRequest.md) + - [CreateChallengeRequest](docs/CreateChallengeRequest.md) + - [CreateEntityRequest](docs/CreateEntityRequest.md) + - [CreateFactorRequest](docs/CreateFactorRequest.md) + - [CreateMessagingConfigurationRequest](docs/CreateMessagingConfigurationRequest.md) + - [CreateRateLimitRequest](docs/CreateRateLimitRequest.md) + - [CreateServiceRequest](docs/CreateServiceRequest.md) + - [CreateVerificationCheckRequest](docs/CreateVerificationCheckRequest.md) + - [CreateVerificationRequest](docs/CreateVerificationRequest.md) + - [CreateWebhookRequest](docs/CreateWebhookRequest.md) + - [ListBucketResponse](docs/ListBucketResponse.md) + - [ListChallengeResponse](docs/ListChallengeResponse.md) + - [ListEntityResponse](docs/ListEntityResponse.md) + - [ListFactorResponse](docs/ListFactorResponse.md) + - [ListMessagingConfigurationResponse](docs/ListMessagingConfigurationResponse.md) + - [ListRateLimitResponse](docs/ListRateLimitResponse.md) + - [ListServiceResponse](docs/ListServiceResponse.md) + - [ListServiceResponseMeta](docs/ListServiceResponseMeta.md) + - [ListWebhookResponse](docs/ListWebhookResponse.md) + - [UpdateBucketRequest](docs/UpdateBucketRequest.md) + - [UpdateChallengeRequest](docs/UpdateChallengeRequest.md) + - [UpdateFactorRequest](docs/UpdateFactorRequest.md) + - [UpdateMessagingConfigurationRequest](docs/UpdateMessagingConfigurationRequest.md) + - [UpdateRateLimitRequest](docs/UpdateRateLimitRequest.md) + - [UpdateServiceRequest](docs/UpdateServiceRequest.md) + - [UpdateVerificationRequest](docs/UpdateVerificationRequest.md) + - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) + - [VerifyV2Form](docs/VerifyV2Form.md) + - [VerifyV2Service](docs/VerifyV2Service.md) + - [VerifyV2ServiceAccessToken](docs/VerifyV2ServiceAccessToken.md) + - [VerifyV2ServiceEntity](docs/VerifyV2ServiceEntity.md) + - [VerifyV2ServiceEntityChallenge](docs/VerifyV2ServiceEntityChallenge.md) + - [VerifyV2ServiceEntityFactor](docs/VerifyV2ServiceEntityFactor.md) + - [VerifyV2ServiceMessagingConfiguration](docs/VerifyV2ServiceMessagingConfiguration.md) + - [VerifyV2ServiceRateLimit](docs/VerifyV2ServiceRateLimit.md) + - [VerifyV2ServiceRateLimitBucket](docs/VerifyV2ServiceRateLimitBucket.md) + - [VerifyV2ServiceVerification](docs/VerifyV2ServiceVerification.md) + - [VerifyV2ServiceVerificationCheck](docs/VerifyV2ServiceVerificationCheck.md) + - [VerifyV2ServiceWebhook](docs/VerifyV2ServiceWebhook.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/verify/v2/api_default.go b/rest/verify/v2/api_default.go new file mode 100644 index 000000000..cc4b66bfa --- /dev/null +++ b/rest/verify/v2/api_default.go @@ -0,0 +1,2006 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://verify.twilio.com"), + } +} +// CreateAccessTokenParams Optional parameters for the method 'CreateAccessToken' +type CreateAccessTokenParams struct { + FactorType *string `json:"FactorType,omitempty"` + Identity *string `json:"Identity,omitempty"` +} + +/* +CreateAccessToken Method for CreateAccessToken +Create a new enrollment Access Token for the Entity + * @param ServiceSid The unique SID identifier of the Service. + * @param optional nil or *CreateAccessTokenOpts - Optional Parameters: + * @param "FactorType" (string) - The Type of this Factor. Eg. `push` + * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. +@return VerifyV2ServiceAccessToken +*/ +func (c *DefaultApiService) CreateAccessToken(ServiceSid string, params *CreateAccessTokenParams) (*VerifyV2ServiceAccessToken, error) { + path := "/v2/Services/{ServiceSid}/AccessTokens" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceAccessToken{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateBucketParams Optional parameters for the method 'CreateBucket' +type CreateBucketParams struct { + Interval *int32 `json:"Interval,omitempty"` + Max *int32 `json:"Max,omitempty"` +} + +/* +CreateBucket Method for CreateBucket +Create a new Bucket for a Rate Limit + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. + * @param optional nil or *CreateBucketOpts - Optional Parameters: + * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. + * @param "Max" (int32) - Maximum number of requests permitted in during the interval. +@return VerifyV2ServiceRateLimitBucket +*/ +func (c *DefaultApiService) CreateBucket(ServiceSid string, RateLimitSid string, params *CreateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) + } + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateChallengeParams Optional parameters for the method 'CreateChallenge' +type CreateChallengeParams struct { + DetailsFields *[]map[string]interface{} `json:"Details.Fields,omitempty"` + DetailsMessage *string `json:"Details.Message,omitempty"` + ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` + FactorSid *string `json:"FactorSid,omitempty"` + HiddenDetails *map[string]interface{} `json:"HiddenDetails,omitempty"` +} + +/* +CreateChallenge Method for CreateChallenge +Create a new Challenge for the Factor + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. + * @param optional nil or *CreateChallengeOpts - Optional Parameters: + * @param "DetailsFields" ([]map[string]interface{}) - A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field. Used when `factor_type` is `push`. + * @param "DetailsMessage" (string) - Shown to the user when the push notification arrives. Required when `factor_type` is `push` + * @param "ExpirationDate" (time.Time) - The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. + * @param "FactorSid" (string) - The unique SID identifier of the Factor. + * @param "HiddenDetails" (map[string]interface{}) - Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` +@return VerifyV2ServiceEntityChallenge +*/ +func (c *DefaultApiService) CreateChallenge(ServiceSid string, Identity string, params *CreateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.DetailsFields != nil { + v, err := json.Marshal(params.DetailsFields) + + if err != nil { + return nil, err + } + + data.Set("DetailsFields", fmt.Sprint(v)) + } + if params != nil && params.DetailsMessage != nil { + data.Set("DetailsMessage", *params.DetailsMessage) + } + if params != nil && params.ExpirationDate != nil { + data.Set("ExpirationDate", fmt.Sprint(*params.ExpirationDate)) + } + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) + } + if params != nil && params.HiddenDetails != nil { + v, err := json.Marshal(params.HiddenDetails) + + if err != nil { + return nil, err + } + + data.Set("HiddenDetails", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateEntityParams Optional parameters for the method 'CreateEntity' +type CreateEntityParams struct { + Identity *string `json:"Identity,omitempty"` +} + +/* +CreateEntity Method for CreateEntity +Create a new Entity for the Service + * @param ServiceSid The unique SID identifier of the Service. + * @param optional nil or *CreateEntityOpts - Optional Parameters: + * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. +@return VerifyV2ServiceEntity +*/ +func (c *DefaultApiService) CreateEntity(ServiceSid string, params *CreateEntityParams) (*VerifyV2ServiceEntity, error) { + path := "/v2/Services/{ServiceSid}/Entities" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateFactorParams Optional parameters for the method 'CreateFactor' +type CreateFactorParams struct { + BindingAlg *string `json:"Binding.Alg,omitempty"` + BindingPublicKey *string `json:"Binding.PublicKey,omitempty"` + ConfigAppId *string `json:"Config.AppId,omitempty"` + ConfigNotificationPlatform *string `json:"Config.NotificationPlatform,omitempty"` + ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FactorType *string `json:"FactorType,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateFactor Method for CreateFactor +Create a new Factor for the Entity + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Factor + * @param optional nil or *CreateFactorOpts - Optional Parameters: + * @param "BindingAlg" (string) - The algorithm used when `factor_type` is `push`. Algorithm supported: `ES256` + * @param "BindingPublicKey" (string) - The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64 + * @param "ConfigAppId" (string) - The ID that uniquely identifies your app in the Google or Apple store, such as `com.example.myapp`. Required when `factor_type` is `push` + * @param "ConfigNotificationPlatform" (string) - The transport technology used to generate the Notification Token. Can be `apn` or `fcm`. Required when `factor_type` is `push` + * @param "ConfigNotificationToken" (string) - For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` + * @param "ConfigSdkVersion" (string) - The Verify Push SDK version used to configure the factor + * @param "FactorType" (string) - The Type of this Factor. Currently only `push` is supported + * @param "FriendlyName" (string) - The friendly name of this Factor +@return VerifyV2ServiceEntityFactor +*/ +func (c *DefaultApiService) CreateFactor(ServiceSid string, Identity string, params *CreateFactorParams) (*VerifyV2ServiceEntityFactor, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.BindingAlg != nil { + data.Set("BindingAlg", *params.BindingAlg) + } + if params != nil && params.BindingPublicKey != nil { + data.Set("BindingPublicKey", *params.BindingPublicKey) + } + if params != nil && params.ConfigAppId != nil { + data.Set("ConfigAppId", *params.ConfigAppId) + } + if params != nil && params.ConfigNotificationPlatform != nil { + data.Set("ConfigNotificationPlatform", *params.ConfigNotificationPlatform) + } + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) + } + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) + } + if params != nil && params.FactorType != nil { + data.Set("FactorType", *params.FactorType) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateMessagingConfigurationParams Optional parameters for the method 'CreateMessagingConfiguration' +type CreateMessagingConfigurationParams struct { + Country *string `json:"Country,omitempty"` + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` +} + +/* +CreateMessagingConfiguration Method for CreateMessagingConfiguration +Create a new MessagingConfiguration for a service. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. + * @param optional nil or *CreateMessagingConfigurationOpts - Optional Parameters: + * @param "Country" (string) - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. + * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. +@return VerifyV2ServiceMessagingConfiguration +*/ +func (c *DefaultApiService) CreateMessagingConfiguration(ServiceSid string, params *CreateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Country != nil { + data.Set("Country", *params.Country) + } + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRateLimitParams Optional parameters for the method 'CreateRateLimit' +type CreateRateLimitParams struct { + Description *string `json:"Description,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +CreateRateLimit Method for CreateRateLimit +Create a new Rate Limit for a Service + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param optional nil or *CreateRateLimitOpts - Optional Parameters: + * @param "Description" (string) - Description of this Rate Limit + * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** +@return VerifyV2ServiceRateLimit +*/ +func (c *DefaultApiService) CreateRateLimit(ServiceSid string, params *CreateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { + path := "/v2/Services/{ServiceSid}/RateLimits" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateServiceParams Optional parameters for the method 'CreateService' +type CreateServiceParams struct { + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` +} + +/* +CreateService Method for CreateService +Create a new Verification Service. + * @param optional nil or *CreateServiceOpts - Optional Parameters: + * @param "CodeLength" (int32) - The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. + * @param "CustomCodeEnabled" (bool) - Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. + * @param "DoNotShareWarningEnabled" (bool) - Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` + * @param "DtmfInputRequired" (bool) - Whether to ask the user to press a number before delivering the verify code in a phone call. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** + * @param "LookupEnabled" (bool) - Whether to perform a lookup with each verification started and return info about the phone number. + * @param "Psd2Enabled" (bool) - Whether to pass PSD2 transaction parameters when starting a verification. + * @param "PushApnCredentialSid" (string) - Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + * @param "PushFcmCredentialSid" (string) - Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + * @param "PushIncludeDate" (bool) - Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true + * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. + * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. +@return VerifyV2Service +*/ +func (c *DefaultApiService) CreateService(params *CreateServiceParams) (*VerifyV2Service, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) + } + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) + } + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) + } + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) + } + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) + } + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) + } + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) + } + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) + } + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) + } + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateVerificationParams Optional parameters for the method 'CreateVerification' +type CreateVerificationParams struct { + Amount *string `json:"Amount,omitempty"` + AppHash *string `json:"AppHash,omitempty"` + Channel *string `json:"Channel,omitempty"` + ChannelConfiguration *map[string]interface{} `json:"ChannelConfiguration,omitempty"` + CustomCode *string `json:"CustomCode,omitempty"` + CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` + CustomMessage *string `json:"CustomMessage,omitempty"` + Locale *string `json:"Locale,omitempty"` + Payee *string `json:"Payee,omitempty"` + RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` + SendDigits *string `json:"SendDigits,omitempty"` + To *string `json:"To,omitempty"` +} + +/* +CreateVerification Method for CreateVerification +Create a new Verification using a Service + * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. + * @param optional nil or *CreateVerificationOpts - Optional Parameters: + * @param "Amount" (string) - The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + * @param "AppHash" (string) - Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. + * @param "Channel" (string) - The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. + * @param "ChannelConfiguration" (map[string]interface{}) - [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. + * @param "CustomCode" (string) - A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. + * @param "CustomFriendlyName" (string) - A custom user defined friendly name that overwrites the existing one in the verification message + * @param "CustomMessage" (string) - The text of a custom message to use for the verification. + * @param "Locale" (string) - The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` + * @param "Payee" (string) - The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + * @param "RateLimits" (map[string]interface{}) - The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. + * @param "SendDigits" (string) - The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). + * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). +@return VerifyV2ServiceVerification +*/ +func (c *DefaultApiService) CreateVerification(ServiceSid string, params *CreateVerificationParams) (*VerifyV2ServiceVerification, error) { + path := "/v2/Services/{ServiceSid}/Verifications" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) + } + if params != nil && params.AppHash != nil { + data.Set("AppHash", *params.AppHash) + } + if params != nil && params.Channel != nil { + data.Set("Channel", *params.Channel) + } + if params != nil && params.ChannelConfiguration != nil { + v, err := json.Marshal(params.ChannelConfiguration) + + if err != nil { + return nil, err + } + + data.Set("ChannelConfiguration", fmt.Sprint(v)) + } + if params != nil && params.CustomCode != nil { + data.Set("CustomCode", *params.CustomCode) + } + if params != nil && params.CustomFriendlyName != nil { + data.Set("CustomFriendlyName", *params.CustomFriendlyName) + } + if params != nil && params.CustomMessage != nil { + data.Set("CustomMessage", *params.CustomMessage) + } + if params != nil && params.Locale != nil { + data.Set("Locale", *params.Locale) + } + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) + } + if params != nil && params.RateLimits != nil { + v, err := json.Marshal(params.RateLimits) + + if err != nil { + return nil, err + } + + data.Set("RateLimits", fmt.Sprint(v)) + } + if params != nil && params.SendDigits != nil { + data.Set("SendDigits", *params.SendDigits) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateVerificationCheckParams Optional parameters for the method 'CreateVerificationCheck' +type CreateVerificationCheckParams struct { + Amount *string `json:"Amount,omitempty"` + Code *string `json:"Code,omitempty"` + Payee *string `json:"Payee,omitempty"` + To *string `json:"To,omitempty"` + VerificationSid *string `json:"VerificationSid,omitempty"` +} + +/* +CreateVerificationCheck Method for CreateVerificationCheck +challenge a specific Verification Check. + * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. + * @param optional nil or *CreateVerificationCheckOpts - Optional Parameters: + * @param "Amount" (string) - The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + * @param "Code" (string) - The 4-10 character string being verified. + * @param "Payee" (string) - The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). + * @param "VerificationSid" (string) - A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. +@return VerifyV2ServiceVerificationCheck +*/ +func (c *DefaultApiService) CreateVerificationCheck(ServiceSid string, params *CreateVerificationCheckParams) (*VerifyV2ServiceVerificationCheck, error) { + path := "/v2/Services/{ServiceSid}/VerificationCheck" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Amount != nil { + data.Set("Amount", *params.Amount) + } + if params != nil && params.Code != nil { + data.Set("Code", *params.Code) + } + if params != nil && params.Payee != nil { + data.Set("Payee", *params.Payee) + } + if params != nil && params.To != nil { + data.Set("To", *params.To) + } + if params != nil && params.VerificationSid != nil { + data.Set("VerificationSid", *params.VerificationSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceVerificationCheck{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateWebhookParams Optional parameters for the method 'CreateWebhook' +type CreateWebhookParams struct { + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +CreateWebhook Method for CreateWebhook +Create a new Webhook for the Service + * @param ServiceSid The unique SID identifier of the Service. + * @param optional nil or *CreateWebhookOpts - Optional Parameters: + * @param "EventTypes" ([]string) - The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` + * @param "FriendlyName" (string) - The string that you assigned to describe the webhook. **This value should not contain PII.** + * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` + * @param "WebhookUrl" (string) - The URL associated with this Webhook. +@return VerifyV2ServiceWebhook +*/ +func (c *DefaultApiService) CreateWebhook(ServiceSid string, params *CreateWebhookParams) (*VerifyV2ServiceWebhook, error) { + path := "/v2/Services/{ServiceSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteBucket Method for DeleteBucket +Delete a specific Bucket. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. + * @param Sid A 34 character string that uniquely identifies this Bucket. +*/ +func (c *DefaultApiService) DeleteBucket(ServiceSid string, RateLimitSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteEntity Method for DeleteEntity +Delete a specific Entity. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity The unique external identifier for the Entity of the Service +*/ +func (c *DefaultApiService) DeleteEntity(ServiceSid string, Identity string) (error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteFactor Method for DeleteFactor +Delete a specific Factor. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Factor + * @param Sid A 34 character string that uniquely identifies this Factor. +*/ +func (c *DefaultApiService) DeleteFactor(ServiceSid string, Identity string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteMessagingConfiguration Method for DeleteMessagingConfiguration +Delete a specific MessagingConfiguration. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. + * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. +*/ +func (c *DefaultApiService) DeleteMessagingConfiguration(ServiceSid string, Country string) (error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Country"+"}", Country, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRateLimit Method for DeleteRateLimit +Delete a specific Rate Limit. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. +*/ +func (c *DefaultApiService) DeleteRateLimit(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteService Method for DeleteService +Delete a specific Verification Service Instance. + * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete. +*/ +func (c *DefaultApiService) DeleteService(Sid string) (error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteWebhook Method for DeleteWebhook +Delete a specific Webhook. + * @param ServiceSid The unique SID identifier of the Service. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. +*/ +func (c *DefaultApiService) DeleteWebhook(ServiceSid string, Sid string) (error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchBucket Method for FetchBucket +Fetch a specific Bucket. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. + * @param Sid A 34 character string that uniquely identifies this Bucket. +@return VerifyV2ServiceRateLimitBucket +*/ +func (c *DefaultApiService) FetchBucket(ServiceSid string, RateLimitSid string, Sid string) (*VerifyV2ServiceRateLimitBucket, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchChallenge Method for FetchChallenge +Fetch a specific Challenge. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. + * @param Sid A 34 character string that uniquely identifies this Challenge. +@return VerifyV2ServiceEntityChallenge +*/ +func (c *DefaultApiService) FetchChallenge(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityChallenge, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchEntity Method for FetchEntity +Fetch a specific Entity. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity The unique external identifier for the Entity of the Service +@return VerifyV2ServiceEntity +*/ +func (c *DefaultApiService) FetchEntity(ServiceSid string, Identity string) (*VerifyV2ServiceEntity, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntity{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchFactor Method for FetchFactor +Fetch a specific Factor. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Factor + * @param Sid A 34 character string that uniquely identifies this Factor. +@return VerifyV2ServiceEntityFactor +*/ +func (c *DefaultApiService) FetchFactor(ServiceSid string, Identity string, Sid string) (*VerifyV2ServiceEntityFactor, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchForm Method for FetchForm +Fetch the forms for a specific Form Type. + * @param FormType The Type of this Form. Currently only `form-push` is supported. +@return VerifyV2Form +*/ +func (c *DefaultApiService) FetchForm(FormType string) (*VerifyV2Form, error) { + path := "/v2/Forms/{FormType}" + path = strings.Replace(path, "{"+"FormType"+"}", FormType, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2Form{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchMessagingConfiguration Method for FetchMessagingConfiguration +Fetch a specific MessagingConfiguration. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. + * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. +@return VerifyV2ServiceMessagingConfiguration +*/ +func (c *DefaultApiService) FetchMessagingConfiguration(ServiceSid string, Country string) (*VerifyV2ServiceMessagingConfiguration, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Country"+"}", Country, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRateLimit Method for FetchRateLimit +Fetch a specific Rate Limit. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. +@return VerifyV2ServiceRateLimit +*/ +func (c *DefaultApiService) FetchRateLimit(ServiceSid string, Sid string) (*VerifyV2ServiceRateLimit, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchService Method for FetchService +Fetch specific Verification Service Instance. + * @param Sid The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. +@return VerifyV2Service +*/ +func (c *DefaultApiService) FetchService(Sid string) (*VerifyV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchVerification Method for FetchVerification +Fetch a specific Verification + * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Verification resource to fetch. +@return VerifyV2ServiceVerification +*/ +func (c *DefaultApiService) FetchVerification(ServiceSid string, Sid string) (*VerifyV2ServiceVerification, error) { + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchWebhook Method for FetchWebhook +Fetch a specific Webhook. + * @param ServiceSid The unique SID identifier of the Service. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. +@return VerifyV2ServiceWebhook +*/ +func (c *DefaultApiService) FetchWebhook(ServiceSid string, Sid string) (*VerifyV2ServiceWebhook, error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListBucketParams Optional parameters for the method 'ListBucket' +type ListBucketParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListBucket Method for ListBucket +Retrieve a list of all Buckets for a Rate Limit. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. + * @param optional nil or *ListBucketOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListBucketResponse +*/ +func (c *DefaultApiService) ListBucket(ServiceSid string, RateLimitSid string, params *ListBucketParams) (*ListBucketResponse, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListBucketResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListChallengeParams Optional parameters for the method 'ListChallenge' +type ListChallengeParams struct { + FactorSid *string `json:"FactorSid,omitempty"` + Status *string `json:"Status,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListChallenge Method for ListChallenge +Retrieve a list of all Challenges for a Factor. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Challenge + * @param optional nil or *ListChallengeOpts - Optional Parameters: + * @param "FactorSid" (string) - The unique SID identifier of the Factor. + * @param "Status" (string) - The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListChallengeResponse +*/ +func (c *DefaultApiService) ListChallenge(ServiceSid string, Identity string, params *ListChallengeParams) (*ListChallengeResponse, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FactorSid != nil { + data.Set("FactorSid", *params.FactorSid) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListChallengeResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListEntityParams Optional parameters for the method 'ListEntity' +type ListEntityParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListEntity Method for ListEntity +Retrieve a list of all Entities for a Service. + * @param ServiceSid The unique SID identifier of the Service. + * @param optional nil or *ListEntityOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListEntityResponse +*/ +func (c *DefaultApiService) ListEntity(ServiceSid string, params *ListEntityParams) (*ListEntityResponse, error) { + path := "/v2/Services/{ServiceSid}/Entities" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListEntityResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListFactorParams Optional parameters for the method 'ListFactor' +type ListFactorParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListFactor Method for ListFactor +Retrieve a list of all Factors for an Entity. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Factor + * @param optional nil or *ListFactorOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListFactorResponse +*/ +func (c *DefaultApiService) ListFactor(ServiceSid string, Identity string, params *ListFactorParams) (*ListFactorResponse, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListFactorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListMessagingConfigurationParams Optional parameters for the method 'ListMessagingConfiguration' +type ListMessagingConfigurationParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListMessagingConfiguration Method for ListMessagingConfiguration +Retrieve a list of all Messaging Configurations for a Service. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. + * @param optional nil or *ListMessagingConfigurationOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListMessagingConfigurationResponse +*/ +func (c *DefaultApiService) ListMessagingConfiguration(ServiceSid string, params *ListMessagingConfigurationParams) (*ListMessagingConfigurationResponse, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListMessagingConfigurationResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRateLimitParams Optional parameters for the method 'ListRateLimit' +type ListRateLimitParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRateLimit Method for ListRateLimit +Retrieve a list of all Rate Limits for a service. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param optional nil or *ListRateLimitOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRateLimitResponse +*/ +func (c *DefaultApiService) ListRateLimit(ServiceSid string, params *ListRateLimitParams) (*ListRateLimitResponse, error) { + path := "/v2/Services/{ServiceSid}/RateLimits" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRateLimitResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListServiceParams Optional parameters for the method 'ListService' +type ListServiceParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListService Method for ListService +Retrieve a list of all Verification Services for an account. + * @param optional nil or *ListServiceOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListServiceResponse +*/ +func (c *DefaultApiService) ListService(params *ListServiceParams) (*ListServiceResponse, error) { + path := "/v2/Services" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListServiceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListWebhookParams Optional parameters for the method 'ListWebhook' +type ListWebhookParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListWebhook Method for ListWebhook +Retrieve a list of all Webhooks for a Service. + * @param ServiceSid The unique SID identifier of the Service. + * @param optional nil or *ListWebhookOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListWebhookResponse +*/ +func (c *DefaultApiService) ListWebhook(ServiceSid string, params *ListWebhookParams) (*ListWebhookResponse, error) { + path := "/v2/Services/{ServiceSid}/Webhooks" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListWebhookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateBucketParams Optional parameters for the method 'UpdateBucket' +type UpdateBucketParams struct { + Interval *int32 `json:"Interval,omitempty"` + Max *int32 `json:"Max,omitempty"` +} + +/* +UpdateBucket Method for UpdateBucket +Update a specific Bucket. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param RateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. + * @param Sid A 34 character string that uniquely identifies this Bucket. + * @param optional nil or *UpdateBucketOpts - Optional Parameters: + * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. + * @param "Max" (int32) - Maximum number of requests permitted in during the interval. +@return VerifyV2ServiceRateLimitBucket +*/ +func (c *DefaultApiService) UpdateBucket(ServiceSid string, RateLimitSid string, Sid string, params *UpdateBucketParams) (*VerifyV2ServiceRateLimitBucket, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"RateLimitSid"+"}", RateLimitSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Interval != nil { + data.Set("Interval", fmt.Sprint(*params.Interval)) + } + if params != nil && params.Max != nil { + data.Set("Max", fmt.Sprint(*params.Max)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimitBucket{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateChallengeParams Optional parameters for the method 'UpdateChallenge' +type UpdateChallengeParams struct { + AuthPayload *string `json:"AuthPayload,omitempty"` +} + +/* +UpdateChallenge Method for UpdateChallenge +Verify a specific Challenge. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Challenge + * @param Sid A 34 character string that uniquely identifies this Challenge. + * @param optional nil or *UpdateChallengeOpts - Optional Parameters: + * @param "AuthPayload" (string) - The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. +@return VerifyV2ServiceEntityChallenge +*/ +func (c *DefaultApiService) UpdateChallenge(ServiceSid string, Identity string, Sid string, params *UpdateChallengeParams) (*VerifyV2ServiceEntityChallenge, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityChallenge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateFactorParams Optional parameters for the method 'UpdateFactor' +type UpdateFactorParams struct { + AuthPayload *string `json:"AuthPayload,omitempty"` + ConfigNotificationToken *string `json:"Config.NotificationToken,omitempty"` + ConfigSdkVersion *string `json:"Config.SdkVersion,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateFactor Method for UpdateFactor +Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. + * @param ServiceSid The unique SID identifier of the Service. + * @param Identity Customer unique identity for the Entity owner of the Factor + * @param Sid A 34 character string that uniquely identifies this Factor. + * @param optional nil or *UpdateFactorOpts - Optional Parameters: + * @param "AuthPayload" (string) - The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. + * @param "ConfigNotificationToken" (string) - For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` + * @param "ConfigSdkVersion" (string) - The Verify Push SDK version used to configure the factor + * @param "FriendlyName" (string) - The new friendly name of this Factor +@return VerifyV2ServiceEntityFactor +*/ +func (c *DefaultApiService) UpdateFactor(ServiceSid string, Identity string, Sid string, params *UpdateFactorParams) (*VerifyV2ServiceEntityFactor, error) { + path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Identity"+"}", Identity, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AuthPayload != nil { + data.Set("AuthPayload", *params.AuthPayload) + } + if params != nil && params.ConfigNotificationToken != nil { + data.Set("ConfigNotificationToken", *params.ConfigNotificationToken) + } + if params != nil && params.ConfigSdkVersion != nil { + data.Set("ConfigSdkVersion", *params.ConfigSdkVersion) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceEntityFactor{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateMessagingConfigurationParams Optional parameters for the method 'UpdateMessagingConfiguration' +type UpdateMessagingConfigurationParams struct { + MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` +} + +/* +UpdateMessagingConfiguration Method for UpdateMessagingConfiguration +Update a specific MessagingConfiguration + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. + * @param Country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. + * @param optional nil or *UpdateMessagingConfigurationOpts - Optional Parameters: + * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. +@return VerifyV2ServiceMessagingConfiguration +*/ +func (c *DefaultApiService) UpdateMessagingConfiguration(ServiceSid string, Country string, params *UpdateMessagingConfigurationParams) (*VerifyV2ServiceMessagingConfiguration, error) { + path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Country"+"}", Country, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.MessagingServiceSid != nil { + data.Set("MessagingServiceSid", *params.MessagingServiceSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceMessagingConfiguration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRateLimitParams Optional parameters for the method 'UpdateRateLimit' +type UpdateRateLimitParams struct { + Description *string `json:"Description,omitempty"` +} + +/* +UpdateRateLimit Method for UpdateRateLimit +Update a specific Rate Limit. + * @param ServiceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. + * @param Sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. + * @param optional nil or *UpdateRateLimitOpts - Optional Parameters: + * @param "Description" (string) - Description of this Rate Limit +@return VerifyV2ServiceRateLimit +*/ +func (c *DefaultApiService) UpdateRateLimit(ServiceSid string, Sid string, params *UpdateRateLimitParams) (*VerifyV2ServiceRateLimit, error) { + path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Description != nil { + data.Set("Description", *params.Description) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceRateLimit{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateServiceParams Optional parameters for the method 'UpdateService' +type UpdateServiceParams struct { + CodeLength *int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` + DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + LookupEnabled *bool `json:"LookupEnabled,omitempty"` + Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` + PushApnCredentialSid *string `json:"Push.ApnCredentialSid,omitempty"` + PushFcmCredentialSid *string `json:"Push.FcmCredentialSid,omitempty"` + PushIncludeDate *bool `json:"Push.IncludeDate,omitempty"` + SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` + TtsName *string `json:"TtsName,omitempty"` +} + +/* +UpdateService Method for UpdateService +Update a specific Verification Service. + * @param Sid The Twilio-provided string that uniquely identifies the Service resource to update. + * @param optional nil or *UpdateServiceOpts - Optional Parameters: + * @param "CodeLength" (int32) - The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. + * @param "CustomCodeEnabled" (bool) - Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. + * @param "DoNotShareWarningEnabled" (bool) - Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** + * @param "DtmfInputRequired" (bool) - Whether to ask the user to press a number before delivering the verify code in a phone call. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** + * @param "LookupEnabled" (bool) - Whether to perform a lookup with each verification started and return info about the phone number. + * @param "Psd2Enabled" (bool) - Whether to pass PSD2 transaction parameters when starting a verification. + * @param "PushApnCredentialSid" (string) - Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + * @param "PushFcmCredentialSid" (string) - Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + * @param "PushIncludeDate" (bool) - Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true + * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. + * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. +@return VerifyV2Service +*/ +func (c *DefaultApiService) UpdateService(Sid string, params *UpdateServiceParams) (*VerifyV2Service, error) { + path := "/v2/Services/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CodeLength != nil { + data.Set("CodeLength", fmt.Sprint(*params.CodeLength)) + } + if params != nil && params.CustomCodeEnabled != nil { + data.Set("CustomCodeEnabled", fmt.Sprint(*params.CustomCodeEnabled)) + } + if params != nil && params.DoNotShareWarningEnabled != nil { + data.Set("DoNotShareWarningEnabled", fmt.Sprint(*params.DoNotShareWarningEnabled)) + } + if params != nil && params.DtmfInputRequired != nil { + data.Set("DtmfInputRequired", fmt.Sprint(*params.DtmfInputRequired)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.LookupEnabled != nil { + data.Set("LookupEnabled", fmt.Sprint(*params.LookupEnabled)) + } + if params != nil && params.Psd2Enabled != nil { + data.Set("Psd2Enabled", fmt.Sprint(*params.Psd2Enabled)) + } + if params != nil && params.PushApnCredentialSid != nil { + data.Set("PushApnCredentialSid", *params.PushApnCredentialSid) + } + if params != nil && params.PushFcmCredentialSid != nil { + data.Set("PushFcmCredentialSid", *params.PushFcmCredentialSid) + } + if params != nil && params.PushIncludeDate != nil { + data.Set("PushIncludeDate", fmt.Sprint(*params.PushIncludeDate)) + } + if params != nil && params.SkipSmsToLandlines != nil { + data.Set("SkipSmsToLandlines", fmt.Sprint(*params.SkipSmsToLandlines)) + } + if params != nil && params.TtsName != nil { + data.Set("TtsName", *params.TtsName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2Service{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateVerificationParams Optional parameters for the method 'UpdateVerification' +type UpdateVerificationParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateVerification Method for UpdateVerification +Update a Verification status + * @param ServiceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to update the resource from. + * @param Sid The Twilio-provided string that uniquely identifies the Verification resource to update. + * @param optional nil or *UpdateVerificationOpts - Optional Parameters: + * @param "Status" (string) - The new status of the resource. Can be: `canceled` or `approved`. +@return VerifyV2ServiceVerification +*/ +func (c *DefaultApiService) UpdateVerification(ServiceSid string, Sid string, params *UpdateVerificationParams) (*VerifyV2ServiceVerification, error) { + path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceVerification{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateWebhookParams Optional parameters for the method 'UpdateWebhook' +type UpdateWebhookParams struct { + EventTypes *[]string `json:"EventTypes,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Status *string `json:"Status,omitempty"` + WebhookUrl *string `json:"WebhookUrl,omitempty"` +} + +/* +UpdateWebhook Method for UpdateWebhook + * @param ServiceSid The unique SID identifier of the Service. + * @param Sid The Twilio-provided string that uniquely identifies the Webhook resource to update. + * @param optional nil or *UpdateWebhookOpts - Optional Parameters: + * @param "EventTypes" ([]string) - The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` + * @param "FriendlyName" (string) - The string that you assigned to describe the webhook. **This value should not contain PII.** + * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` + * @param "WebhookUrl" (string) - The URL associated with this Webhook. +@return VerifyV2ServiceWebhook +*/ +func (c *DefaultApiService) UpdateWebhook(ServiceSid string, Sid string, params *UpdateWebhookParams) (*VerifyV2ServiceWebhook, error) { + path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" + path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.EventTypes != nil { + data.Set("EventTypes", strings.Join(*params.EventTypes, ",")) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.WebhookUrl != nil { + data.Set("WebhookUrl", *params.WebhookUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VerifyV2ServiceWebhook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/verify/v2/docs/CreateAccessTokenRequest.md b/rest/verify/v2/docs/CreateAccessTokenRequest.md new file mode 100644 index 000000000..ca211ac43 --- /dev/null +++ b/rest/verify/v2/docs/CreateAccessTokenRequest.md @@ -0,0 +1,12 @@ +# CreateAccessTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FactorType** | **string** | The Type of this Factor. Eg. `push` | +**Identity** | **string** | The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateBucketRequest.md b/rest/verify/v2/docs/CreateBucketRequest.md new file mode 100644 index 000000000..348ea4a44 --- /dev/null +++ b/rest/verify/v2/docs/CreateBucketRequest.md @@ -0,0 +1,12 @@ +# CreateBucketRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interval** | **int32** | Number of seconds that the rate limit will be enforced over. | +**Max** | **int32** | Maximum number of requests permitted in during the interval. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateChallengeRequest.md b/rest/verify/v2/docs/CreateChallengeRequest.md new file mode 100644 index 000000000..d2220acd1 --- /dev/null +++ b/rest/verify/v2/docs/CreateChallengeRequest.md @@ -0,0 +1,15 @@ +# CreateChallengeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DetailsFields** | **[]map[string]interface{}** | A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field. Used when `factor_type` is `push`. | [optional] +**DetailsMessage** | **string** | Shown to the user when the push notification arrives. Required when `factor_type` is `push` | [optional] +**ExpirationDate** | [**time.Time**](time.Time.md) | The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. | [optional] +**FactorSid** | **string** | The unique SID identifier of the Factor. | +**HiddenDetails** | [**map[string]interface{}**](.md) | Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\"ip\": \"172.168.1.234\"}` | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateEntityRequest.md b/rest/verify/v2/docs/CreateEntityRequest.md new file mode 100644 index 000000000..ee04473a4 --- /dev/null +++ b/rest/verify/v2/docs/CreateEntityRequest.md @@ -0,0 +1,11 @@ +# CreateEntityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | **string** | The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateFactorRequest.md b/rest/verify/v2/docs/CreateFactorRequest.md new file mode 100644 index 000000000..85ece3452 --- /dev/null +++ b/rest/verify/v2/docs/CreateFactorRequest.md @@ -0,0 +1,18 @@ +# CreateFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BindingAlg** | **string** | The algorithm used when `factor_type` is `push`. Algorithm supported: `ES256` | [optional] +**BindingPublicKey** | **string** | The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64 | [optional] +**ConfigAppId** | **string** | The ID that uniquely identifies your app in the Google or Apple store, such as `com.example.myapp`. Required when `factor_type` is `push` | [optional] +**ConfigNotificationPlatform** | **string** | The transport technology used to generate the Notification Token. Can be `apn` or `fcm`. Required when `factor_type` is `push` | [optional] +**ConfigNotificationToken** | **string** | For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` | [optional] +**ConfigSdkVersion** | **string** | The Verify Push SDK version used to configure the factor | [optional] +**FactorType** | **string** | The Type of this Factor. Currently only `push` is supported | +**FriendlyName** | **string** | The friendly name of this Factor | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateMessagingConfigurationRequest.md b/rest/verify/v2/docs/CreateMessagingConfigurationRequest.md new file mode 100644 index 000000000..ea35aa1ca --- /dev/null +++ b/rest/verify/v2/docs/CreateMessagingConfigurationRequest.md @@ -0,0 +1,12 @@ +# CreateMessagingConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Country** | **string** | The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | +**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateRateLimitRequest.md b/rest/verify/v2/docs/CreateRateLimitRequest.md new file mode 100644 index 000000000..c7e955d2b --- /dev/null +++ b/rest/verify/v2/docs/CreateRateLimitRequest.md @@ -0,0 +1,12 @@ +# CreateRateLimitRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | Description of this Rate Limit | [optional] +**UniqueName** | **string** | Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateServiceRequest.md b/rest/verify/v2/docs/CreateServiceRequest.md new file mode 100644 index 000000000..456bc303f --- /dev/null +++ b/rest/verify/v2/docs/CreateServiceRequest.md @@ -0,0 +1,22 @@ +# CreateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CodeLength** | **int32** | The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | [optional] +**CustomCodeEnabled** | **bool** | Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | [optional] +**DoNotShareWarningEnabled** | **bool** | Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` | [optional] +**DtmfInputRequired** | **bool** | Whether to ask the user to press a number before delivering the verify code in a phone call. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** | +**LookupEnabled** | **bool** | Whether to perform a lookup with each verification started and return info about the phone number. | [optional] +**Psd2Enabled** | **bool** | Whether to pass PSD2 transaction parameters when starting a verification. | [optional] +**PushApnCredentialSid** | **string** | Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | [optional] +**PushFcmCredentialSid** | **string** | Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | [optional] +**PushIncludeDate** | **bool** | Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true | [optional] +**SkipSmsToLandlines** | **bool** | Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | [optional] +**TtsName** | **string** | The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateVerificationCheckRequest.md b/rest/verify/v2/docs/CreateVerificationCheckRequest.md new file mode 100644 index 000000000..90fdde9ce --- /dev/null +++ b/rest/verify/v2/docs/CreateVerificationCheckRequest.md @@ -0,0 +1,15 @@ +# CreateVerificationCheckRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **string** | The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] +**Code** | **string** | The 4-10 character string being verified. | +**Payee** | **string** | The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] +**To** | **string** | The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | [optional] +**VerificationSid** | **string** | A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateVerificationRequest.md b/rest/verify/v2/docs/CreateVerificationRequest.md new file mode 100644 index 000000000..c0f23fdc4 --- /dev/null +++ b/rest/verify/v2/docs/CreateVerificationRequest.md @@ -0,0 +1,22 @@ +# CreateVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **string** | The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] +**AppHash** | **string** | Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. | [optional] +**Channel** | **string** | The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. | +**ChannelConfiguration** | [**map[string]interface{}**](.md) | [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. | [optional] +**CustomCode** | **string** | A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. | [optional] +**CustomFriendlyName** | **string** | A custom user defined friendly name that overwrites the existing one in the verification message | [optional] +**CustomMessage** | **string** | The text of a custom message to use for the verification. | [optional] +**Locale** | **string** | The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` | [optional] +**Payee** | **string** | The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] +**RateLimits** | [**map[string]interface{}**](.md) | The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. | [optional] +**SendDigits** | **string** | The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). | [optional] +**To** | **string** | The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/CreateWebhookRequest.md b/rest/verify/v2/docs/CreateWebhookRequest.md new file mode 100644 index 000000000..732aa5807 --- /dev/null +++ b/rest/verify/v2/docs/CreateWebhookRequest.md @@ -0,0 +1,14 @@ +# CreateWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTypes** | **[]string** | The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | +**FriendlyName** | **string** | The string that you assigned to describe the webhook. **This value should not contain PII.** | +**Status** | **string** | The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | [optional] +**WebhookUrl** | **string** | The URL associated with this Webhook. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/DefaultApi.md b/rest/verify/v2/docs/DefaultApi.md new file mode 100644 index 000000000..674095de2 --- /dev/null +++ b/rest/verify/v2/docs/DefaultApi.md @@ -0,0 +1,1954 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAccessToken**](DefaultApi.md#CreateAccessToken) | **Post** /v2/Services/{ServiceSid}/AccessTokens | +[**CreateBucket**](DefaultApi.md#CreateBucket) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | +[**CreateChallenge**](DefaultApi.md#CreateChallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | +[**CreateEntity**](DefaultApi.md#CreateEntity) | **Post** /v2/Services/{ServiceSid}/Entities | +[**CreateFactor**](DefaultApi.md#CreateFactor) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | +[**CreateMessagingConfiguration**](DefaultApi.md#CreateMessagingConfiguration) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations | +[**CreateRateLimit**](DefaultApi.md#CreateRateLimit) | **Post** /v2/Services/{ServiceSid}/RateLimits | +[**CreateService**](DefaultApi.md#CreateService) | **Post** /v2/Services | +[**CreateVerification**](DefaultApi.md#CreateVerification) | **Post** /v2/Services/{ServiceSid}/Verifications | +[**CreateVerificationCheck**](DefaultApi.md#CreateVerificationCheck) | **Post** /v2/Services/{ServiceSid}/VerificationCheck | +[**CreateWebhook**](DefaultApi.md#CreateWebhook) | **Post** /v2/Services/{ServiceSid}/Webhooks | +[**DeleteBucket**](DefaultApi.md#DeleteBucket) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +[**DeleteEntity**](DefaultApi.md#DeleteEntity) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity} | +[**DeleteFactor**](DefaultApi.md#DeleteFactor) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +[**DeleteMessagingConfiguration**](DefaultApi.md#DeleteMessagingConfiguration) | **Delete** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +[**DeleteRateLimit**](DefaultApi.md#DeleteRateLimit) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +[**DeleteService**](DefaultApi.md#DeleteService) | **Delete** /v2/Services/{Sid} | +[**DeleteWebhook**](DefaultApi.md#DeleteWebhook) | **Delete** /v2/Services/{ServiceSid}/Webhooks/{Sid} | +[**FetchBucket**](DefaultApi.md#FetchBucket) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +[**FetchChallenge**](DefaultApi.md#FetchChallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | +[**FetchEntity**](DefaultApi.md#FetchEntity) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity} | +[**FetchFactor**](DefaultApi.md#FetchFactor) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +[**FetchForm**](DefaultApi.md#FetchForm) | **Get** /v2/Forms/{FormType} | +[**FetchMessagingConfiguration**](DefaultApi.md#FetchMessagingConfiguration) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +[**FetchRateLimit**](DefaultApi.md#FetchRateLimit) | **Get** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +[**FetchService**](DefaultApi.md#FetchService) | **Get** /v2/Services/{Sid} | +[**FetchVerification**](DefaultApi.md#FetchVerification) | **Get** /v2/Services/{ServiceSid}/Verifications/{Sid} | +[**FetchWebhook**](DefaultApi.md#FetchWebhook) | **Get** /v2/Services/{ServiceSid}/Webhooks/{Sid} | +[**ListBucket**](DefaultApi.md#ListBucket) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | +[**ListChallenge**](DefaultApi.md#ListChallenge) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | +[**ListEntity**](DefaultApi.md#ListEntity) | **Get** /v2/Services/{ServiceSid}/Entities | +[**ListFactor**](DefaultApi.md#ListFactor) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | +[**ListMessagingConfiguration**](DefaultApi.md#ListMessagingConfiguration) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations | +[**ListRateLimit**](DefaultApi.md#ListRateLimit) | **Get** /v2/Services/{ServiceSid}/RateLimits | +[**ListService**](DefaultApi.md#ListService) | **Get** /v2/Services | +[**ListWebhook**](DefaultApi.md#ListWebhook) | **Get** /v2/Services/{ServiceSid}/Webhooks | +[**UpdateBucket**](DefaultApi.md#UpdateBucket) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | +[**UpdateChallenge**](DefaultApi.md#UpdateChallenge) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | +[**UpdateFactor**](DefaultApi.md#UpdateFactor) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | +[**UpdateMessagingConfiguration**](DefaultApi.md#UpdateMessagingConfiguration) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | +[**UpdateRateLimit**](DefaultApi.md#UpdateRateLimit) | **Post** /v2/Services/{ServiceSid}/RateLimits/{Sid} | +[**UpdateService**](DefaultApi.md#UpdateService) | **Post** /v2/Services/{Sid} | +[**UpdateVerification**](DefaultApi.md#UpdateVerification) | **Post** /v2/Services/{ServiceSid}/Verifications/{Sid} | +[**UpdateWebhook**](DefaultApi.md#UpdateWebhook) | **Post** /v2/Services/{ServiceSid}/Webhooks/{Sid} | + + + +## CreateAccessToken + +> VerifyV2ServiceAccessToken CreateAccessToken(ctx, ServiceSid, optional) + + + +Create a new enrollment Access Token for the Entity + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | + **optional** | ***CreateAccessTokenOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateAccessTokenOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FactorType** | **optional.String**| The Type of this Factor. Eg. `push` | + **Identity** | **optional.String**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | + +### Return type + +[**VerifyV2ServiceAccessToken**](verify.v2.service.access_token.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateBucket + +> VerifyV2ServiceRateLimitBucket CreateBucket(ctx, ServiceSid, RateLimitSid, optional) + + + +Create a new Bucket for a Rate Limit + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**RateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | + **optional** | ***CreateBucketOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateBucketOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Interval** | **optional.Int32**| Number of seconds that the rate limit will be enforced over. | + **Max** | **optional.Int32**| Maximum number of requests permitted in during the interval. | + +### Return type + +[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateChallenge + +> VerifyV2ServiceEntityChallenge CreateChallenge(ctx, ServiceSid, Identity, optional) + + + +Create a new Challenge for the Factor + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | + **optional** | ***CreateChallengeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateChallengeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **DetailsFields** | [**optional.Interface of []map[string]interface{}**](map[string]interface{}.md)| A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field. Used when `factor_type` is `push`. | + **DetailsMessage** | **optional.String**| Shown to the user when the push notification arrives. Required when `factor_type` is `push` | + **ExpirationDate** | **optional.Time**| The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. | + **FactorSid** | **optional.String**| The unique SID identifier of the Factor. | + **HiddenDetails** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` | + +### Return type + +[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEntity + +> VerifyV2ServiceEntity CreateEntity(ctx, ServiceSid, optional) + + + +Create a new Entity for the Service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | + **optional** | ***CreateEntityOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateEntityOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Identity** | **optional.String**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. | + +### Return type + +[**VerifyV2ServiceEntity**](verify.v2.service.entity.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFactor + +> VerifyV2ServiceEntityFactor CreateFactor(ctx, ServiceSid, Identity, optional) + + + +Create a new Factor for the Entity + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Factor | + **optional** | ***CreateFactorOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateFactorOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **BindingAlg** | **optional.String**| The algorithm used when `factor_type` is `push`. Algorithm supported: `ES256` | + **BindingPublicKey** | **optional.String**| The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64 | + **ConfigAppId** | **optional.String**| The ID that uniquely identifies your app in the Google or Apple store, such as `com.example.myapp`. Required when `factor_type` is `push` | + **ConfigNotificationPlatform** | **optional.String**| The transport technology used to generate the Notification Token. Can be `apn` or `fcm`. Required when `factor_type` is `push` | + **ConfigNotificationToken** | **optional.String**| For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` | + **ConfigSdkVersion** | **optional.String**| The Verify Push SDK version used to configure the factor | + **FactorType** | **optional.String**| The Type of this Factor. Currently only `push` is supported | + **FriendlyName** | **optional.String**| The friendly name of this Factor | + +### Return type + +[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMessagingConfiguration + +> VerifyV2ServiceMessagingConfiguration CreateMessagingConfiguration(ctx, ServiceSid, optional) + + + +Create a new MessagingConfiguration for a service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | + **optional** | ***CreateMessagingConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateMessagingConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Country** | **optional.String**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | + **MessagingServiceSid** | **optional.String**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | + +### Return type + +[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRateLimit + +> VerifyV2ServiceRateLimit CreateRateLimit(ctx, ServiceSid, optional) + + + +Create a new Rate Limit for a Service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | + **optional** | ***CreateRateLimitOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRateLimitOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Description** | **optional.String**| Description of this Rate Limit | + **UniqueName** | **optional.String**| Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** | + +### Return type + +[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateService + +> VerifyV2Service CreateService(ctx, optional) + + + +Create a new Verification Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CodeLength** | **optional.Int32**| The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | + **CustomCodeEnabled** | **optional.Bool**| Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | + **DoNotShareWarningEnabled** | **optional.Bool**| Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` | + **DtmfInputRequired** | **optional.Bool**| Whether to ask the user to press a number before delivering the verify code in a phone call. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** | + **LookupEnabled** | **optional.Bool**| Whether to perform a lookup with each verification started and return info about the phone number. | + **Psd2Enabled** | **optional.Bool**| Whether to pass PSD2 transaction parameters when starting a verification. | + **PushApnCredentialSid** | **optional.String**| Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | + **PushFcmCredentialSid** | **optional.String**| Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | + **PushIncludeDate** | **optional.Bool**| Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true | + **SkipSmsToLandlines** | **optional.Bool**| Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | + **TtsName** | **optional.String**| The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | + +### Return type + +[**VerifyV2Service**](verify.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateVerification + +> VerifyV2ServiceVerification CreateVerification(ctx, ServiceSid, optional) + + + +Create a new Verification using a Service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. | + **optional** | ***CreateVerificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateVerificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Amount** | **optional.String**| The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | + **AppHash** | **optional.String**| Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. | + **Channel** | **optional.String**| The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. | + **ChannelConfiguration** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. | + **CustomCode** | **optional.String**| A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. | + **CustomFriendlyName** | **optional.String**| A custom user defined friendly name that overwrites the existing one in the verification message | + **CustomMessage** | **optional.String**| The text of a custom message to use for the verification. | + **Locale** | **optional.String**| The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` | + **Payee** | **optional.String**| The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | + **RateLimits** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. | + **SendDigits** | **optional.String**| The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). | + **To** | **optional.String**| The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | + +### Return type + +[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateVerificationCheck + +> VerifyV2ServiceVerificationCheck CreateVerificationCheck(ctx, ServiceSid, optional) + + + +challenge a specific Verification Check. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. | + **optional** | ***CreateVerificationCheckOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateVerificationCheckOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Amount** | **optional.String**| The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | + **Code** | **optional.String**| The 4-10 character string being verified. | + **Payee** | **optional.String**| The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | + **To** | **optional.String**| The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | + **VerificationSid** | **optional.String**| A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. | + +### Return type + +[**VerifyV2ServiceVerificationCheck**](verify.v2.service.verification_check.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWebhook + +> VerifyV2ServiceWebhook CreateWebhook(ctx, ServiceSid, optional) + + + +Create a new Webhook for the Service + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | + **optional** | ***CreateWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **EventTypes** | [**optional.Interface of []string**](string.md)| The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | + **FriendlyName** | **optional.String**| The string that you assigned to describe the webhook. **This value should not contain PII.** | + **Status** | **optional.String**| The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | + **WebhookUrl** | **optional.String**| The URL associated with this Webhook. | + +### Return type + +[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBucket + +> DeleteBucket(ctx, ServiceSid, RateLimitSid, Sid) + + + +Delete a specific Bucket. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**RateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | +**Sid** | **string**| A 34 character string that uniquely identifies this Bucket. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEntity + +> DeleteEntity(ctx, ServiceSid, Identity) + + + +Delete a specific Entity. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| The unique external identifier for the Entity of the Service | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFactor + +> DeleteFactor(ctx, ServiceSid, Identity, Sid) + + + +Delete a specific Factor. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Factor | +**Sid** | **string**| A 34 character string that uniquely identifies this Factor. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessagingConfiguration + +> DeleteMessagingConfiguration(ctx, ServiceSid, Country) + + + +Delete a specific MessagingConfiguration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | +**Country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRateLimit + +> DeleteRateLimit(ctx, ServiceSid, Sid) + + + +Delete a specific Rate Limit. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteService + +> DeleteService(ctx, Sid) + + + +Delete a specific Verification Service Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Verification Service resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWebhook + +> DeleteWebhook(ctx, ServiceSid, Sid) + + + +Delete a specific Webhook. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchBucket + +> VerifyV2ServiceRateLimitBucket FetchBucket(ctx, ServiceSid, RateLimitSid, Sid) + + + +Fetch a specific Bucket. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**RateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | +**Sid** | **string**| A 34 character string that uniquely identifies this Bucket. | + +### Return type + +[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchChallenge + +> VerifyV2ServiceEntityChallenge FetchChallenge(ctx, ServiceSid, Identity, Sid) + + + +Fetch a specific Challenge. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | +**Sid** | **string**| A 34 character string that uniquely identifies this Challenge. | + +### Return type + +[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchEntity + +> VerifyV2ServiceEntity FetchEntity(ctx, ServiceSid, Identity) + + + +Fetch a specific Entity. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| The unique external identifier for the Entity of the Service | + +### Return type + +[**VerifyV2ServiceEntity**](verify.v2.service.entity.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchFactor + +> VerifyV2ServiceEntityFactor FetchFactor(ctx, ServiceSid, Identity, Sid) + + + +Fetch a specific Factor. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Factor | +**Sid** | **string**| A 34 character string that uniquely identifies this Factor. | + +### Return type + +[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchForm + +> VerifyV2Form FetchForm(ctx, FormType) + + + +Fetch the forms for a specific Form Type. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**FormType** | **string**| The Type of this Form. Currently only `form-push` is supported. | + +### Return type + +[**VerifyV2Form**](verify.v2.form.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchMessagingConfiguration + +> VerifyV2ServiceMessagingConfiguration FetchMessagingConfiguration(ctx, ServiceSid, Country) + + + +Fetch a specific MessagingConfiguration. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | +**Country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | + +### Return type + +[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRateLimit + +> VerifyV2ServiceRateLimit FetchRateLimit(ctx, ServiceSid, Sid) + + + +Fetch a specific Rate Limit. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | + +### Return type + +[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchService + +> VerifyV2Service FetchService(ctx, Sid) + + + +Fetch specific Verification Service Instance. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. | + +### Return type + +[**VerifyV2Service**](verify.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchVerification + +> VerifyV2ServiceVerification FetchVerification(ctx, ServiceSid, Sid) + + + +Fetch a specific Verification + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Verification resource to fetch. | + +### Return type + +[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchWebhook + +> VerifyV2ServiceWebhook FetchWebhook(ctx, ServiceSid, Sid) + + + +Fetch a specific Webhook. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to fetch. | + +### Return type + +[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBucket + +> ListBucketResponse ListBucket(ctx, ServiceSid, RateLimitSid, optional) + + + +Retrieve a list of all Buckets for a Rate Limit. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**RateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | + **optional** | ***ListBucketOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListBucketOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListBucketResponse**](ListBucketResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChallenge + +> ListChallengeResponse ListChallenge(ctx, ServiceSid, Identity, optional) + + + +Retrieve a list of all Challenges for a Factor. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Challenge | + **optional** | ***ListChallengeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListChallengeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **FactorSid** | **optional.String**| The unique SID identifier of the Factor. | + **Status** | **optional.String**| The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListChallengeResponse**](ListChallengeResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEntity + +> ListEntityResponse ListEntity(ctx, ServiceSid, optional) + + + +Retrieve a list of all Entities for a Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | + **optional** | ***ListEntityOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListEntityOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListEntityResponse**](ListEntityResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFactor + +> ListFactorResponse ListFactor(ctx, ServiceSid, Identity, optional) + + + +Retrieve a list of all Factors for an Entity. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Factor | + **optional** | ***ListFactorOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListFactorOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListFactorResponse**](ListFactorResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessagingConfiguration + +> ListMessagingConfigurationResponse ListMessagingConfiguration(ctx, ServiceSid, optional) + + + +Retrieve a list of all Messaging Configurations for a Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | + **optional** | ***ListMessagingConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListMessagingConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListMessagingConfigurationResponse**](ListMessagingConfigurationResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRateLimit + +> ListRateLimitResponse ListRateLimit(ctx, ServiceSid, optional) + + + +Retrieve a list of all Rate Limits for a service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | + **optional** | ***ListRateLimitOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRateLimitOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRateLimitResponse**](ListRateLimitResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListService + +> ListServiceResponse ListService(ctx, optional) + + + +Retrieve a list of all Verification Services for an account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListServiceResponse**](ListServiceResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWebhook + +> ListWebhookResponse ListWebhook(ctx, ServiceSid, optional) + + + +Retrieve a list of all Webhooks for a Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | + **optional** | ***ListWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListWebhookResponse**](ListWebhookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateBucket + +> VerifyV2ServiceRateLimitBucket UpdateBucket(ctx, ServiceSid, RateLimitSid, Sid, optional) + + + +Update a specific Bucket. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**RateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | +**Sid** | **string**| A 34 character string that uniquely identifies this Bucket. | + **optional** | ***UpdateBucketOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateBucketOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **Interval** | **optional.Int32**| Number of seconds that the rate limit will be enforced over. | + **Max** | **optional.Int32**| Maximum number of requests permitted in during the interval. | + +### Return type + +[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChallenge + +> VerifyV2ServiceEntityChallenge UpdateChallenge(ctx, ServiceSid, Identity, Sid, optional) + + + +Verify a specific Challenge. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Challenge | +**Sid** | **string**| A 34 character string that uniquely identifies this Challenge. | + **optional** | ***UpdateChallengeOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateChallengeOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **AuthPayload** | **optional.String**| The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. | + +### Return type + +[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFactor + +> VerifyV2ServiceEntityFactor UpdateFactor(ctx, ServiceSid, Identity, Sid, optional) + + + +Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Identity** | **string**| Customer unique identity for the Entity owner of the Factor | +**Sid** | **string**| A 34 character string that uniquely identifies this Factor. | + **optional** | ***UpdateFactorOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateFactorOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **AuthPayload** | **optional.String**| The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. | + **ConfigNotificationToken** | **optional.String**| For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` | + **ConfigSdkVersion** | **optional.String**| The Verify Push SDK version used to configure the factor | + **FriendlyName** | **optional.String**| The new friendly name of this Factor | + +### Return type + +[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessagingConfiguration + +> VerifyV2ServiceMessagingConfiguration UpdateMessagingConfiguration(ctx, ServiceSid, Country, optional) + + + +Update a specific MessagingConfiguration + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | +**Country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | + **optional** | ***UpdateMessagingConfigurationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateMessagingConfigurationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **MessagingServiceSid** | **optional.String**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | + +### Return type + +[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRateLimit + +> VerifyV2ServiceRateLimit UpdateRateLimit(ctx, ServiceSid, Sid, optional) + + + +Update a specific Rate Limit. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | + **optional** | ***UpdateRateLimitOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRateLimitOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Description** | **optional.String**| Description of this Rate Limit | + +### Return type + +[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> VerifyV2Service UpdateService(ctx, Sid, optional) + + + +Update a specific Verification Service. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to update. | + **optional** | ***UpdateServiceOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateServiceOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CodeLength** | **optional.Int32**| The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | + **CustomCodeEnabled** | **optional.Bool**| Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | + **DoNotShareWarningEnabled** | **optional.Bool**| Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** | + **DtmfInputRequired** | **optional.Bool**| Whether to ask the user to press a number before delivering the verify code in a phone call. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** | + **LookupEnabled** | **optional.Bool**| Whether to perform a lookup with each verification started and return info about the phone number. | + **Psd2Enabled** | **optional.Bool**| Whether to pass PSD2 transaction parameters when starting a verification. | + **PushApnCredentialSid** | **optional.String**| Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | + **PushFcmCredentialSid** | **optional.String**| Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | + **PushIncludeDate** | **optional.Bool**| Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true | + **SkipSmsToLandlines** | **optional.Bool**| Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | + **TtsName** | **optional.String**| The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | + +### Return type + +[**VerifyV2Service**](verify.v2.service.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateVerification + +> VerifyV2ServiceVerification UpdateVerification(ctx, ServiceSid, Sid, optional) + + + +Update a Verification status + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to update the resource from. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Verification resource to update. | + **optional** | ***UpdateVerificationOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateVerificationOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Status** | **optional.String**| The new status of the resource. Can be: `canceled` or `approved`. | + +### Return type + +[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWebhook + +> VerifyV2ServiceWebhook UpdateWebhook(ctx, ServiceSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ServiceSid** | **string**| The unique SID identifier of the Service. | +**Sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to update. | + **optional** | ***UpdateWebhookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateWebhookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **EventTypes** | [**optional.Interface of []string**](string.md)| The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | + **FriendlyName** | **optional.String**| The string that you assigned to describe the webhook. **This value should not contain PII.** | + **Status** | **optional.String**| The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | + **WebhookUrl** | **optional.String**| The URL associated with this Webhook. | + +### Return type + +[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/verify/v2/docs/ListBucketResponse.md b/rest/verify/v2/docs/ListBucketResponse.md new file mode 100644 index 000000000..45b937d25 --- /dev/null +++ b/rest/verify/v2/docs/ListBucketResponse.md @@ -0,0 +1,12 @@ +# ListBucketResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Buckets** | [**[]VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListChallengeResponse.md b/rest/verify/v2/docs/ListChallengeResponse.md new file mode 100644 index 000000000..6f2c11f2c --- /dev/null +++ b/rest/verify/v2/docs/ListChallengeResponse.md @@ -0,0 +1,12 @@ +# ListChallengeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Challenges** | [**[]VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListEntityResponse.md b/rest/verify/v2/docs/ListEntityResponse.md new file mode 100644 index 000000000..8c4c4a27d --- /dev/null +++ b/rest/verify/v2/docs/ListEntityResponse.md @@ -0,0 +1,12 @@ +# ListEntityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Entities** | [**[]VerifyV2ServiceEntity**](verify.v2.service.entity.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListFactorResponse.md b/rest/verify/v2/docs/ListFactorResponse.md new file mode 100644 index 000000000..17d48fe12 --- /dev/null +++ b/rest/verify/v2/docs/ListFactorResponse.md @@ -0,0 +1,12 @@ +# ListFactorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Factors** | [**[]VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListMessagingConfigurationResponse.md b/rest/verify/v2/docs/ListMessagingConfigurationResponse.md new file mode 100644 index 000000000..b08ca91dd --- /dev/null +++ b/rest/verify/v2/docs/ListMessagingConfigurationResponse.md @@ -0,0 +1,12 @@ +# ListMessagingConfigurationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessagingConfigurations** | [**[]VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) | | [optional] +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListRateLimitResponse.md b/rest/verify/v2/docs/ListRateLimitResponse.md new file mode 100644 index 000000000..f27fad5bf --- /dev/null +++ b/rest/verify/v2/docs/ListRateLimitResponse.md @@ -0,0 +1,12 @@ +# ListRateLimitResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**RateLimits** | [**[]VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListServiceResponse.md b/rest/verify/v2/docs/ListServiceResponse.md new file mode 100644 index 000000000..642ba1c58 --- /dev/null +++ b/rest/verify/v2/docs/ListServiceResponse.md @@ -0,0 +1,12 @@ +# ListServiceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Services** | [**[]VerifyV2Service**](verify.v2.service.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListServiceResponseMeta.md b/rest/verify/v2/docs/ListServiceResponseMeta.md new file mode 100644 index 000000000..010bc7d70 --- /dev/null +++ b/rest/verify/v2/docs/ListServiceResponseMeta.md @@ -0,0 +1,17 @@ +# ListServiceResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/ListWebhookResponse.md b/rest/verify/v2/docs/ListWebhookResponse.md new file mode 100644 index 000000000..8e50a3987 --- /dev/null +++ b/rest/verify/v2/docs/ListWebhookResponse.md @@ -0,0 +1,12 @@ +# ListWebhookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListServiceResponseMeta**](ListServiceResponse_meta.md) | | [optional] +**Webhooks** | [**[]VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateBucketRequest.md b/rest/verify/v2/docs/UpdateBucketRequest.md new file mode 100644 index 000000000..45bae2e05 --- /dev/null +++ b/rest/verify/v2/docs/UpdateBucketRequest.md @@ -0,0 +1,12 @@ +# UpdateBucketRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Interval** | **int32** | Number of seconds that the rate limit will be enforced over. | [optional] +**Max** | **int32** | Maximum number of requests permitted in during the interval. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateChallengeRequest.md b/rest/verify/v2/docs/UpdateChallengeRequest.md new file mode 100644 index 000000000..ffe2acdf6 --- /dev/null +++ b/rest/verify/v2/docs/UpdateChallengeRequest.md @@ -0,0 +1,11 @@ +# UpdateChallengeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthPayload** | **string** | The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateFactorRequest.md b/rest/verify/v2/docs/UpdateFactorRequest.md new file mode 100644 index 000000000..b17115219 --- /dev/null +++ b/rest/verify/v2/docs/UpdateFactorRequest.md @@ -0,0 +1,14 @@ +# UpdateFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthPayload** | **string** | The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. | [optional] +**ConfigNotificationToken** | **string** | For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` | [optional] +**ConfigSdkVersion** | **string** | The Verify Push SDK version used to configure the factor | [optional] +**FriendlyName** | **string** | The new friendly name of this Factor | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateMessagingConfigurationRequest.md b/rest/verify/v2/docs/UpdateMessagingConfigurationRequest.md new file mode 100644 index 000000000..d003310be --- /dev/null +++ b/rest/verify/v2/docs/UpdateMessagingConfigurationRequest.md @@ -0,0 +1,11 @@ +# UpdateMessagingConfigurationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateRateLimitRequest.md b/rest/verify/v2/docs/UpdateRateLimitRequest.md new file mode 100644 index 000000000..11c0d9a27 --- /dev/null +++ b/rest/verify/v2/docs/UpdateRateLimitRequest.md @@ -0,0 +1,11 @@ +# UpdateRateLimitRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | Description of this Rate Limit | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateServiceRequest.md b/rest/verify/v2/docs/UpdateServiceRequest.md new file mode 100644 index 000000000..6074d1b10 --- /dev/null +++ b/rest/verify/v2/docs/UpdateServiceRequest.md @@ -0,0 +1,22 @@ +# UpdateServiceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CodeLength** | **int32** | The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | [optional] +**CustomCodeEnabled** | **bool** | Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | [optional] +**DoNotShareWarningEnabled** | **bool** | Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** | [optional] +**DtmfInputRequired** | **bool** | Whether to ask the user to press a number before delivering the verify code in a phone call. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** | [optional] +**LookupEnabled** | **bool** | Whether to perform a lookup with each verification started and return info about the phone number. | [optional] +**Psd2Enabled** | **bool** | Whether to pass PSD2 transaction parameters when starting a verification. | [optional] +**PushApnCredentialSid** | **string** | Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | [optional] +**PushFcmCredentialSid** | **string** | Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) | [optional] +**PushIncludeDate** | **bool** | Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true | [optional] +**SkipSmsToLandlines** | **bool** | Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | [optional] +**TtsName** | **string** | The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateVerificationRequest.md b/rest/verify/v2/docs/UpdateVerificationRequest.md new file mode 100644 index 000000000..fa13560d9 --- /dev/null +++ b/rest/verify/v2/docs/UpdateVerificationRequest.md @@ -0,0 +1,11 @@ +# UpdateVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The new status of the resource. Can be: `canceled` or `approved`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/UpdateWebhookRequest.md b/rest/verify/v2/docs/UpdateWebhookRequest.md new file mode 100644 index 000000000..d682a8d34 --- /dev/null +++ b/rest/verify/v2/docs/UpdateWebhookRequest.md @@ -0,0 +1,14 @@ +# UpdateWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventTypes** | **[]string** | The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | [optional] +**FriendlyName** | **string** | The string that you assigned to describe the webhook. **This value should not contain PII.** | [optional] +**Status** | **string** | The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | [optional] +**WebhookUrl** | **string** | The URL associated with this Webhook. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/verify/v2/docs/VerifyV2Form.md b/rest/verify/v2/docs/VerifyV2Form.md new file mode 100644 index 000000000..528138a86 --- /dev/null +++ b/rest/verify/v2/docs/VerifyV2Form.md @@ -0,0 +1,14 @@ +# VerifyV2Form + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FormMeta** | [**map[string]interface{}**](.md) | | [optional] +**FormType** | **string** | | [optional] +**Forms** | [**map[string]interface{}**](.md) | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/verify/docs/VerifyV2Service.md b/rest/verify/v2/docs/VerifyV2Service.md similarity index 88% rename from verify/docs/VerifyV2Service.md rename to rest/verify/v2/docs/VerifyV2Service.md index 119caf525..af703c61a 100644 --- a/verify/docs/VerifyV2Service.md +++ b/rest/verify/v2/docs/VerifyV2Service.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **DoNotShareWarningEnabled** | **bool** | | [optional] **DtmfInputRequired** | **bool** | | [optional] **FriendlyName** | **string** | | [optional] -**Links** | **map[string]interface{}** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] **LookupEnabled** | **bool** | | [optional] **Psd2Enabled** | **bool** | | [optional] -**Push** | **map[string]interface{}** | | [optional] +**Push** | [**map[string]interface{}**](.md) | | [optional] **Sid** | **string** | | [optional] **SkipSmsToLandlines** | **bool** | | [optional] **TtsName** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceAccessToken.md b/rest/verify/v2/docs/VerifyV2ServiceAccessToken.md similarity index 100% rename from verify/docs/VerifyV2ServiceAccessToken.md rename to rest/verify/v2/docs/VerifyV2ServiceAccessToken.md diff --git a/verify/docs/VerifyV2ServiceEntity.md b/rest/verify/v2/docs/VerifyV2ServiceEntity.md similarity index 91% rename from verify/docs/VerifyV2ServiceEntity.md rename to rest/verify/v2/docs/VerifyV2ServiceEntity.md index a958f35d3..d450ee1cf 100644 --- a/verify/docs/VerifyV2ServiceEntity.md +++ b/rest/verify/v2/docs/VerifyV2ServiceEntity.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] **Identity** | **string** | | [optional] -**Links** | **map[string]interface{}** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] **ServiceSid** | **string** | | [optional] **Sid** | **string** | | [optional] **Url** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceEntityChallenge.md b/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md similarity index 88% rename from verify/docs/VerifyV2ServiceEntityChallenge.md rename to rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md index 157672eb4..a48576785 100644 --- a/verify/docs/VerifyV2ServiceEntityChallenge.md +++ b/rest/verify/v2/docs/VerifyV2ServiceEntityChallenge.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateResponded** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] -**Details** | **string** | | [optional] +**Details** | [**map[string]interface{}**](.md) | | [optional] **EntitySid** | **string** | | [optional] **ExpirationDate** | [**time.Time**](time.Time.md) | | [optional] **FactorSid** | **string** | | [optional] **FactorType** | **string** | | [optional] -**HiddenDetails** | **string** | | [optional] +**HiddenDetails** | [**map[string]interface{}**](.md) | | [optional] **Identity** | **string** | | [optional] **RespondedReason** | **string** | | [optional] **ServiceSid** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceEntityFactor.md b/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md similarity index 92% rename from verify/docs/VerifyV2ServiceEntityFactor.md rename to rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md index 49c9ce903..c3156452e 100644 --- a/verify/docs/VerifyV2ServiceEntityFactor.md +++ b/rest/verify/v2/docs/VerifyV2ServiceEntityFactor.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AccountSid** | **string** | | [optional] -**Config** | **map[string]interface{}** | | [optional] +**Config** | [**map[string]interface{}**](.md) | | [optional] **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] **EntitySid** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceMessagingConfiguration.md b/rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md similarity index 100% rename from verify/docs/VerifyV2ServiceMessagingConfiguration.md rename to rest/verify/v2/docs/VerifyV2ServiceMessagingConfiguration.md diff --git a/verify/docs/VerifyV2ServiceRateLimit.md b/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md similarity index 91% rename from verify/docs/VerifyV2ServiceRateLimit.md rename to rest/verify/v2/docs/VerifyV2ServiceRateLimit.md index de9fef502..97edc5ee1 100644 --- a/verify/docs/VerifyV2ServiceRateLimit.md +++ b/rest/verify/v2/docs/VerifyV2ServiceRateLimit.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] **Description** | **string** | | [optional] -**Links** | **map[string]interface{}** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] **ServiceSid** | **string** | | [optional] **Sid** | **string** | | [optional] **UniqueName** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceRateLimitBucket.md b/rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md similarity index 100% rename from verify/docs/VerifyV2ServiceRateLimitBucket.md rename to rest/verify/v2/docs/VerifyV2ServiceRateLimitBucket.md diff --git a/verify/docs/VerifyV2ServiceVerification.md b/rest/verify/v2/docs/VerifyV2ServiceVerification.md similarity index 93% rename from verify/docs/VerifyV2ServiceVerification.md rename to rest/verify/v2/docs/VerifyV2ServiceVerification.md index 3aa4967eb..fed9c8a60 100644 --- a/verify/docs/VerifyV2ServiceVerification.md +++ b/rest/verify/v2/docs/VerifyV2ServiceVerification.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Channel** | **string** | | [optional] **DateCreated** | [**time.Time**](time.Time.md) | | [optional] **DateUpdated** | [**time.Time**](time.Time.md) | | [optional] -**Lookup** | **map[string]interface{}** | | [optional] +**Lookup** | [**map[string]interface{}**](.md) | | [optional] **Payee** | **string** | | [optional] **SendCodeAttempts** | **[]map[string]interface{}** | | [optional] **ServiceSid** | **string** | | [optional] diff --git a/verify/docs/VerifyV2ServiceVerificationCheck.md b/rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md similarity index 100% rename from verify/docs/VerifyV2ServiceVerificationCheck.md rename to rest/verify/v2/docs/VerifyV2ServiceVerificationCheck.md diff --git a/verify/docs/VerifyV2ServiceWebhook.md b/rest/verify/v2/docs/VerifyV2ServiceWebhook.md similarity index 100% rename from verify/docs/VerifyV2ServiceWebhook.md rename to rest/verify/v2/docs/VerifyV2ServiceWebhook.md diff --git a/rest/verify/v2/model_create_access_token_request.go b/rest/verify/v2/model_create_access_token_request.go new file mode 100644 index 000000000..b069a576c --- /dev/null +++ b/rest/verify/v2/model_create_access_token_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateAccessTokenRequest struct for CreateAccessTokenRequest +type CreateAccessTokenRequest struct { + // The Type of this Factor. Eg. `push` + FactorType string `json:"FactorType"` + // The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. + Identity string `json:"Identity"` +} diff --git a/rest/verify/v2/model_create_bucket_request.go b/rest/verify/v2/model_create_bucket_request.go new file mode 100644 index 000000000..e99174b2c --- /dev/null +++ b/rest/verify/v2/model_create_bucket_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateBucketRequest struct for CreateBucketRequest +type CreateBucketRequest struct { + // Number of seconds that the rate limit will be enforced over. + Interval int32 `json:"Interval"` + // Maximum number of requests permitted in during the interval. + Max int32 `json:"Max"` +} diff --git a/rest/verify/v2/model_create_challenge_request.go b/rest/verify/v2/model_create_challenge_request.go new file mode 100644 index 000000000..409795469 --- /dev/null +++ b/rest/verify/v2/model_create_challenge_request.go @@ -0,0 +1,27 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// CreateChallengeRequest struct for CreateChallengeRequest +type CreateChallengeRequest struct { + // A list of objects that describe the Fields included in the Challenge. Each object contains the label and value of the field. Used when `factor_type` is `push`. + DetailsFields []map[string]interface{} `json:"DetailsFields,omitempty"` + // Shown to the user when the push notification arrives. Required when `factor_type` is `push` + DetailsMessage string `json:"DetailsMessage,omitempty"` + // The date-time when this Challenge expires, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. The default value is five (5) minutes after Challenge creation. The max value is sixty (60) minutes after creation. + ExpirationDate time.Time `json:"ExpirationDate,omitempty"` + // The unique SID identifier of the Factor. + FactorSid string `json:"FactorSid"` + // Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\"ip\": \"172.168.1.234\"}` + HiddenDetails map[string]interface{} `json:"HiddenDetails,omitempty"` +} diff --git a/rest/verify/v2/model_create_entity_request.go b/rest/verify/v2/model_create_entity_request.go new file mode 100644 index 000000000..70bea5807 --- /dev/null +++ b/rest/verify/v2/model_create_entity_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateEntityRequest struct for CreateEntityRequest +type CreateEntityRequest struct { + // The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. + Identity string `json:"Identity"` +} diff --git a/rest/verify/v2/model_create_factor_request.go b/rest/verify/v2/model_create_factor_request.go new file mode 100644 index 000000000..7b9a4ac84 --- /dev/null +++ b/rest/verify/v2/model_create_factor_request.go @@ -0,0 +1,30 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateFactorRequest struct for CreateFactorRequest +type CreateFactorRequest struct { + // The algorithm used when `factor_type` is `push`. Algorithm supported: `ES256` + BindingAlg string `json:"BindingAlg,omitempty"` + // The Ecdsa public key in PKIX, ASN.1 DER format encoded in Base64 + BindingPublicKey string `json:"BindingPublicKey,omitempty"` + // The ID that uniquely identifies your app in the Google or Apple store, such as `com.example.myapp`. Required when `factor_type` is `push` + ConfigAppId string `json:"ConfigAppId,omitempty"` + // The transport technology used to generate the Notification Token. Can be `apn` or `fcm`. Required when `factor_type` is `push` + ConfigNotificationPlatform string `json:"ConfigNotificationPlatform,omitempty"` + // For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` + ConfigNotificationToken string `json:"ConfigNotificationToken,omitempty"` + // The Verify Push SDK version used to configure the factor + ConfigSdkVersion string `json:"ConfigSdkVersion,omitempty"` + // The Type of this Factor. Currently only `push` is supported + FactorType string `json:"FactorType"` + // The friendly name of this Factor + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/verify/v2/model_create_messaging_configuration_request.go b/rest/verify/v2/model_create_messaging_configuration_request.go new file mode 100644 index 000000000..7b549ba51 --- /dev/null +++ b/rest/verify/v2/model_create_messaging_configuration_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateMessagingConfigurationRequest struct for CreateMessagingConfigurationRequest +type CreateMessagingConfigurationRequest struct { + // The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. + Country string `json:"Country"` + // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. + MessagingServiceSid string `json:"MessagingServiceSid"` +} diff --git a/rest/verify/v2/model_create_rate_limit_request.go b/rest/verify/v2/model_create_rate_limit_request.go new file mode 100644 index 000000000..113c4a4a1 --- /dev/null +++ b/rest/verify/v2/model_create_rate_limit_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRateLimitRequest struct for CreateRateLimitRequest +type CreateRateLimitRequest struct { + // Description of this Rate Limit + Description string `json:"Description,omitempty"` + // Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** + UniqueName string `json:"UniqueName"` +} diff --git a/rest/verify/v2/model_create_service_request.go b/rest/verify/v2/model_create_service_request.go new file mode 100644 index 000000000..4a3aa3e4b --- /dev/null +++ b/rest/verify/v2/model_create_service_request.go @@ -0,0 +1,38 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateServiceRequest struct for CreateServiceRequest +type CreateServiceRequest struct { + // The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. + CodeLength int32 `json:"CodeLength,omitempty"` + // Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. + CustomCodeEnabled bool `json:"CustomCodeEnabled,omitempty"` + // Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` + DoNotShareWarningEnabled bool `json:"DoNotShareWarningEnabled,omitempty"` + // Whether to ask the user to press a number before delivering the verify code in a phone call. + DtmfInputRequired bool `json:"DtmfInputRequired,omitempty"` + // A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** + FriendlyName string `json:"FriendlyName"` + // Whether to perform a lookup with each verification started and return info about the phone number. + LookupEnabled bool `json:"LookupEnabled,omitempty"` + // Whether to pass PSD2 transaction parameters when starting a verification. + Psd2Enabled bool `json:"Psd2Enabled,omitempty"` + // Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + PushApnCredentialSid string `json:"PushApnCredentialSid,omitempty"` + // Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + PushFcmCredentialSid string `json:"PushFcmCredentialSid,omitempty"` + // Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true + PushIncludeDate bool `json:"PushIncludeDate,omitempty"` + // Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. + SkipSmsToLandlines bool `json:"SkipSmsToLandlines,omitempty"` + // The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. + TtsName string `json:"TtsName,omitempty"` +} diff --git a/rest/verify/v2/model_create_verification_check_request.go b/rest/verify/v2/model_create_verification_check_request.go new file mode 100644 index 000000000..b6bb0fb9f --- /dev/null +++ b/rest/verify/v2/model_create_verification_check_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateVerificationCheckRequest struct for CreateVerificationCheckRequest +type CreateVerificationCheckRequest struct { + // The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + Amount string `json:"Amount,omitempty"` + // The 4-10 character string being verified. + Code string `json:"Code"` + // The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + Payee string `json:"Payee,omitempty"` + // The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). + To string `json:"To,omitempty"` + // A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. + VerificationSid string `json:"VerificationSid,omitempty"` +} diff --git a/rest/verify/v2/model_create_verification_request.go b/rest/verify/v2/model_create_verification_request.go new file mode 100644 index 000000000..845745e98 --- /dev/null +++ b/rest/verify/v2/model_create_verification_request.go @@ -0,0 +1,38 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateVerificationRequest struct for CreateVerificationRequest +type CreateVerificationRequest struct { + // The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + Amount string `json:"Amount,omitempty"` + // Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. + AppHash string `json:"AppHash,omitempty"` + // The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. + Channel string `json:"Channel"` + // [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. + ChannelConfiguration map[string]interface{} `json:"ChannelConfiguration,omitempty"` + // A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. + CustomCode string `json:"CustomCode,omitempty"` + // A custom user defined friendly name that overwrites the existing one in the verification message + CustomFriendlyName string `json:"CustomFriendlyName,omitempty"` + // The text of a custom message to use for the verification. + CustomMessage string `json:"CustomMessage,omitempty"` + // The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` + Locale string `json:"Locale,omitempty"` + // The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. + Payee string `json:"Payee,omitempty"` + // The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. + RateLimits map[string]interface{} `json:"RateLimits,omitempty"` + // The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). + SendDigits string `json:"SendDigits,omitempty"` + // The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). + To string `json:"To"` +} diff --git a/rest/verify/v2/model_create_webhook_request.go b/rest/verify/v2/model_create_webhook_request.go new file mode 100644 index 000000000..297e07d13 --- /dev/null +++ b/rest/verify/v2/model_create_webhook_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateWebhookRequest struct for CreateWebhookRequest +type CreateWebhookRequest struct { + // The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` + EventTypes []string `json:"EventTypes"` + // The string that you assigned to describe the webhook. **This value should not contain PII.** + FriendlyName string `json:"FriendlyName"` + // The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` + Status string `json:"Status,omitempty"` + // The URL associated with this Webhook. + WebhookUrl string `json:"WebhookUrl"` +} diff --git a/rest/verify/v2/model_list_bucket_response.go b/rest/verify/v2/model_list_bucket_response.go new file mode 100644 index 000000000..92e8c196d --- /dev/null +++ b/rest/verify/v2/model_list_bucket_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListBucketResponse struct for ListBucketResponse +type ListBucketResponse struct { + Buckets []VerifyV2ServiceRateLimitBucket `json:"Buckets,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/verify/v2/model_list_challenge_response.go b/rest/verify/v2/model_list_challenge_response.go new file mode 100644 index 000000000..0e47001b2 --- /dev/null +++ b/rest/verify/v2/model_list_challenge_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListChallengeResponse struct for ListChallengeResponse +type ListChallengeResponse struct { + Challenges []VerifyV2ServiceEntityChallenge `json:"Challenges,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/verify/v2/model_list_entity_response.go b/rest/verify/v2/model_list_entity_response.go new file mode 100644 index 000000000..c1c7296c3 --- /dev/null +++ b/rest/verify/v2/model_list_entity_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListEntityResponse struct for ListEntityResponse +type ListEntityResponse struct { + Entities []VerifyV2ServiceEntity `json:"Entities,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/verify/v2/model_list_factor_response.go b/rest/verify/v2/model_list_factor_response.go new file mode 100644 index 000000000..4cd2e9690 --- /dev/null +++ b/rest/verify/v2/model_list_factor_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListFactorResponse struct for ListFactorResponse +type ListFactorResponse struct { + Factors []VerifyV2ServiceEntityFactor `json:"Factors,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/verify/v2/model_list_messaging_configuration_response.go b/rest/verify/v2/model_list_messaging_configuration_response.go new file mode 100644 index 000000000..c6ab601f6 --- /dev/null +++ b/rest/verify/v2/model_list_messaging_configuration_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListMessagingConfigurationResponse struct for ListMessagingConfigurationResponse +type ListMessagingConfigurationResponse struct { + MessagingConfigurations []VerifyV2ServiceMessagingConfiguration `json:"MessagingConfigurations,omitempty"` + Meta ListServiceResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/verify/v2/model_list_rate_limit_response.go b/rest/verify/v2/model_list_rate_limit_response.go new file mode 100644 index 000000000..a97901bd9 --- /dev/null +++ b/rest/verify/v2/model_list_rate_limit_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRateLimitResponse struct for ListRateLimitResponse +type ListRateLimitResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + RateLimits []VerifyV2ServiceRateLimit `json:"RateLimits,omitempty"` +} diff --git a/rest/verify/v2/model_list_service_response.go b/rest/verify/v2/model_list_service_response.go new file mode 100644 index 000000000..f2105da5c --- /dev/null +++ b/rest/verify/v2/model_list_service_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponse struct for ListServiceResponse +type ListServiceResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Services []VerifyV2Service `json:"Services,omitempty"` +} diff --git a/rest/verify/v2/model_list_service_response_meta.go b/rest/verify/v2/model_list_service_response_meta.go new file mode 100644 index 000000000..18f52cf0c --- /dev/null +++ b/rest/verify/v2/model_list_service_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListServiceResponseMeta struct for ListServiceResponseMeta +type ListServiceResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_list_webhook_response.go b/rest/verify/v2/model_list_webhook_response.go new file mode 100644 index 000000000..161d20e39 --- /dev/null +++ b/rest/verify/v2/model_list_webhook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListWebhookResponse struct for ListWebhookResponse +type ListWebhookResponse struct { + Meta ListServiceResponseMeta `json:"Meta,omitempty"` + Webhooks []VerifyV2ServiceWebhook `json:"Webhooks,omitempty"` +} diff --git a/rest/verify/v2/model_update_bucket_request.go b/rest/verify/v2/model_update_bucket_request.go new file mode 100644 index 000000000..948ee4ac7 --- /dev/null +++ b/rest/verify/v2/model_update_bucket_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateBucketRequest struct for UpdateBucketRequest +type UpdateBucketRequest struct { + // Number of seconds that the rate limit will be enforced over. + Interval int32 `json:"Interval,omitempty"` + // Maximum number of requests permitted in during the interval. + Max int32 `json:"Max,omitempty"` +} diff --git a/rest/verify/v2/model_update_challenge_request.go b/rest/verify/v2/model_update_challenge_request.go new file mode 100644 index 000000000..2f3b444a4 --- /dev/null +++ b/rest/verify/v2/model_update_challenge_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateChallengeRequest struct for UpdateChallengeRequest +type UpdateChallengeRequest struct { + // The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. + AuthPayload string `json:"AuthPayload,omitempty"` +} diff --git a/rest/verify/v2/model_update_factor_request.go b/rest/verify/v2/model_update_factor_request.go new file mode 100644 index 000000000..7b7120815 --- /dev/null +++ b/rest/verify/v2/model_update_factor_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateFactorRequest struct for UpdateFactorRequest +type UpdateFactorRequest struct { + // The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. + AuthPayload string `json:"AuthPayload,omitempty"` + // For APN, the device token. For FCM the registration token. It used to send the push notifications. Required when `factor_type` is `push` + ConfigNotificationToken string `json:"ConfigNotificationToken,omitempty"` + // The Verify Push SDK version used to configure the factor + ConfigSdkVersion string `json:"ConfigSdkVersion,omitempty"` + // The new friendly name of this Factor + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/verify/v2/model_update_messaging_configuration_request.go b/rest/verify/v2/model_update_messaging_configuration_request.go new file mode 100644 index 000000000..4aeda8428 --- /dev/null +++ b/rest/verify/v2/model_update_messaging_configuration_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateMessagingConfigurationRequest struct for UpdateMessagingConfigurationRequest +type UpdateMessagingConfigurationRequest struct { + // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. + MessagingServiceSid string `json:"MessagingServiceSid"` +} diff --git a/rest/verify/v2/model_update_rate_limit_request.go b/rest/verify/v2/model_update_rate_limit_request.go new file mode 100644 index 000000000..fa51a88c3 --- /dev/null +++ b/rest/verify/v2/model_update_rate_limit_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRateLimitRequest struct for UpdateRateLimitRequest +type UpdateRateLimitRequest struct { + // Description of this Rate Limit + Description string `json:"Description,omitempty"` +} diff --git a/rest/verify/v2/model_update_service_request.go b/rest/verify/v2/model_update_service_request.go new file mode 100644 index 000000000..7e6778f62 --- /dev/null +++ b/rest/verify/v2/model_update_service_request.go @@ -0,0 +1,38 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateServiceRequest struct for UpdateServiceRequest +type UpdateServiceRequest struct { + // The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. + CodeLength int32 `json:"CodeLength,omitempty"` + // Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. + CustomCodeEnabled bool `json:"CustomCodeEnabled,omitempty"` + // Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** + DoNotShareWarningEnabled bool `json:"DoNotShareWarningEnabled,omitempty"` + // Whether to ask the user to press a number before delivering the verify code in a phone call. + DtmfInputRequired bool `json:"DtmfInputRequired,omitempty"` + // A descriptive string that you create to describe the verification service. It can be up to 30 characters long. **This value should not contain PII.** + FriendlyName string `json:"FriendlyName,omitempty"` + // Whether to perform a lookup with each verification started and return info about the phone number. + LookupEnabled bool `json:"LookupEnabled,omitempty"` + // Whether to pass PSD2 transaction parameters when starting a verification. + Psd2Enabled bool `json:"Psd2Enabled,omitempty"` + // Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + PushApnCredentialSid string `json:"PushApnCredentialSid,omitempty"` + // Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource) + PushFcmCredentialSid string `json:"PushFcmCredentialSid,omitempty"` + // Optional configuration for the Push factors. If true, include the date in the Challenge's reponse. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: true + PushIncludeDate bool `json:"PushIncludeDate,omitempty"` + // Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. + SkipSmsToLandlines bool `json:"SkipSmsToLandlines,omitempty"` + // The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. + TtsName string `json:"TtsName,omitempty"` +} diff --git a/rest/verify/v2/model_update_verification_request.go b/rest/verify/v2/model_update_verification_request.go new file mode 100644 index 000000000..df63b2846 --- /dev/null +++ b/rest/verify/v2/model_update_verification_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateVerificationRequest struct for UpdateVerificationRequest +type UpdateVerificationRequest struct { + // The new status of the resource. Can be: `canceled` or `approved`. + Status string `json:"Status"` +} diff --git a/rest/verify/v2/model_update_webhook_request.go b/rest/verify/v2/model_update_webhook_request.go new file mode 100644 index 000000000..d656f4688 --- /dev/null +++ b/rest/verify/v2/model_update_webhook_request.go @@ -0,0 +1,22 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateWebhookRequest struct for UpdateWebhookRequest +type UpdateWebhookRequest struct { + // The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` + EventTypes []string `json:"EventTypes,omitempty"` + // The string that you assigned to describe the webhook. **This value should not contain PII.** + FriendlyName string `json:"FriendlyName,omitempty"` + // The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` + Status string `json:"Status,omitempty"` + // The URL associated with this Webhook. + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_form.go b/rest/verify/v2/model_verify_v2_form.go new file mode 100644 index 000000000..09671f0f0 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_form.go @@ -0,0 +1,18 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VerifyV2Form struct for VerifyV2Form +type VerifyV2Form struct { + FormMeta map[string]interface{} `json:"FormMeta,omitempty"` + FormType string `json:"FormType,omitempty"` + Forms map[string]interface{} `json:"Forms,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service.go b/rest/verify/v2/model_verify_v2_service.go new file mode 100644 index 000000000..7c24e7857 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service.go @@ -0,0 +1,33 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2Service struct for VerifyV2Service +type VerifyV2Service struct { + AccountSid string `json:"AccountSid,omitempty"` + CodeLength int32 `json:"CodeLength,omitempty"` + CustomCodeEnabled bool `json:"CustomCodeEnabled,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DoNotShareWarningEnabled bool `json:"DoNotShareWarningEnabled,omitempty"` + DtmfInputRequired bool `json:"DtmfInputRequired,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LookupEnabled bool `json:"LookupEnabled,omitempty"` + Psd2Enabled bool `json:"Psd2Enabled,omitempty"` + Push map[string]interface{} `json:"Push,omitempty"` + Sid string `json:"Sid,omitempty"` + SkipSmsToLandlines bool `json:"SkipSmsToLandlines,omitempty"` + TtsName string `json:"TtsName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/verify/model_verify_v2_service_access_token.go b/rest/verify/v2/model_verify_v2_service_access_token.go similarity index 78% rename from verify/model_verify_v2_service_access_token.go rename to rest/verify/v2/model_verify_v2_service_access_token.go index 9c6c14619..6a1340b8d 100644 --- a/verify/model_verify_v2_service_access_token.go +++ b/rest/verify/v2/model_verify_v2_service_access_token.go @@ -3,13 +3,13 @@ * * This is the public Twilio REST API. * - * API version: 1.0.1 + * API version: 1.0.0 * Contact: support@twilio.com * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package twilio +package openapi // VerifyV2ServiceAccessToken struct for VerifyV2ServiceAccessToken type VerifyV2ServiceAccessToken struct { - Token string `json:"token,omitempty"` + Token string `json:"Token,omitempty"` } diff --git a/rest/verify/v2/model_verify_v2_service_entity.go b/rest/verify/v2/model_verify_v2_service_entity.go new file mode 100644 index 000000000..38aef9777 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_entity.go @@ -0,0 +1,25 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceEntity struct for VerifyV2ServiceEntity +type VerifyV2ServiceEntity struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Identity string `json:"Identity,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_entity_challenge.go b/rest/verify/v2/model_verify_v2_service_entity_challenge.go new file mode 100644 index 000000000..7c3c62fdc --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_entity_challenge.go @@ -0,0 +1,33 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceEntityChallenge struct for VerifyV2ServiceEntityChallenge +type VerifyV2ServiceEntityChallenge struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateResponded time.Time `json:"DateResponded,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Details map[string]interface{} `json:"Details,omitempty"` + EntitySid string `json:"EntitySid,omitempty"` + ExpirationDate time.Time `json:"ExpirationDate,omitempty"` + FactorSid string `json:"FactorSid,omitempty"` + FactorType string `json:"FactorType,omitempty"` + HiddenDetails map[string]interface{} `json:"HiddenDetails,omitempty"` + Identity string `json:"Identity,omitempty"` + RespondedReason string `json:"RespondedReason,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_entity_factor.go b/rest/verify/v2/model_verify_v2_service_entity_factor.go new file mode 100644 index 000000000..191314ba2 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_entity_factor.go @@ -0,0 +1,29 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceEntityFactor struct for VerifyV2ServiceEntityFactor +type VerifyV2ServiceEntityFactor struct { + AccountSid string `json:"AccountSid,omitempty"` + Config map[string]interface{} `json:"Config,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EntitySid string `json:"EntitySid,omitempty"` + FactorType string `json:"FactorType,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Identity string `json:"Identity,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_messaging_configuration.go b/rest/verify/v2/model_verify_v2_service_messaging_configuration.go new file mode 100644 index 000000000..9d25ee9f2 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_messaging_configuration.go @@ -0,0 +1,24 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceMessagingConfiguration struct for VerifyV2ServiceMessagingConfiguration +type VerifyV2ServiceMessagingConfiguration struct { + AccountSid string `json:"AccountSid,omitempty"` + Country string `json:"Country,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + MessagingServiceSid string `json:"MessagingServiceSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_rate_limit.go b/rest/verify/v2/model_verify_v2_service_rate_limit.go new file mode 100644 index 000000000..1fd256d17 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_rate_limit.go @@ -0,0 +1,26 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceRateLimit struct for VerifyV2ServiceRateLimit +type VerifyV2ServiceRateLimit struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Description string `json:"Description,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go b/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go new file mode 100644 index 000000000..435d6ac67 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_rate_limit_bucket.go @@ -0,0 +1,26 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceRateLimitBucket struct for VerifyV2ServiceRateLimitBucket +type VerifyV2ServiceRateLimitBucket struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Interval int32 `json:"Interval,omitempty"` + Max int32 `json:"Max,omitempty"` + RateLimitSid string `json:"RateLimitSid,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_verification.go b/rest/verify/v2/model_verify_v2_service_verification.go new file mode 100644 index 000000000..aecf377d2 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_verification.go @@ -0,0 +1,31 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceVerification struct for VerifyV2ServiceVerification +type VerifyV2ServiceVerification struct { + AccountSid string `json:"AccountSid,omitempty"` + Amount string `json:"Amount,omitempty"` + Channel string `json:"Channel,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Lookup map[string]interface{} `json:"Lookup,omitempty"` + Payee string `json:"Payee,omitempty"` + SendCodeAttempts []map[string]interface{} `json:"SendCodeAttempts,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + To string `json:"To,omitempty"` + Url string `json:"Url,omitempty"` + Valid bool `json:"Valid,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_verification_check.go b/rest/verify/v2/model_verify_v2_service_verification_check.go new file mode 100644 index 000000000..bf196f7b0 --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_verification_check.go @@ -0,0 +1,28 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceVerificationCheck struct for VerifyV2ServiceVerificationCheck +type VerifyV2ServiceVerificationCheck struct { + AccountSid string `json:"AccountSid,omitempty"` + Amount string `json:"Amount,omitempty"` + Channel string `json:"Channel,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Payee string `json:"Payee,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + To string `json:"To,omitempty"` + Valid bool `json:"Valid,omitempty"` +} diff --git a/rest/verify/v2/model_verify_v2_service_webhook.go b/rest/verify/v2/model_verify_v2_service_webhook.go new file mode 100644 index 000000000..672191daf --- /dev/null +++ b/rest/verify/v2/model_verify_v2_service_webhook.go @@ -0,0 +1,28 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VerifyV2ServiceWebhook struct for VerifyV2ServiceWebhook +type VerifyV2ServiceWebhook struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EventTypes []string `json:"EventTypes,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + ServiceSid string `json:"ServiceSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` + WebhookMethod string `json:"WebhookMethod,omitempty"` + WebhookUrl string `json:"WebhookUrl,omitempty"` +} diff --git a/rest/verify/v2/response.go b/rest/verify/v2/response.go new file mode 100644 index 000000000..1644b988b --- /dev/null +++ b/rest/verify/v2/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Verify + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/video/v1/.openapi-generator-ignore b/rest/video/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/video/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/video/v1/README.md b/rest/video/v1/README.md new file mode 100644 index 000000000..d6f09f53f --- /dev/null +++ b/rest/video/v1/README.md @@ -0,0 +1,127 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateComposition**](docs/DefaultApi.md#createcomposition) | **Post** /v1/Compositions | +*DefaultApi* | [**CreateCompositionHook**](docs/DefaultApi.md#createcompositionhook) | **Post** /v1/CompositionHooks | +*DefaultApi* | [**CreateCompositionSettings**](docs/DefaultApi.md#createcompositionsettings) | **Post** /v1/CompositionSettings/Default | +*DefaultApi* | [**CreateRecordingSettings**](docs/DefaultApi.md#createrecordingsettings) | **Post** /v1/RecordingSettings/Default | +*DefaultApi* | [**CreateRoom**](docs/DefaultApi.md#createroom) | **Post** /v1/Rooms | +*DefaultApi* | [**DeleteComposition**](docs/DefaultApi.md#deletecomposition) | **Delete** /v1/Compositions/{Sid} | +*DefaultApi* | [**DeleteCompositionHook**](docs/DefaultApi.md#deletecompositionhook) | **Delete** /v1/CompositionHooks/{Sid} | +*DefaultApi* | [**DeleteRecording**](docs/DefaultApi.md#deleterecording) | **Delete** /v1/Recordings/{Sid} | +*DefaultApi* | [**DeleteRoomRecording**](docs/DefaultApi.md#deleteroomrecording) | **Delete** /v1/Rooms/{RoomSid}/Recordings/{Sid} | +*DefaultApi* | [**FetchComposition**](docs/DefaultApi.md#fetchcomposition) | **Get** /v1/Compositions/{Sid} | +*DefaultApi* | [**FetchCompositionHook**](docs/DefaultApi.md#fetchcompositionhook) | **Get** /v1/CompositionHooks/{Sid} | +*DefaultApi* | [**FetchCompositionSettings**](docs/DefaultApi.md#fetchcompositionsettings) | **Get** /v1/CompositionSettings/Default | +*DefaultApi* | [**FetchRecording**](docs/DefaultApi.md#fetchrecording) | **Get** /v1/Recordings/{Sid} | +*DefaultApi* | [**FetchRecordingSettings**](docs/DefaultApi.md#fetchrecordingsettings) | **Get** /v1/RecordingSettings/Default | +*DefaultApi* | [**FetchRoom**](docs/DefaultApi.md#fetchroom) | **Get** /v1/Rooms/{Sid} | +*DefaultApi* | [**FetchRoomParticipant**](docs/DefaultApi.md#fetchroomparticipant) | **Get** /v1/Rooms/{RoomSid}/Participants/{Sid} | +*DefaultApi* | [**FetchRoomParticipantPublishedTrack**](docs/DefaultApi.md#fetchroomparticipantpublishedtrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid} | +*DefaultApi* | [**FetchRoomParticipantSubscribeRule**](docs/DefaultApi.md#fetchroomparticipantsubscriberule) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules | +*DefaultApi* | [**FetchRoomParticipantSubscribedTrack**](docs/DefaultApi.md#fetchroomparticipantsubscribedtrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid} | +*DefaultApi* | [**FetchRoomRecording**](docs/DefaultApi.md#fetchroomrecording) | **Get** /v1/Rooms/{RoomSid}/Recordings/{Sid} | +*DefaultApi* | [**FetchRoomRecordingRule**](docs/DefaultApi.md#fetchroomrecordingrule) | **Get** /v1/Rooms/{RoomSid}/RecordingRules | +*DefaultApi* | [**ListComposition**](docs/DefaultApi.md#listcomposition) | **Get** /v1/Compositions | +*DefaultApi* | [**ListCompositionHook**](docs/DefaultApi.md#listcompositionhook) | **Get** /v1/CompositionHooks | +*DefaultApi* | [**ListRecording**](docs/DefaultApi.md#listrecording) | **Get** /v1/Recordings | +*DefaultApi* | [**ListRoom**](docs/DefaultApi.md#listroom) | **Get** /v1/Rooms | +*DefaultApi* | [**ListRoomParticipant**](docs/DefaultApi.md#listroomparticipant) | **Get** /v1/Rooms/{RoomSid}/Participants | +*DefaultApi* | [**ListRoomParticipantPublishedTrack**](docs/DefaultApi.md#listroomparticipantpublishedtrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks | +*DefaultApi* | [**ListRoomParticipantSubscribedTrack**](docs/DefaultApi.md#listroomparticipantsubscribedtrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks | +*DefaultApi* | [**ListRoomRecording**](docs/DefaultApi.md#listroomrecording) | **Get** /v1/Rooms/{RoomSid}/Recordings | +*DefaultApi* | [**UpdateCompositionHook**](docs/DefaultApi.md#updatecompositionhook) | **Post** /v1/CompositionHooks/{Sid} | +*DefaultApi* | [**UpdateRoom**](docs/DefaultApi.md#updateroom) | **Post** /v1/Rooms/{Sid} | +*DefaultApi* | [**UpdateRoomParticipant**](docs/DefaultApi.md#updateroomparticipant) | **Post** /v1/Rooms/{RoomSid}/Participants/{Sid} | +*DefaultApi* | [**UpdateRoomParticipantSubscribeRule**](docs/DefaultApi.md#updateroomparticipantsubscriberule) | **Post** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules | +*DefaultApi* | [**UpdateRoomRecordingRule**](docs/DefaultApi.md#updateroomrecordingrule) | **Post** /v1/Rooms/{RoomSid}/RecordingRules | + + +## Documentation For Models + + - [CreateCompositionHookRequest](docs/CreateCompositionHookRequest.md) + - [CreateCompositionRequest](docs/CreateCompositionRequest.md) + - [CreateCompositionSettingsRequest](docs/CreateCompositionSettingsRequest.md) + - [CreateRecordingSettingsRequest](docs/CreateRecordingSettingsRequest.md) + - [CreateRoomRequest](docs/CreateRoomRequest.md) + - [ListCompositionHookResponse](docs/ListCompositionHookResponse.md) + - [ListCompositionHookResponseMeta](docs/ListCompositionHookResponseMeta.md) + - [ListCompositionResponse](docs/ListCompositionResponse.md) + - [ListRecordingResponse](docs/ListRecordingResponse.md) + - [ListRoomParticipantPublishedTrackResponse](docs/ListRoomParticipantPublishedTrackResponse.md) + - [ListRoomParticipantResponse](docs/ListRoomParticipantResponse.md) + - [ListRoomParticipantSubscribedTrackResponse](docs/ListRoomParticipantSubscribedTrackResponse.md) + - [ListRoomRecordingResponse](docs/ListRoomRecordingResponse.md) + - [ListRoomResponse](docs/ListRoomResponse.md) + - [UpdateCompositionHookRequest](docs/UpdateCompositionHookRequest.md) + - [UpdateRoomParticipantRequest](docs/UpdateRoomParticipantRequest.md) + - [UpdateRoomParticipantSubscribeRuleRequest](docs/UpdateRoomParticipantSubscribeRuleRequest.md) + - [UpdateRoomRecordingRuleRequest](docs/UpdateRoomRecordingRuleRequest.md) + - [UpdateRoomRequest](docs/UpdateRoomRequest.md) + - [VideoV1Composition](docs/VideoV1Composition.md) + - [VideoV1CompositionHook](docs/VideoV1CompositionHook.md) + - [VideoV1CompositionSettings](docs/VideoV1CompositionSettings.md) + - [VideoV1Recording](docs/VideoV1Recording.md) + - [VideoV1RecordingSettings](docs/VideoV1RecordingSettings.md) + - [VideoV1Room](docs/VideoV1Room.md) + - [VideoV1RoomRoomParticipant](docs/VideoV1RoomRoomParticipant.md) + - [VideoV1RoomRoomParticipantRoomParticipantPublishedTrack](docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md) + - [VideoV1RoomRoomParticipantRoomParticipantSubscribeRule](docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md) + - [VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack](docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md) + - [VideoV1RoomRoomRecording](docs/VideoV1RoomRoomRecording.md) + - [VideoV1RoomRoomRecordingRule](docs/VideoV1RoomRoomRecordingRule.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/video/v1/api_default.go b/rest/video/v1/api_default.go new file mode 100644 index 000000000..03dc4a48c --- /dev/null +++ b/rest/video/v1/api_default.go @@ -0,0 +1,1589 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://video.twilio.com"), + } +} +// CreateCompositionParams Optional parameters for the method 'CreateComposition' +type CreateCompositionParams struct { + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Format *string `json:"Format,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` +} + +/* +CreateComposition Method for CreateComposition + * @param optional nil or *CreateCompositionOpts - Optional Parameters: + * @param "AudioSources" ([]string) - An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request + * @param "AudioSourcesExcluded" ([]string) - An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + * @param "Format" (string) - The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs. + * @param "Resolution" (string) - A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "RoomSid" (string) - The SID of the Group Room with the media tracks to be used as composition sources. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request +@return VideoV1Composition +*/ +func (c *DefaultApiService) CreateComposition(params *CreateCompositionParams) (*VideoV1Composition, error) { + path := "/v1/Compositions" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) + } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err + } + + data.Set("VideoLayout", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCompositionHookParams Optional parameters for the method 'CreateCompositionHook' +type CreateCompositionHookParams struct { + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` +} + +/* +CreateCompositionHook Method for CreateCompositionHook + * @param optional nil or *CreateCompositionHookOpts - Optional Parameters: + * @param "AudioSources" ([]string) - An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. + * @param "AudioSourcesExcluded" ([]string) - An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + * @param "Enabled" (bool) - Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered. + * @param "Format" (string) - The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. + * @param "Resolution" (string) - A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "VideoLayout" (map[string]interface{}) - An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. +@return VideoV1CompositionHook +*/ +func (c *DefaultApiService) CreateCompositionHook(params *CreateCompositionHookParams) (*VideoV1CompositionHook, error) { + path := "/v1/CompositionHooks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) + } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err + } + + data.Set("VideoLayout", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateCompositionSettingsParams Optional parameters for the method 'CreateCompositionSettings' +type CreateCompositionSettingsParams struct { + AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateCompositionSettings Method for CreateCompositionSettings + * @param optional nil or *CreateCompositionSettingsOpts - Optional Parameters: + * @param "AwsCredentialsSid" (string) - The SID of the stored Credential resource. + * @param "AwsS3Url" (string) - The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. + * @param "AwsStorageEnabled" (bool) - Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud. + * @param "EncryptionEnabled" (bool) - Whether all compositions should be stored in an encrypted form. The default is `false`. + * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and show to the user in the console +@return VideoV1CompositionSettings +*/ +func (c *DefaultApiService) CreateCompositionSettings(params *CreateCompositionSettingsParams) (*VideoV1CompositionSettings, error) { + path := "/v1/CompositionSettings/Default" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) + } + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) + } + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) + } + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) + } + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRecordingSettingsParams Optional parameters for the method 'CreateRecordingSettings' +type CreateRecordingSettingsParams struct { + AwsCredentialsSid *string `json:"AwsCredentialsSid,omitempty"` + AwsS3Url *string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled *bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled *bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid *string `json:"EncryptionKeySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateRecordingSettings Method for CreateRecordingSettings + * @param optional nil or *CreateRecordingSettingsOpts - Optional Parameters: + * @param "AwsCredentialsSid" (string) - The SID of the stored Credential resource. + * @param "AwsS3Url" (string) - The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. + * @param "AwsStorageEnabled" (bool) - Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud. + * @param "EncryptionEnabled" (bool) - Whether all recordings should be stored in an encrypted form. The default is `false`. + * @param "EncryptionKeySid" (string) - The SID of the Public Key resource to use for encryption. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource and be shown to users in the console +@return VideoV1RecordingSettings +*/ +func (c *DefaultApiService) CreateRecordingSettings(params *CreateRecordingSettingsParams) (*VideoV1RecordingSettings, error) { + path := "/v1/RecordingSettings/Default" + + + data := url.Values{} + headers := 0 + + if params != nil && params.AwsCredentialsSid != nil { + data.Set("AwsCredentialsSid", *params.AwsCredentialsSid) + } + if params != nil && params.AwsS3Url != nil { + data.Set("AwsS3Url", *params.AwsS3Url) + } + if params != nil && params.AwsStorageEnabled != nil { + data.Set("AwsStorageEnabled", fmt.Sprint(*params.AwsStorageEnabled)) + } + if params != nil && params.EncryptionEnabled != nil { + data.Set("EncryptionEnabled", fmt.Sprint(*params.EncryptionEnabled)) + } + if params != nil && params.EncryptionKeySid != nil { + data.Set("EncryptionKeySid", *params.EncryptionKeySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRoomParams Optional parameters for the method 'CreateRoom' +type CreateRoomParams struct { + EnableTurn *bool `json:"EnableTurn,omitempty"` + MaxParticipants *int32 `json:"MaxParticipants,omitempty"` + MediaRegion *string `json:"MediaRegion,omitempty"` + RecordParticipantsOnConnect *bool `json:"RecordParticipantsOnConnect,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Type *string `json:"Type,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VideoCodecs *[]string `json:"VideoCodecs,omitempty"` +} + +/* +CreateRoom Method for CreateRoom + * @param optional nil or *CreateRoomOpts - Optional Parameters: + * @param "EnableTurn" (bool) - Deprecated, now always considered to be true. + * @param "MaxParticipants" (int32) - The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. + * @param "MediaRegion" (string) - The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** + * @param "RecordParticipantsOnConnect" (bool) - Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. + * @param "Type" (string) - The type of room. Can be: `go`, `peer-to-peer`, `group-small`, or `group`. The default value is `group`. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. + * @param "VideoCodecs" ([]string) - An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** +@return VideoV1Room +*/ +func (c *DefaultApiService) CreateRoom(params *CreateRoomParams) (*VideoV1Room, error) { + path := "/v1/Rooms" + + + data := url.Values{} + headers := 0 + + if params != nil && params.EnableTurn != nil { + data.Set("EnableTurn", fmt.Sprint(*params.EnableTurn)) + } + if params != nil && params.MaxParticipants != nil { + data.Set("MaxParticipants", fmt.Sprint(*params.MaxParticipants)) + } + if params != nil && params.MediaRegion != nil { + data.Set("MediaRegion", *params.MediaRegion) + } + if params != nil && params.RecordParticipantsOnConnect != nil { + data.Set("RecordParticipantsOnConnect", fmt.Sprint(*params.RecordParticipantsOnConnect)) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Type != nil { + data.Set("Type", *params.Type) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VideoCodecs != nil { + data.Set("VideoCodecs", strings.Join(*params.VideoCodecs, ",")) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteComposition Method for DeleteComposition +Delete a Recording Composition resource identified by a Composition SID. + * @param Sid The SID of the Composition resource to delete. +*/ +func (c *DefaultApiService) DeleteComposition(Sid string) (error) { + path := "/v1/Compositions/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteCompositionHook Method for DeleteCompositionHook +Delete a Recording CompositionHook resource identified by a `CompositionHook SID`. + * @param Sid The SID of the CompositionHook resource to delete. +*/ +func (c *DefaultApiService) DeleteCompositionHook(Sid string) (error) { + path := "/v1/CompositionHooks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRecording Method for DeleteRecording +Delete a Recording resource identified by a Recording SID. + * @param Sid The SID of the Recording resource to delete. +*/ +func (c *DefaultApiService) DeleteRecording(Sid string) (error) { + path := "/v1/Recordings/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRoomRecording Method for DeleteRoomRecording + * @param RoomSid The SID of the room with the RoomRecording resource to delete. + * @param Sid The SID of the RoomRecording resource to delete. +*/ +func (c *DefaultApiService) DeleteRoomRecording(RoomSid string, Sid string) (error) { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchComposition Method for FetchComposition +Returns a single Composition resource identified by a Composition SID. + * @param Sid The SID of the Composition resource to fetch. +@return VideoV1Composition +*/ +func (c *DefaultApiService) FetchComposition(Sid string) (*VideoV1Composition, error) { + path := "/v1/Compositions/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Composition{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCompositionHook Method for FetchCompositionHook +Returns a single CompositionHook resource identified by a CompositionHook SID. + * @param Sid The SID of the CompositionHook resource to fetch. +@return VideoV1CompositionHook +*/ +func (c *DefaultApiService) FetchCompositionHook(Sid string) (*VideoV1CompositionHook, error) { + path := "/v1/CompositionHooks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchCompositionSettings Method for FetchCompositionSettings +@return VideoV1CompositionSettings +*/ +func (c *DefaultApiService) FetchCompositionSettings() (*VideoV1CompositionSettings, error) { + path := "/v1/CompositionSettings/Default" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecording Method for FetchRecording +Returns a single Recording resource identified by a Recording SID. + * @param Sid The SID of the Recording resource to fetch. +@return VideoV1Recording +*/ +func (c *DefaultApiService) FetchRecording(Sid string) (*VideoV1Recording, error) { + path := "/v1/Recordings/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Recording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRecordingSettings Method for FetchRecordingSettings +@return VideoV1RecordingSettings +*/ +func (c *DefaultApiService) FetchRecordingSettings() (*VideoV1RecordingSettings, error) { + path := "/v1/RecordingSettings/Default" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RecordingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoom Method for FetchRoom + * @param Sid The SID of the Room resource to fetch. +@return VideoV1Room +*/ +func (c *DefaultApiService) FetchRoom(Sid string) (*VideoV1Room, error) { + path := "/v1/Rooms/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomParticipant Method for FetchRoomParticipant + * @param RoomSid The SID of the room with the Participant resource to fetch. + * @param Sid The SID of the RoomParticipant resource to fetch. +@return VideoV1RoomRoomParticipant +*/ +func (c *DefaultApiService) FetchRoomParticipant(RoomSid string, Sid string) (*VideoV1RoomRoomParticipant, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomParticipantPublishedTrack Method for FetchRoomParticipantPublishedTrack +Returns a single Track resource represented by TrackName or SID. + * @param RoomSid The SID of the Room resource where the Track resource to fetch is published. + * @param ParticipantSid The SID of the Participant resource with the published track to fetch. + * @param Sid The SID of the RoomParticipantPublishedTrack resource to fetch. +@return VideoV1RoomRoomParticipantRoomParticipantPublishedTrack +*/ +func (c *DefaultApiService) FetchRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantPublishedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantPublishedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomParticipantSubscribeRule Method for FetchRoomParticipantSubscribeRule +Returns a list of Subscribe Rules for the Participant. + * @param RoomSid The SID of the Room resource where the subscribe rules to fetch apply. + * @param ParticipantSid The SID of the Participant resource with the subscribe rules to fetch. +@return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule +*/ +func (c *DefaultApiService) FetchRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomParticipantSubscribedTrack Method for FetchRoomParticipantSubscribedTrack +Returns a single Track resource represented by `track_sid`. Note: This is one resource with the Video API that requires a SID, be Track Name on the subscriber side is not guaranteed to be unique. + * @param RoomSid The SID of the Room where the Track resource to fetch is subscribed. + * @param ParticipantSid The SID of the participant that subscribes to the Track resource to fetch. + * @param Sid The SID of the RoomParticipantSubscribedTrack resource to fetch. +@return VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack +*/ +func (c *DefaultApiService) FetchRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, Sid string) (*VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomRecording Method for FetchRoomRecording + * @param RoomSid The SID of the Room resource with the recording to fetch. + * @param Sid The SID of the RoomRecording resource to fetch. +@return VideoV1RoomRoomRecording +*/ +func (c *DefaultApiService) FetchRoomRecording(RoomSid string, Sid string) (*VideoV1RoomRoomRecording, error) { + path := "/v1/Rooms/{RoomSid}/Recordings/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecording{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRoomRecordingRule Method for FetchRoomRecordingRule +Returns a list of Recording Rules for the Room. + * @param RoomSid The SID of the Room resource where the recording rules to fetch apply. +@return VideoV1RoomRoomRecordingRule +*/ +func (c *DefaultApiService) FetchRoomRecordingRule(RoomSid string) (*VideoV1RoomRoomRecordingRule, error) { + path := "/v1/Rooms/{RoomSid}/RecordingRules" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCompositionParams Optional parameters for the method 'ListComposition' +type ListCompositionParams struct { + Status *string `json:"Status,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + RoomSid *string `json:"RoomSid,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListComposition Method for ListComposition +List of all Recording compositions. + * @param optional nil or *ListCompositionOpts - Optional Parameters: + * @param "Status" (string) - Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`. + * @param "DateCreatedAfter" (time.Time) - Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. + * @param "DateCreatedBefore" (time.Time) - Read only Composition resources created before this ISO 8601 date-time with time zone. + * @param "RoomSid" (string) - Read only Composition resources with this Room SID. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCompositionResponse +*/ +func (c *DefaultApiService) ListComposition(params *ListCompositionParams) (*ListCompositionResponse, error) { + path := "/v1/Compositions" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.RoomSid != nil { + data.Set("RoomSid", *params.RoomSid) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCompositionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCompositionHookParams Optional parameters for the method 'ListCompositionHook' +type ListCompositionHookParams struct { + Enabled *bool `json:"Enabled,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCompositionHook Method for ListCompositionHook +List of all Recording CompositionHook resources. + * @param optional nil or *ListCompositionHookOpts - Optional Parameters: + * @param "Enabled" (bool) - Read only CompositionHook resources with an `enabled` value that matches this parameter. + * @param "DateCreatedAfter" (time.Time) - Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. + * @param "DateCreatedBefore" (time.Time) - Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. + * @param "FriendlyName" (string) - Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCompositionHookResponse +*/ +func (c *DefaultApiService) ListCompositionHook(params *ListCompositionHookParams) (*ListCompositionHookResponse, error) { + path := "/v1/CompositionHooks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCompositionHookResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRecordingParams Optional parameters for the method 'ListRecording' +type ListRecordingParams struct { + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + GroupingSid *[]string `json:"GroupingSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + MediaType *string `json:"MediaType,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRecording Method for ListRecording +List of all Track recordings. + * @param optional nil or *ListRecordingOpts - Optional Parameters: + * @param "Status" (string) - Read only the recordings that have this status. Can be: `processing`, `completed`, or `deleted`. + * @param "SourceSid" (string) - Read only the recordings that have this `source_sid`. + * @param "GroupingSid" ([]string) - Read only recordings with this `grouping_sid`, which may include a `participant_sid` and/or a `room_sid`. + * @param "DateCreatedAfter" (time.Time) - Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. + * @param "DateCreatedBefore" (time.Time) - Read only recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone, given as `YYYY-MM-DDThh:mm:ss+|-hh:mm` or `YYYY-MM-DDThh:mm:ssZ`. + * @param "MediaType" (string) - Read only recordings that have this media type. Can be either `audio` or `video`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRecordingResponse +*/ +func (c *DefaultApiService) ListRecording(params *ListRecordingParams) (*ListRecordingResponse, error) { + path := "/v1/Recordings" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) + } + if params != nil && params.GroupingSid != nil { + data.Set("GroupingSid", strings.Join(*params.GroupingSid, ",")) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.MediaType != nil { + data.Set("MediaType", *params.MediaType) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoomParams Optional parameters for the method 'ListRoom' +type ListRoomParams struct { + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRoom Method for ListRoom + * @param optional nil or *ListRoomOpts - Optional Parameters: + * @param "Status" (string) - Read only the rooms with this status. Can be: `in-progress` (default) or `completed` + * @param "UniqueName" (string) - Read only rooms with the this `unique_name`. + * @param "DateCreatedAfter" (time.Time) - Read only rooms that started on or after this date, given as `YYYY-MM-DD`. + * @param "DateCreatedBefore" (time.Time) - Read only rooms that started before this date, given as `YYYY-MM-DD`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoomResponse +*/ +func (c *DefaultApiService) ListRoom(params *ListRoomParams) (*ListRoomResponse, error) { + path := "/v1/Rooms" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoomResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoomParticipantParams Optional parameters for the method 'ListRoomParticipant' +type ListRoomParticipantParams struct { + Status *string `json:"Status,omitempty"` + Identity *string `json:"Identity,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRoomParticipant Method for ListRoomParticipant + * @param RoomSid The SID of the room with the Participant resources to read. + * @param optional nil or *ListRoomParticipantOpts - Optional Parameters: + * @param "Status" (string) - Read only the participants with this status. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. + * @param "Identity" (string) - Read only the Participants with this [User](https://www.twilio.com/docs/chat/rest/user-resource) `identity` value. + * @param "DateCreatedAfter" (time.Time) - Read only Participants that started after this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. + * @param "DateCreatedBefore" (time.Time) - Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoomParticipantResponse +*/ +func (c *DefaultApiService) ListRoomParticipant(RoomSid string, params *ListRoomParticipantParams) (*ListRoomParticipantResponse, error) { + path := "/v1/Rooms/{RoomSid}/Participants" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Identity != nil { + data.Set("Identity", *params.Identity) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoomParticipantResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoomParticipantPublishedTrackParams Optional parameters for the method 'ListRoomParticipantPublishedTrack' +type ListRoomParticipantPublishedTrackParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRoomParticipantPublishedTrack Method for ListRoomParticipantPublishedTrack +Returns a list of tracks associated with a given Participant. Only `currently` Published Tracks are in the list resource. + * @param RoomSid The SID of the Room resource where the Track resources to read are published. + * @param ParticipantSid The SID of the Participant resource with the published tracks to read. + * @param optional nil or *ListRoomParticipantPublishedTrackOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoomParticipantPublishedTrackResponse +*/ +func (c *DefaultApiService) ListRoomParticipantPublishedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantPublishedTrackParams) (*ListRoomParticipantPublishedTrackResponse, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoomParticipantPublishedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoomParticipantSubscribedTrackParams Optional parameters for the method 'ListRoomParticipantSubscribedTrack' +type ListRoomParticipantSubscribedTrackParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRoomParticipantSubscribedTrack Method for ListRoomParticipantSubscribedTrack +Returns a list of tracks that are subscribed for the participant. + * @param RoomSid The SID of the Room resource with the Track resources to read. + * @param ParticipantSid The SID of the participant that subscribes to the Track resources to read. + * @param optional nil or *ListRoomParticipantSubscribedTrackOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoomParticipantSubscribedTrackResponse +*/ +func (c *DefaultApiService) ListRoomParticipantSubscribedTrack(RoomSid string, ParticipantSid string, params *ListRoomParticipantSubscribedTrackParams) (*ListRoomParticipantSubscribedTrackResponse, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoomParticipantSubscribedTrackResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRoomRecordingParams Optional parameters for the method 'ListRoomRecording' +type ListRoomRecordingParams struct { + Status *string `json:"Status,omitempty"` + SourceSid *string `json:"SourceSid,omitempty"` + DateCreatedAfter *time.Time `json:"DateCreatedAfter,omitempty"` + DateCreatedBefore *time.Time `json:"DateCreatedBefore,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRoomRecording Method for ListRoomRecording + * @param RoomSid The SID of the room with the RoomRecording resources to read. + * @param optional nil or *ListRoomRecordingOpts - Optional Parameters: + * @param "Status" (string) - Read only the recordings with this status. Can be: `processing`, `completed`, or `deleted`. + * @param "SourceSid" (string) - Read only the recordings that have this `source_sid`. + * @param "DateCreatedAfter" (time.Time) - Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. + * @param "DateCreatedBefore" (time.Time) - Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRoomRecordingResponse +*/ +func (c *DefaultApiService) ListRoomRecording(RoomSid string, params *ListRoomRecordingParams) (*ListRoomRecordingResponse, error) { + path := "/v1/Rooms/{RoomSid}/Recordings" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.SourceSid != nil { + data.Set("SourceSid", *params.SourceSid) + } + if params != nil && params.DateCreatedAfter != nil { + data.Set("DateCreatedAfter", fmt.Sprint(*params.DateCreatedAfter)) + } + if params != nil && params.DateCreatedBefore != nil { + data.Set("DateCreatedBefore", fmt.Sprint(*params.DateCreatedBefore)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRoomRecordingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateCompositionHookParams Optional parameters for the method 'UpdateCompositionHook' +type UpdateCompositionHookParams struct { + AudioSources *[]string `json:"AudioSources,omitempty"` + AudioSourcesExcluded *[]string `json:"AudioSourcesExcluded,omitempty"` + Enabled *bool `json:"Enabled,omitempty"` + Format *string `json:"Format,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Resolution *string `json:"Resolution,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + Trim *bool `json:"Trim,omitempty"` + VideoLayout *map[string]interface{} `json:"VideoLayout,omitempty"` +} + +/* +UpdateCompositionHook Method for UpdateCompositionHook + * @param Sid The SID of the CompositionHook resource to update. + * @param optional nil or *UpdateCompositionHookOpts - Optional Parameters: + * @param "AudioSources" ([]string) - An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. + * @param "AudioSourcesExcluded" ([]string) - An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + * @param "Enabled" (bool) - Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers. + * @param "Format" (string) - The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. + * @param "Resolution" (string) - A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "StatusCallback" (string) - The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + * @param "Trim" (bool) - Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + * @param "VideoLayout" (map[string]interface{}) - A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. +@return VideoV1CompositionHook +*/ +func (c *DefaultApiService) UpdateCompositionHook(Sid string, params *UpdateCompositionHookParams) (*VideoV1CompositionHook, error) { + path := "/v1/CompositionHooks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AudioSources != nil { + data.Set("AudioSources", strings.Join(*params.AudioSources, ",")) + } + if params != nil && params.AudioSourcesExcluded != nil { + data.Set("AudioSourcesExcluded", strings.Join(*params.AudioSourcesExcluded, ",")) + } + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.Format != nil { + data.Set("Format", *params.Format) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Resolution != nil { + data.Set("Resolution", *params.Resolution) + } + if params != nil && params.StatusCallback != nil { + data.Set("StatusCallback", *params.StatusCallback) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.Trim != nil { + data.Set("Trim", fmt.Sprint(*params.Trim)) + } + if params != nil && params.VideoLayout != nil { + v, err := json.Marshal(params.VideoLayout) + + if err != nil { + return nil, err + } + + data.Set("VideoLayout", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1CompositionHook{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoomParams Optional parameters for the method 'UpdateRoom' +type UpdateRoomParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateRoom Method for UpdateRoom + * @param Sid The SID of the Room resource to update. + * @param optional nil or *UpdateRoomOpts - Optional Parameters: + * @param "Status" (string) - The new status of the resource. Set to `completed` to end the room. +@return VideoV1Room +*/ +func (c *DefaultApiService) UpdateRoom(Sid string, params *UpdateRoomParams) (*VideoV1Room, error) { + path := "/v1/Rooms/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1Room{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoomParticipantParams Optional parameters for the method 'UpdateRoomParticipant' +type UpdateRoomParticipantParams struct { + Status *string `json:"Status,omitempty"` +} + +/* +UpdateRoomParticipant Method for UpdateRoomParticipant + * @param RoomSid The SID of the room with the participant to update. + * @param Sid The SID of the RoomParticipant resource to update. + * @param optional nil or *UpdateRoomParticipantOpts - Optional Parameters: + * @param "Status" (string) - The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. +@return VideoV1RoomRoomParticipant +*/ +func (c *DefaultApiService) UpdateRoomParticipant(RoomSid string, Sid string, params *UpdateRoomParticipantParams) (*VideoV1RoomRoomParticipant, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{Sid}" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipant{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoomParticipantSubscribeRuleParams Optional parameters for the method 'UpdateRoomParticipantSubscribeRule' +type UpdateRoomParticipantSubscribeRuleParams struct { + Rules *map[string]interface{} `json:"Rules,omitempty"` +} + +/* +UpdateRoomParticipantSubscribeRule Method for UpdateRoomParticipantSubscribeRule +Update the Subscribe Rules for the Participant + * @param RoomSid The SID of the Room resource where the subscribe rules to update apply. + * @param ParticipantSid The SID of the Participant resource to update the Subscribe Rules. + * @param optional nil or *UpdateRoomParticipantSubscribeRuleOpts - Optional Parameters: + * @param "Rules" (map[string]interface{}) - A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. +@return VideoV1RoomRoomParticipantRoomParticipantSubscribeRule +*/ +func (c *DefaultApiService) UpdateRoomParticipantSubscribeRule(RoomSid string, ParticipantSid string, params *UpdateRoomParticipantSubscribeRuleParams) (*VideoV1RoomRoomParticipantRoomParticipantSubscribeRule, error) { + path := "/v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + path = strings.Replace(path, "{"+"ParticipantSid"+"}", ParticipantSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) + + if err != nil { + return nil, err + } + + data.Set("Rules", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomParticipantRoomParticipantSubscribeRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRoomRecordingRuleParams Optional parameters for the method 'UpdateRoomRecordingRule' +type UpdateRoomRecordingRuleParams struct { + Rules *map[string]interface{} `json:"Rules,omitempty"` +} + +/* +UpdateRoomRecordingRule Method for UpdateRoomRecordingRule +Update the Recording Rules for the Room + * @param RoomSid The SID of the Room resource where the recording rules to update apply. + * @param optional nil or *UpdateRoomRecordingRuleOpts - Optional Parameters: + * @param "Rules" (map[string]interface{}) - A JSON-encoded array of recording rules. +@return VideoV1RoomRoomRecordingRule +*/ +func (c *DefaultApiService) UpdateRoomRecordingRule(RoomSid string, params *UpdateRoomRecordingRuleParams) (*VideoV1RoomRoomRecordingRule, error) { + path := "/v1/Rooms/{RoomSid}/RecordingRules" + path = strings.Replace(path, "{"+"RoomSid"+"}", RoomSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Rules != nil { + v, err := json.Marshal(params.Rules) + + if err != nil { + return nil, err + } + + data.Set("Rules", fmt.Sprint(v)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VideoV1RoomRoomRecordingRule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/video/v1/docs/CreateCompositionHookRequest.md b/rest/video/v1/docs/CreateCompositionHookRequest.md new file mode 100644 index 000000000..a7e7ba0b2 --- /dev/null +++ b/rest/video/v1/docs/CreateCompositionHookRequest.md @@ -0,0 +1,20 @@ +# CreateCompositionHookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AudioSources** | **[]string** | An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. | [optional] +**AudioSourcesExcluded** | **[]string** | An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | [optional] +**Enabled** | **bool** | Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered. | [optional] +**Format** | **string** | The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. | +**Resolution** | **string** | A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | [optional] +**Trim** | **bool** | Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**VideoLayout** | [**map[string]interface{}**](.md) | An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/CreateCompositionRequest.md b/rest/video/v1/docs/CreateCompositionRequest.md new file mode 100644 index 000000000..ff4c2e85a --- /dev/null +++ b/rest/video/v1/docs/CreateCompositionRequest.md @@ -0,0 +1,19 @@ +# CreateCompositionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AudioSources** | **[]string** | An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request | [optional] +**AudioSourcesExcluded** | **[]string** | An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | [optional] +**Format** | **string** | The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs. | [optional] +**Resolution** | **string** | A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**RoomSid** | **string** | The SID of the Group Room with the media tracks to be used as composition sources. | +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | [optional] +**Trim** | **bool** | Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**VideoLayout** | [**map[string]interface{}**](.md) | An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/CreateCompositionSettingsRequest.md b/rest/video/v1/docs/CreateCompositionSettingsRequest.md new file mode 100644 index 000000000..8d610c731 --- /dev/null +++ b/rest/video/v1/docs/CreateCompositionSettingsRequest.md @@ -0,0 +1,16 @@ +# CreateCompositionSettingsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AwsCredentialsSid** | **string** | The SID of the stored Credential resource. | [optional] +**AwsS3Url** | **string** | The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>. | [optional] +**AwsStorageEnabled** | **bool** | Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud. | [optional] +**EncryptionEnabled** | **bool** | Whether all compositions should be stored in an encrypted form. The default is `false`. | [optional] +**EncryptionKeySid** | **string** | The SID of the Public Key resource to use for encryption. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource and show to the user in the console | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/CreateRecordingSettingsRequest.md b/rest/video/v1/docs/CreateRecordingSettingsRequest.md new file mode 100644 index 000000000..a7e46c87e --- /dev/null +++ b/rest/video/v1/docs/CreateRecordingSettingsRequest.md @@ -0,0 +1,16 @@ +# CreateRecordingSettingsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AwsCredentialsSid** | **string** | The SID of the stored Credential resource. | [optional] +**AwsS3Url** | **string** | The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>. | [optional] +**AwsStorageEnabled** | **bool** | Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud. | [optional] +**EncryptionEnabled** | **bool** | Whether all recordings should be stored in an encrypted form. The default is `false`. | [optional] +**EncryptionKeySid** | **string** | The SID of the Public Key resource to use for encryption. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource and be shown to users in the console | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/CreateRoomRequest.md b/rest/video/v1/docs/CreateRoomRequest.md new file mode 100644 index 000000000..0176afd8e --- /dev/null +++ b/rest/video/v1/docs/CreateRoomRequest.md @@ -0,0 +1,19 @@ +# CreateRoomRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnableTurn** | **bool** | Deprecated, now always considered to be true. | [optional] +**MaxParticipants** | **int32** | The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. | [optional] +**MediaRegion** | **string** | The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** | [optional] +**RecordParticipantsOnConnect** | **bool** | Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. | [optional] +**Type** | **string** | The type of room. Can be: `go`, `peer-to-peer`, `group-small`, or `group`. The default value is `group`. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. | [optional] +**VideoCodecs** | **[]string** | An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/DefaultApi.md b/rest/video/v1/docs/DefaultApi.md new file mode 100644 index 000000000..f6e4239c6 --- /dev/null +++ b/rest/video/v1/docs/DefaultApi.md @@ -0,0 +1,1422 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateComposition**](DefaultApi.md#CreateComposition) | **Post** /v1/Compositions | +[**CreateCompositionHook**](DefaultApi.md#CreateCompositionHook) | **Post** /v1/CompositionHooks | +[**CreateCompositionSettings**](DefaultApi.md#CreateCompositionSettings) | **Post** /v1/CompositionSettings/Default | +[**CreateRecordingSettings**](DefaultApi.md#CreateRecordingSettings) | **Post** /v1/RecordingSettings/Default | +[**CreateRoom**](DefaultApi.md#CreateRoom) | **Post** /v1/Rooms | +[**DeleteComposition**](DefaultApi.md#DeleteComposition) | **Delete** /v1/Compositions/{Sid} | +[**DeleteCompositionHook**](DefaultApi.md#DeleteCompositionHook) | **Delete** /v1/CompositionHooks/{Sid} | +[**DeleteRecording**](DefaultApi.md#DeleteRecording) | **Delete** /v1/Recordings/{Sid} | +[**DeleteRoomRecording**](DefaultApi.md#DeleteRoomRecording) | **Delete** /v1/Rooms/{RoomSid}/Recordings/{Sid} | +[**FetchComposition**](DefaultApi.md#FetchComposition) | **Get** /v1/Compositions/{Sid} | +[**FetchCompositionHook**](DefaultApi.md#FetchCompositionHook) | **Get** /v1/CompositionHooks/{Sid} | +[**FetchCompositionSettings**](DefaultApi.md#FetchCompositionSettings) | **Get** /v1/CompositionSettings/Default | +[**FetchRecording**](DefaultApi.md#FetchRecording) | **Get** /v1/Recordings/{Sid} | +[**FetchRecordingSettings**](DefaultApi.md#FetchRecordingSettings) | **Get** /v1/RecordingSettings/Default | +[**FetchRoom**](DefaultApi.md#FetchRoom) | **Get** /v1/Rooms/{Sid} | +[**FetchRoomParticipant**](DefaultApi.md#FetchRoomParticipant) | **Get** /v1/Rooms/{RoomSid}/Participants/{Sid} | +[**FetchRoomParticipantPublishedTrack**](DefaultApi.md#FetchRoomParticipantPublishedTrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks/{Sid} | +[**FetchRoomParticipantSubscribeRule**](DefaultApi.md#FetchRoomParticipantSubscribeRule) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules | +[**FetchRoomParticipantSubscribedTrack**](DefaultApi.md#FetchRoomParticipantSubscribedTrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks/{Sid} | +[**FetchRoomRecording**](DefaultApi.md#FetchRoomRecording) | **Get** /v1/Rooms/{RoomSid}/Recordings/{Sid} | +[**FetchRoomRecordingRule**](DefaultApi.md#FetchRoomRecordingRule) | **Get** /v1/Rooms/{RoomSid}/RecordingRules | +[**ListComposition**](DefaultApi.md#ListComposition) | **Get** /v1/Compositions | +[**ListCompositionHook**](DefaultApi.md#ListCompositionHook) | **Get** /v1/CompositionHooks | +[**ListRecording**](DefaultApi.md#ListRecording) | **Get** /v1/Recordings | +[**ListRoom**](DefaultApi.md#ListRoom) | **Get** /v1/Rooms | +[**ListRoomParticipant**](DefaultApi.md#ListRoomParticipant) | **Get** /v1/Rooms/{RoomSid}/Participants | +[**ListRoomParticipantPublishedTrack**](DefaultApi.md#ListRoomParticipantPublishedTrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/PublishedTracks | +[**ListRoomParticipantSubscribedTrack**](DefaultApi.md#ListRoomParticipantSubscribedTrack) | **Get** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribedTracks | +[**ListRoomRecording**](DefaultApi.md#ListRoomRecording) | **Get** /v1/Rooms/{RoomSid}/Recordings | +[**UpdateCompositionHook**](DefaultApi.md#UpdateCompositionHook) | **Post** /v1/CompositionHooks/{Sid} | +[**UpdateRoom**](DefaultApi.md#UpdateRoom) | **Post** /v1/Rooms/{Sid} | +[**UpdateRoomParticipant**](DefaultApi.md#UpdateRoomParticipant) | **Post** /v1/Rooms/{RoomSid}/Participants/{Sid} | +[**UpdateRoomParticipantSubscribeRule**](DefaultApi.md#UpdateRoomParticipantSubscribeRule) | **Post** /v1/Rooms/{RoomSid}/Participants/{ParticipantSid}/SubscribeRules | +[**UpdateRoomRecordingRule**](DefaultApi.md#UpdateRoomRecordingRule) | **Post** /v1/Rooms/{RoomSid}/RecordingRules | + + + +## CreateComposition + +> VideoV1Composition CreateComposition(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCompositionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCompositionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AudioSources** | [**optional.Interface of []string**](string.md)| An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request | + **AudioSourcesExcluded** | [**optional.Interface of []string**](string.md)| An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | + **Format** | **optional.String**| The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs. | + **Resolution** | **optional.String**| A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **RoomSid** | **optional.String**| The SID of the Group Room with the media tracks to be used as composition sources. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | + **Trim** | **optional.Bool**| Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **VideoLayout** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request | + +### Return type + +[**VideoV1Composition**](video.v1.composition.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCompositionHook + +> VideoV1CompositionHook CreateCompositionHook(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCompositionHookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCompositionHookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AudioSources** | [**optional.Interface of []string**](string.md)| An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. | + **AudioSourcesExcluded** | [**optional.Interface of []string**](string.md)| An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | + **Enabled** | **optional.Bool**| Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered. | + **Format** | **optional.String**| The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. | + **Resolution** | **optional.String**| A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | + **Trim** | **optional.Bool**| Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **VideoLayout** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + +### Return type + +[**VideoV1CompositionHook**](video.v1.composition_hook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCompositionSettings + +> VideoV1CompositionSettings CreateCompositionSettings(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCompositionSettingsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCompositionSettingsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AwsCredentialsSid** | **optional.String**| The SID of the stored Credential resource. | + **AwsS3Url** | **optional.String**| The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>. | + **AwsStorageEnabled** | **optional.Bool**| Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud. | + **EncryptionEnabled** | **optional.Bool**| Whether all compositions should be stored in an encrypted form. The default is `false`. | + **EncryptionKeySid** | **optional.String**| The SID of the Public Key resource to use for encryption. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource and show to the user in the console | + +### Return type + +[**VideoV1CompositionSettings**](video.v1.composition_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRecordingSettings + +> VideoV1RecordingSettings CreateRecordingSettings(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateRecordingSettingsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRecordingSettingsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **AwsCredentialsSid** | **optional.String**| The SID of the stored Credential resource. | + **AwsS3Url** | **optional.String**| The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the <a href='https://tools.ietf.org/html/rfc3986#section-2'>RFC 3986</a>. | + **AwsStorageEnabled** | **optional.Bool**| Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud. | + **EncryptionEnabled** | **optional.Bool**| Whether all recordings should be stored in an encrypted form. The default is `false`. | + **EncryptionKeySid** | **optional.String**| The SID of the Public Key resource to use for encryption. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource and be shown to users in the console | + +### Return type + +[**VideoV1RecordingSettings**](video.v1.recording_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRoom + +> VideoV1Room CreateRoom(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateRoomOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRoomOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **EnableTurn** | **optional.Bool**| Deprecated, now always considered to be true. | + **MaxParticipants** | **optional.Int32**| The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. | + **MediaRegion** | **optional.String**| The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** | + **RecordParticipantsOnConnect** | **optional.Bool**| Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. | + **Type** | **optional.String**| The type of room. Can be: `go`, `peer-to-peer`, `group-small`, or `group`. The default value is `group`. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. | + **VideoCodecs** | [**optional.Interface of []string**](string.md)| An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** | + +### Return type + +[**VideoV1Room**](video.v1.room.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteComposition + +> DeleteComposition(ctx, Sid) + + + +Delete a Recording Composition resource identified by a Composition SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Composition resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCompositionHook + +> DeleteCompositionHook(ctx, Sid) + + + +Delete a Recording CompositionHook resource identified by a `CompositionHook SID`. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the CompositionHook resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecording + +> DeleteRecording(ctx, Sid) + + + +Delete a Recording resource identified by a Recording SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Recording resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRoomRecording + +> DeleteRoomRecording(ctx, RoomSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the room with the RoomRecording resource to delete. | +**Sid** | **string**| The SID of the RoomRecording resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchComposition + +> VideoV1Composition FetchComposition(ctx, Sid) + + + +Returns a single Composition resource identified by a Composition SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Composition resource to fetch. | + +### Return type + +[**VideoV1Composition**](video.v1.composition.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCompositionHook + +> VideoV1CompositionHook FetchCompositionHook(ctx, Sid) + + + +Returns a single CompositionHook resource identified by a CompositionHook SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the CompositionHook resource to fetch. | + +### Return type + +[**VideoV1CompositionHook**](video.v1.composition_hook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCompositionSettings + +> VideoV1CompositionSettings FetchCompositionSettings(ctx, ) + + + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**VideoV1CompositionSettings**](video.v1.composition_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecording + +> VideoV1Recording FetchRecording(ctx, Sid) + + + +Returns a single Recording resource identified by a Recording SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Recording resource to fetch. | + +### Return type + +[**VideoV1Recording**](video.v1.recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRecordingSettings + +> VideoV1RecordingSettings FetchRecordingSettings(ctx, ) + + + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**VideoV1RecordingSettings**](video.v1.recording_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoom + +> VideoV1Room FetchRoom(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Room resource to fetch. | + +### Return type + +[**VideoV1Room**](video.v1.room.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomParticipant + +> VideoV1RoomRoomParticipant FetchRoomParticipant(ctx, RoomSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the room with the Participant resource to fetch. | +**Sid** | **string**| The SID of the RoomParticipant resource to fetch. | + +### Return type + +[**VideoV1RoomRoomParticipant**](video.v1.room.room_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomParticipantPublishedTrack + +> VideoV1RoomRoomParticipantRoomParticipantPublishedTrack FetchRoomParticipantPublishedTrack(ctx, RoomSid, ParticipantSid, Sid) + + + +Returns a single Track resource represented by TrackName or SID. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the Track resource to fetch is published. | +**ParticipantSid** | **string**| The SID of the Participant resource with the published track to fetch. | +**Sid** | **string**| The SID of the RoomParticipantPublishedTrack resource to fetch. | + +### Return type + +[**VideoV1RoomRoomParticipantRoomParticipantPublishedTrack**](video.v1.room.room_participant.room_participant_published_track.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomParticipantSubscribeRule + +> VideoV1RoomRoomParticipantRoomParticipantSubscribeRule FetchRoomParticipantSubscribeRule(ctx, RoomSid, ParticipantSid) + + + +Returns a list of Subscribe Rules for the Participant. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the subscribe rules to fetch apply. | +**ParticipantSid** | **string**| The SID of the Participant resource with the subscribe rules to fetch. | + +### Return type + +[**VideoV1RoomRoomParticipantRoomParticipantSubscribeRule**](video.v1.room.room_participant.room_participant_subscribe_rule.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomParticipantSubscribedTrack + +> VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack FetchRoomParticipantSubscribedTrack(ctx, RoomSid, ParticipantSid, Sid) + + + +Returns a single Track resource represented by `track_sid`. Note: This is one resource with the Video API that requires a SID, be Track Name on the subscriber side is not guaranteed to be unique. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room where the Track resource to fetch is subscribed. | +**ParticipantSid** | **string**| The SID of the participant that subscribes to the Track resource to fetch. | +**Sid** | **string**| The SID of the RoomParticipantSubscribedTrack resource to fetch. | + +### Return type + +[**VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack**](video.v1.room.room_participant.room_participant_subscribed_track.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomRecording + +> VideoV1RoomRoomRecording FetchRoomRecording(ctx, RoomSid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource with the recording to fetch. | +**Sid** | **string**| The SID of the RoomRecording resource to fetch. | + +### Return type + +[**VideoV1RoomRoomRecording**](video.v1.room.room_recording.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRoomRecordingRule + +> VideoV1RoomRoomRecordingRule FetchRoomRecordingRule(ctx, RoomSid) + + + +Returns a list of Recording Rules for the Room. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the recording rules to fetch apply. | + +### Return type + +[**VideoV1RoomRoomRecordingRule**](video.v1.room.room_recording_rule.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListComposition + +> ListCompositionResponse ListComposition(ctx, optional) + + + +List of all Recording compositions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCompositionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCompositionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`. | + **DateCreatedAfter** | **optional.Time**| Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. | + **DateCreatedBefore** | **optional.Time**| Read only Composition resources created before this ISO 8601 date-time with time zone. | + **RoomSid** | **optional.String**| Read only Composition resources with this Room SID. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCompositionResponse**](ListCompositionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCompositionHook + +> ListCompositionHookResponse ListCompositionHook(ctx, optional) + + + +List of all Recording CompositionHook resources. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCompositionHookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCompositionHookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Enabled** | **optional.Bool**| Read only CompositionHook resources with an `enabled` value that matches this parameter. | + **DateCreatedAfter** | **optional.Time**| Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. | + **DateCreatedBefore** | **optional.Time**| Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. | + **FriendlyName** | **optional.String**| Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCompositionHookResponse**](ListCompositionHookResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecording + +> ListRecordingResponse ListRecording(ctx, optional) + + + +List of all Track recordings. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| Read only the recordings that have this status. Can be: `processing`, `completed`, or `deleted`. | + **SourceSid** | **optional.String**| Read only the recordings that have this `source_sid`. | + **GroupingSid** | [**optional.Interface of []string**](string.md)| Read only recordings with this `grouping_sid`, which may include a `participant_sid` and/or a `room_sid`. | + **DateCreatedAfter** | **optional.Time**| Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone. | + **DateCreatedBefore** | **optional.Time**| Read only recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone, given as `YYYY-MM-DDThh:mm:ss+|-hh:mm` or `YYYY-MM-DDThh:mm:ssZ`. | + **MediaType** | **optional.String**| Read only recordings that have this media type. Can be either `audio` or `video`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRecordingResponse**](ListRecordingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoom + +> ListRoomResponse ListRoom(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRoomOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoomOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| Read only the rooms with this status. Can be: `in-progress` (default) or `completed` | + **UniqueName** | **optional.String**| Read only rooms with the this `unique_name`. | + **DateCreatedAfter** | **optional.Time**| Read only rooms that started on or after this date, given as `YYYY-MM-DD`. | + **DateCreatedBefore** | **optional.Time**| Read only rooms that started before this date, given as `YYYY-MM-DD`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoomResponse**](ListRoomResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoomParticipant + +> ListRoomParticipantResponse ListRoomParticipant(ctx, RoomSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the room with the Participant resources to read. | + **optional** | ***ListRoomParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoomParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Status** | **optional.String**| Read only the participants with this status. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. | + **Identity** | **optional.String**| Read only the Participants with this [User](https://www.twilio.com/docs/chat/rest/user-resource) `identity` value. | + **DateCreatedAfter** | **optional.Time**| Read only Participants that started after this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. | + **DateCreatedBefore** | **optional.Time**| Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoomParticipantResponse**](ListRoomParticipantResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoomParticipantPublishedTrack + +> ListRoomParticipantPublishedTrackResponse ListRoomParticipantPublishedTrack(ctx, RoomSid, ParticipantSid, optional) + + + +Returns a list of tracks associated with a given Participant. Only `currently` Published Tracks are in the list resource. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the Track resources to read are published. | +**ParticipantSid** | **string**| The SID of the Participant resource with the published tracks to read. | + **optional** | ***ListRoomParticipantPublishedTrackOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoomParticipantPublishedTrackOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoomParticipantPublishedTrackResponse**](ListRoomParticipantPublishedTrackResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoomParticipantSubscribedTrack + +> ListRoomParticipantSubscribedTrackResponse ListRoomParticipantSubscribedTrack(ctx, RoomSid, ParticipantSid, optional) + + + +Returns a list of tracks that are subscribed for the participant. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource with the Track resources to read. | +**ParticipantSid** | **string**| The SID of the participant that subscribes to the Track resources to read. | + **optional** | ***ListRoomParticipantSubscribedTrackOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoomParticipantSubscribedTrackOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoomParticipantSubscribedTrackResponse**](ListRoomParticipantSubscribedTrackResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoomRecording + +> ListRoomRecordingResponse ListRoomRecording(ctx, RoomSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the room with the RoomRecording resources to read. | + **optional** | ***ListRoomRecordingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRoomRecordingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Status** | **optional.String**| Read only the recordings with this status. Can be: `processing`, `completed`, or `deleted`. | + **SourceSid** | **optional.String**| Read only the recordings that have this `source_sid`. | + **DateCreatedAfter** | **optional.Time**| Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. | + **DateCreatedBefore** | **optional.Time**| Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRoomRecordingResponse**](ListRoomRecordingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCompositionHook + +> VideoV1CompositionHook UpdateCompositionHook(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the CompositionHook resource to update. | + **optional** | ***UpdateCompositionHookOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateCompositionHookOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AudioSources** | [**optional.Interface of []string**](string.md)| An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. | + **AudioSourcesExcluded** | [**optional.Interface of []string**](string.md)| An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | + **Enabled** | **optional.Bool**| Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers. | + **Format** | **optional.String**| The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. | + **Resolution** | **optional.String**| A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **StatusCallback** | **optional.String**| The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | + **Trim** | **optional.Bool**| Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + **VideoLayout** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | + +### Return type + +[**VideoV1CompositionHook**](video.v1.composition_hook.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRoom + +> VideoV1Room UpdateRoom(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Room resource to update. | + **optional** | ***UpdateRoomOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoomOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Status** | **optional.String**| The new status of the resource. Set to `completed` to end the room. | + +### Return type + +[**VideoV1Room**](video.v1.room.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRoomParticipant + +> VideoV1RoomRoomParticipant UpdateRoomParticipant(ctx, RoomSid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the room with the participant to update. | +**Sid** | **string**| The SID of the RoomParticipant resource to update. | + **optional** | ***UpdateRoomParticipantOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoomParticipantOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Status** | **optional.String**| The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. | + +### Return type + +[**VideoV1RoomRoomParticipant**](video.v1.room.room_participant.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRoomParticipantSubscribeRule + +> VideoV1RoomRoomParticipantRoomParticipantSubscribeRule UpdateRoomParticipantSubscribeRule(ctx, RoomSid, ParticipantSid, optional) + + + +Update the Subscribe Rules for the Participant + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the subscribe rules to update apply. | +**ParticipantSid** | **string**| The SID of the Participant resource to update the Subscribe Rules. | + **optional** | ***UpdateRoomParticipantSubscribeRuleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoomParticipantSubscribeRuleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Rules** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. | + +### Return type + +[**VideoV1RoomRoomParticipantRoomParticipantSubscribeRule**](video.v1.room.room_participant.room_participant_subscribe_rule.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRoomRecordingRule + +> VideoV1RoomRoomRecordingRule UpdateRoomRecordingRule(ctx, RoomSid, optional) + + + +Update the Recording Rules for the Room + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RoomSid** | **string**| The SID of the Room resource where the recording rules to update apply. | + **optional** | ***UpdateRoomRecordingRuleOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRoomRecordingRuleOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Rules** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| A JSON-encoded array of recording rules. | + +### Return type + +[**VideoV1RoomRoomRecordingRule**](video.v1.room.room_recording_rule.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/video/v1/docs/ListCompositionHookResponse.md b/rest/video/v1/docs/ListCompositionHookResponse.md new file mode 100644 index 000000000..4b2e052c9 --- /dev/null +++ b/rest/video/v1/docs/ListCompositionHookResponse.md @@ -0,0 +1,12 @@ +# ListCompositionHookResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CompositionHooks** | [**[]VideoV1CompositionHook**](video.v1.composition_hook.md) | | [optional] +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListCompositionHookResponseMeta.md b/rest/video/v1/docs/ListCompositionHookResponseMeta.md new file mode 100644 index 000000000..01ce4a98a --- /dev/null +++ b/rest/video/v1/docs/ListCompositionHookResponseMeta.md @@ -0,0 +1,17 @@ +# ListCompositionHookResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListCompositionResponse.md b/rest/video/v1/docs/ListCompositionResponse.md new file mode 100644 index 000000000..5c28b79ea --- /dev/null +++ b/rest/video/v1/docs/ListCompositionResponse.md @@ -0,0 +1,12 @@ +# ListCompositionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Compositions** | [**[]VideoV1Composition**](video.v1.composition.md) | | [optional] +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRecordingResponse.md b/rest/video/v1/docs/ListRecordingResponse.md new file mode 100644 index 000000000..886ecf2b7 --- /dev/null +++ b/rest/video/v1/docs/ListRecordingResponse.md @@ -0,0 +1,12 @@ +# ListRecordingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**Recordings** | [**[]VideoV1Recording**](video.v1.recording.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md b/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md new file mode 100644 index 000000000..6dff7cc90 --- /dev/null +++ b/rest/video/v1/docs/ListRoomParticipantPublishedTrackResponse.md @@ -0,0 +1,12 @@ +# ListRoomParticipantPublishedTrackResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**PublishedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantPublishedTrack**](video.v1.room.room_participant.room_participant_published_track.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRoomParticipantResponse.md b/rest/video/v1/docs/ListRoomParticipantResponse.md new file mode 100644 index 000000000..034677c28 --- /dev/null +++ b/rest/video/v1/docs/ListRoomParticipantResponse.md @@ -0,0 +1,12 @@ +# ListRoomParticipantResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**Participants** | [**[]VideoV1RoomRoomParticipant**](video.v1.room.room_participant.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md b/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md new file mode 100644 index 000000000..a7d242fb4 --- /dev/null +++ b/rest/video/v1/docs/ListRoomParticipantSubscribedTrackResponse.md @@ -0,0 +1,12 @@ +# ListRoomParticipantSubscribedTrackResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**SubscribedTracks** | [**[]VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack**](video.v1.room.room_participant.room_participant_subscribed_track.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRoomRecordingResponse.md b/rest/video/v1/docs/ListRoomRecordingResponse.md new file mode 100644 index 000000000..b6d11fe59 --- /dev/null +++ b/rest/video/v1/docs/ListRoomRecordingResponse.md @@ -0,0 +1,12 @@ +# ListRoomRecordingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**Recordings** | [**[]VideoV1RoomRoomRecording**](video.v1.room.room_recording.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/ListRoomResponse.md b/rest/video/v1/docs/ListRoomResponse.md new file mode 100644 index 000000000..49d41cc0a --- /dev/null +++ b/rest/video/v1/docs/ListRoomResponse.md @@ -0,0 +1,12 @@ +# ListRoomResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCompositionHookResponseMeta**](ListCompositionHookResponse_meta.md) | | [optional] +**Rooms** | [**[]VideoV1Room**](video.v1.room.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/UpdateCompositionHookRequest.md b/rest/video/v1/docs/UpdateCompositionHookRequest.md new file mode 100644 index 000000000..b0805507a --- /dev/null +++ b/rest/video/v1/docs/UpdateCompositionHookRequest.md @@ -0,0 +1,20 @@ +# UpdateCompositionHookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AudioSources** | **[]string** | An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. | [optional] +**AudioSourcesExcluded** | **[]string** | An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. | [optional] +**Enabled** | **bool** | Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers. | [optional] +**Format** | **string** | The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. | +**Resolution** | **string** | A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**StatusCallback** | **string** | The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. | [optional] +**Trim** | **bool** | Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] +**VideoLayout** | [**map[string]interface{}**](.md) | A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/UpdateRoomParticipantRequest.md b/rest/video/v1/docs/UpdateRoomParticipantRequest.md new file mode 100644 index 000000000..77ec6687f --- /dev/null +++ b/rest/video/v1/docs/UpdateRoomParticipantRequest.md @@ -0,0 +1,11 @@ +# UpdateRoomParticipantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/UpdateRoomParticipantSubscribeRuleRequest.md b/rest/video/v1/docs/UpdateRoomParticipantSubscribeRuleRequest.md new file mode 100644 index 000000000..f02a14d1e --- /dev/null +++ b/rest/video/v1/docs/UpdateRoomParticipantSubscribeRuleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoomParticipantSubscribeRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rules** | [**map[string]interface{}**](.md) | A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/UpdateRoomRecordingRuleRequest.md b/rest/video/v1/docs/UpdateRoomRecordingRuleRequest.md new file mode 100644 index 000000000..4dc9dee3d --- /dev/null +++ b/rest/video/v1/docs/UpdateRoomRecordingRuleRequest.md @@ -0,0 +1,11 @@ +# UpdateRoomRecordingRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rules** | [**map[string]interface{}**](.md) | A JSON-encoded array of recording rules. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/UpdateRoomRequest.md b/rest/video/v1/docs/UpdateRoomRequest.md new file mode 100644 index 000000000..6648af394 --- /dev/null +++ b/rest/video/v1/docs/UpdateRoomRequest.md @@ -0,0 +1,11 @@ +# UpdateRoomRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | The new status of the resource. Set to `completed` to end the room. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1Composition.md b/rest/video/v1/docs/VideoV1Composition.md new file mode 100644 index 000000000..5f9cb7b0f --- /dev/null +++ b/rest/video/v1/docs/VideoV1Composition.md @@ -0,0 +1,28 @@ +# VideoV1Composition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AudioSources** | **[]string** | | [optional] +**AudioSourcesExcluded** | **[]string** | | [optional] +**Bitrate** | **int32** | | [optional] +**DateCompleted** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateDeleted** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Duration** | **int32** | | [optional] +**Format** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Resolution** | **string** | | [optional] +**RoomSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Size** | **int32** | | [optional] +**Status** | **string** | | [optional] +**Trim** | **bool** | | [optional] +**Url** | **string** | | [optional] +**VideoLayout** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1CompositionHook.md b/rest/video/v1/docs/VideoV1CompositionHook.md new file mode 100644 index 000000000..9d8cbbbcc --- /dev/null +++ b/rest/video/v1/docs/VideoV1CompositionHook.md @@ -0,0 +1,25 @@ +# VideoV1CompositionHook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AudioSources** | **[]string** | | [optional] +**AudioSourcesExcluded** | **[]string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | Pointer to [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**Format** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Resolution** | **string** | | [optional] +**Sid** | **string** | | [optional] +**StatusCallback** | Pointer to **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**Trim** | **bool** | | [optional] +**Url** | **string** | | [optional] +**VideoLayout** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1CompositionSettings.md b/rest/video/v1/docs/VideoV1CompositionSettings.md new file mode 100644 index 000000000..fef12fe91 --- /dev/null +++ b/rest/video/v1/docs/VideoV1CompositionSettings.md @@ -0,0 +1,18 @@ +# VideoV1CompositionSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AwsCredentialsSid** | **string** | | [optional] +**AwsS3Url** | **string** | | [optional] +**AwsStorageEnabled** | **bool** | | [optional] +**EncryptionEnabled** | **bool** | | [optional] +**EncryptionKeySid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1Recording.md b/rest/video/v1/docs/VideoV1Recording.md new file mode 100644 index 000000000..519dc1f69 --- /dev/null +++ b/rest/video/v1/docs/VideoV1Recording.md @@ -0,0 +1,25 @@ +# VideoV1Recording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Codec** | **string** | | [optional] +**ContainerFormat** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**GroupingSids** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Offset** | **int32** | | [optional] +**Sid** | **string** | | [optional] +**Size** | **int32** | | [optional] +**SourceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**TrackName** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RecordingSettings.md b/rest/video/v1/docs/VideoV1RecordingSettings.md new file mode 100644 index 000000000..62ca5dd5c --- /dev/null +++ b/rest/video/v1/docs/VideoV1RecordingSettings.md @@ -0,0 +1,18 @@ +# VideoV1RecordingSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**AwsCredentialsSid** | **string** | | [optional] +**AwsS3Url** | **string** | | [optional] +**AwsStorageEnabled** | **bool** | | [optional] +**EncryptionEnabled** | **bool** | | [optional] +**EncryptionKeySid** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1Room.md b/rest/video/v1/docs/VideoV1Room.md new file mode 100644 index 000000000..65b4b3b9b --- /dev/null +++ b/rest/video/v1/docs/VideoV1Room.md @@ -0,0 +1,29 @@ +# VideoV1Room + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**EnableTurn** | **bool** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**MaxConcurrentPublishedTracks** | Pointer to **int32** | | [optional] +**MaxParticipants** | **int32** | | [optional] +**MediaRegion** | **string** | | [optional] +**RecordParticipantsOnConnect** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**Status** | **string** | | [optional] +**StatusCallback** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**Type** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VideoCodecs** | **[]string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomParticipant.md b/rest/video/v1/docs/VideoV1RoomRoomParticipant.md new file mode 100644 index 000000000..6f80d4250 --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomParticipant.md @@ -0,0 +1,22 @@ +# VideoV1RoomRoomParticipant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**EndTime** | [**time.Time**](time.Time.md) | | [optional] +**Identity** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RoomSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**StartTime** | [**time.Time**](time.Time.md) | | [optional] +**Status** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md new file mode 100644 index 000000000..4a85ef99f --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantPublishedTrack.md @@ -0,0 +1,19 @@ +# VideoV1RoomRoomParticipantRoomParticipantPublishedTrack + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**Kind** | **string** | | [optional] +**Name** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**RoomSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md new file mode 100644 index 000000000..b80d58895 --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribeRule.md @@ -0,0 +1,15 @@ +# VideoV1RoomRoomParticipantRoomParticipantSubscribeRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**ParticipantSid** | **string** | | [optional] +**RoomSid** | **string** | | [optional] +**Rules** | **[]map[string]interface{}** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md new file mode 100644 index 000000000..455855b30 --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack.md @@ -0,0 +1,20 @@ +# VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**Kind** | **string** | | [optional] +**Name** | **string** | | [optional] +**ParticipantSid** | **string** | | [optional] +**PublisherSid** | **string** | | [optional] +**RoomSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomRecording.md b/rest/video/v1/docs/VideoV1RoomRoomRecording.md new file mode 100644 index 000000000..8efe2798c --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomRecording.md @@ -0,0 +1,26 @@ +# VideoV1RoomRoomRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Codec** | **string** | | [optional] +**ContainerFormat** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**Duration** | Pointer to **int32** | | [optional] +**GroupingSids** | [**map[string]interface{}**](.md) | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Offset** | **int32** | | [optional] +**RoomSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Size** | **int32** | | [optional] +**SourceSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**TrackName** | **string** | | [optional] +**Type** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md b/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md new file mode 100644 index 000000000..cb2b69344 --- /dev/null +++ b/rest/video/v1/docs/VideoV1RoomRoomRecordingRule.md @@ -0,0 +1,14 @@ +# VideoV1RoomRoomRecordingRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**RoomSid** | **string** | | [optional] +**Rules** | **[]map[string]interface{}** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/video/v1/model_create_composition_hook_request.go b/rest/video/v1/model_create_composition_hook_request.go new file mode 100644 index 000000000..631ace948 --- /dev/null +++ b/rest/video/v1/model_create_composition_hook_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCompositionHookRequest struct for CreateCompositionHookRequest +type CreateCompositionHookRequest struct { + // An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. + AudioSources []string `json:"AudioSources,omitempty"` + // An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + AudioSourcesExcluded []string `json:"AudioSourcesExcluded,omitempty"` + // Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered. + Enabled bool `json:"Enabled,omitempty"` + // The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. + Format string `json:"Format,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. + FriendlyName string `json:"FriendlyName"` + // A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Resolution string `json:"Resolution,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Trim bool `json:"Trim,omitempty"` + // An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + VideoLayout map[string]interface{} `json:"VideoLayout,omitempty"` +} diff --git a/rest/video/v1/model_create_composition_request.go b/rest/video/v1/model_create_composition_request.go new file mode 100644 index 000000000..786b6c2d1 --- /dev/null +++ b/rest/video/v1/model_create_composition_request.go @@ -0,0 +1,32 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCompositionRequest struct for CreateCompositionRequest +type CreateCompositionRequest struct { + // An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request + AudioSources []string `json:"AudioSources,omitempty"` + // An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + AudioSourcesExcluded []string `json:"AudioSourcesExcluded,omitempty"` + // The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs. + Format string `json:"Format,omitempty"` + // A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Resolution string `json:"Resolution,omitempty"` + // The SID of the Group Room with the media tracks to be used as composition sources. + RoomSid string `json:"RoomSid"` + // The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Trim bool `json:"Trim,omitempty"` + // An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request + VideoLayout map[string]interface{} `json:"VideoLayout,omitempty"` +} diff --git a/rest/video/v1/model_create_composition_settings_request.go b/rest/video/v1/model_create_composition_settings_request.go new file mode 100644 index 000000000..3453bb698 --- /dev/null +++ b/rest/video/v1/model_create_composition_settings_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCompositionSettingsRequest struct for CreateCompositionSettingsRequest +type CreateCompositionSettingsRequest struct { + // The SID of the stored Credential resource. + AwsCredentialsSid string `json:"AwsCredentialsSid,omitempty"` + // The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. + AwsS3Url string `json:"AwsS3Url,omitempty"` + // Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud. + AwsStorageEnabled bool `json:"AwsStorageEnabled,omitempty"` + // Whether all compositions should be stored in an encrypted form. The default is `false`. + EncryptionEnabled bool `json:"EncryptionEnabled,omitempty"` + // The SID of the Public Key resource to use for encryption. + EncryptionKeySid string `json:"EncryptionKeySid,omitempty"` + // A descriptive string that you create to describe the resource and show to the user in the console + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/video/v1/model_create_recording_settings_request.go b/rest/video/v1/model_create_recording_settings_request.go new file mode 100644 index 000000000..d1a587b31 --- /dev/null +++ b/rest/video/v1/model_create_recording_settings_request.go @@ -0,0 +1,26 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRecordingSettingsRequest struct for CreateRecordingSettingsRequest +type CreateRecordingSettingsRequest struct { + // The SID of the stored Credential resource. + AwsCredentialsSid string `json:"AwsCredentialsSid,omitempty"` + // The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986. + AwsS3Url string `json:"AwsS3Url,omitempty"` + // Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud. + AwsStorageEnabled bool `json:"AwsStorageEnabled,omitempty"` + // Whether all recordings should be stored in an encrypted form. The default is `false`. + EncryptionEnabled bool `json:"EncryptionEnabled,omitempty"` + // The SID of the Public Key resource to use for encryption. + EncryptionKeySid string `json:"EncryptionKeySid,omitempty"` + // A descriptive string that you create to describe the resource and be shown to users in the console + FriendlyName string `json:"FriendlyName"` +} diff --git a/rest/video/v1/model_create_room_request.go b/rest/video/v1/model_create_room_request.go new file mode 100644 index 000000000..9c6f68aa2 --- /dev/null +++ b/rest/video/v1/model_create_room_request.go @@ -0,0 +1,32 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRoomRequest struct for CreateRoomRequest +type CreateRoomRequest struct { + // Deprecated, now always considered to be true. + EnableTurn bool `json:"EnableTurn,omitempty"` + // The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants. + MaxParticipants int32 `json:"MaxParticipants,omitempty"` + // The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.*** + MediaRegion string `json:"MediaRegion,omitempty"` + // Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.*** + RecordParticipantsOnConnect bool `json:"RecordParticipantsOnConnect,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The type of room. Can be: `go`, `peer-to-peer`, `group-small`, or `group`. The default value is `group`. + Type string `json:"Type,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`. + UniqueName string `json:"UniqueName,omitempty"` + // An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms*** + VideoCodecs []string `json:"VideoCodecs,omitempty"` +} diff --git a/rest/video/v1/model_list_composition_hook_response.go b/rest/video/v1/model_list_composition_hook_response.go new file mode 100644 index 000000000..8c5bde2ce --- /dev/null +++ b/rest/video/v1/model_list_composition_hook_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCompositionHookResponse struct for ListCompositionHookResponse +type ListCompositionHookResponse struct { + CompositionHooks []VideoV1CompositionHook `json:"CompositionHooks,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/video/v1/model_list_composition_hook_response_meta.go b/rest/video/v1/model_list_composition_hook_response_meta.go new file mode 100644 index 000000000..689f2b66b --- /dev/null +++ b/rest/video/v1/model_list_composition_hook_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCompositionHookResponseMeta struct for ListCompositionHookResponseMeta +type ListCompositionHookResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_list_composition_response.go b/rest/video/v1/model_list_composition_response.go new file mode 100644 index 000000000..f10812772 --- /dev/null +++ b/rest/video/v1/model_list_composition_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCompositionResponse struct for ListCompositionResponse +type ListCompositionResponse struct { + Compositions []VideoV1Composition `json:"Compositions,omitempty"` + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/video/v1/model_list_recording_response.go b/rest/video/v1/model_list_recording_response.go new file mode 100644 index 000000000..5fc13b8ff --- /dev/null +++ b/rest/video/v1/model_list_recording_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRecordingResponse struct for ListRecordingResponse +type ListRecordingResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1Recording `json:"Recordings,omitempty"` +} diff --git a/rest/video/v1/model_list_room_participant_published_track_response.go b/rest/video/v1/model_list_room_participant_published_track_response.go new file mode 100644 index 000000000..74cdee30f --- /dev/null +++ b/rest/video/v1/model_list_room_participant_published_track_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoomParticipantPublishedTrackResponse struct for ListRoomParticipantPublishedTrackResponse +type ListRoomParticipantPublishedTrackResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + PublishedTracks []VideoV1RoomRoomParticipantRoomParticipantPublishedTrack `json:"PublishedTracks,omitempty"` +} diff --git a/rest/video/v1/model_list_room_participant_response.go b/rest/video/v1/model_list_room_participant_response.go new file mode 100644 index 000000000..6c6c4a52c --- /dev/null +++ b/rest/video/v1/model_list_room_participant_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoomParticipantResponse struct for ListRoomParticipantResponse +type ListRoomParticipantResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Participants []VideoV1RoomRoomParticipant `json:"Participants,omitempty"` +} diff --git a/rest/video/v1/model_list_room_participant_subscribed_track_response.go b/rest/video/v1/model_list_room_participant_subscribed_track_response.go new file mode 100644 index 000000000..991edfa23 --- /dev/null +++ b/rest/video/v1/model_list_room_participant_subscribed_track_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoomParticipantSubscribedTrackResponse struct for ListRoomParticipantSubscribedTrackResponse +type ListRoomParticipantSubscribedTrackResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + SubscribedTracks []VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack `json:"SubscribedTracks,omitempty"` +} diff --git a/rest/video/v1/model_list_room_recording_response.go b/rest/video/v1/model_list_room_recording_response.go new file mode 100644 index 000000000..d23a53be3 --- /dev/null +++ b/rest/video/v1/model_list_room_recording_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoomRecordingResponse struct for ListRoomRecordingResponse +type ListRoomRecordingResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Recordings []VideoV1RoomRoomRecording `json:"Recordings,omitempty"` +} diff --git a/rest/video/v1/model_list_room_response.go b/rest/video/v1/model_list_room_response.go new file mode 100644 index 000000000..fdcc8f80f --- /dev/null +++ b/rest/video/v1/model_list_room_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRoomResponse struct for ListRoomResponse +type ListRoomResponse struct { + Meta ListCompositionHookResponseMeta `json:"Meta,omitempty"` + Rooms []VideoV1Room `json:"Rooms,omitempty"` +} diff --git a/rest/video/v1/model_update_composition_hook_request.go b/rest/video/v1/model_update_composition_hook_request.go new file mode 100644 index 000000000..1d50eec56 --- /dev/null +++ b/rest/video/v1/model_update_composition_hook_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateCompositionHookRequest struct for UpdateCompositionHookRequest +type UpdateCompositionHookRequest struct { + // An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`. + AudioSources []string `json:"AudioSources,omitempty"` + // An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty. + AudioSourcesExcluded []string `json:"AudioSourcesExcluded,omitempty"` + // Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers. + Enabled bool `json:"Enabled,omitempty"` + // The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs. + Format string `json:"Format,omitempty"` + // A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account. + FriendlyName string `json:"FriendlyName"` + // A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Resolution string `json:"Resolution,omitempty"` + // The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched. + StatusCallback string `json:"StatusCallback,omitempty"` + // The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + Trim bool `json:"Trim,omitempty"` + // A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. + VideoLayout map[string]interface{} `json:"VideoLayout,omitempty"` +} diff --git a/rest/video/v1/model_update_room_participant_request.go b/rest/video/v1/model_update_room_participant_request.go new file mode 100644 index 000000000..3b13feea2 --- /dev/null +++ b/rest/video/v1/model_update_room_participant_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoomParticipantRequest struct for UpdateRoomParticipantRequest +type UpdateRoomParticipantRequest struct { + // The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned. + Status string `json:"Status,omitempty"` +} diff --git a/rest/video/v1/model_update_room_participant_subscribe_rule_request.go b/rest/video/v1/model_update_room_participant_subscribe_rule_request.go new file mode 100644 index 000000000..30b5715ed --- /dev/null +++ b/rest/video/v1/model_update_room_participant_subscribe_rule_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoomParticipantSubscribeRuleRequest struct for UpdateRoomParticipantSubscribeRuleRequest +type UpdateRoomParticipantSubscribeRuleRequest struct { + // A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information. + Rules map[string]interface{} `json:"Rules,omitempty"` +} diff --git a/rest/video/v1/model_update_room_recording_rule_request.go b/rest/video/v1/model_update_room_recording_rule_request.go new file mode 100644 index 000000000..ef1d2fbc5 --- /dev/null +++ b/rest/video/v1/model_update_room_recording_rule_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoomRecordingRuleRequest struct for UpdateRoomRecordingRuleRequest +type UpdateRoomRecordingRuleRequest struct { + // A JSON-encoded array of recording rules. + Rules map[string]interface{} `json:"Rules,omitempty"` +} diff --git a/rest/video/v1/model_update_room_request.go b/rest/video/v1/model_update_room_request.go new file mode 100644 index 000000000..609c98c85 --- /dev/null +++ b/rest/video/v1/model_update_room_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRoomRequest struct for UpdateRoomRequest +type UpdateRoomRequest struct { + // The new status of the resource. Set to `completed` to end the room. + Status string `json:"Status"` +} diff --git a/rest/video/v1/model_video_v1_composition.go b/rest/video/v1/model_video_v1_composition.go new file mode 100644 index 000000000..69bec325f --- /dev/null +++ b/rest/video/v1/model_video_v1_composition.go @@ -0,0 +1,35 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1Composition struct for VideoV1Composition +type VideoV1Composition struct { + AccountSid string `json:"AccountSid,omitempty"` + AudioSources []string `json:"AudioSources,omitempty"` + AudioSourcesExcluded []string `json:"AudioSourcesExcluded,omitempty"` + Bitrate int32 `json:"Bitrate,omitempty"` + DateCompleted *time.Time `json:"DateCompleted,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateDeleted *time.Time `json:"DateDeleted,omitempty"` + Duration int32 `json:"Duration,omitempty"` + Format string `json:"Format,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Resolution string `json:"Resolution,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Size int32 `json:"Size,omitempty"` + Status string `json:"Status,omitempty"` + Trim bool `json:"Trim,omitempty"` + Url string `json:"Url,omitempty"` + VideoLayout map[string]interface{} `json:"VideoLayout,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_composition_hook.go b/rest/video/v1/model_video_v1_composition_hook.go new file mode 100644 index 000000000..2121d6ea7 --- /dev/null +++ b/rest/video/v1/model_video_v1_composition_hook.go @@ -0,0 +1,32 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1CompositionHook struct for VideoV1CompositionHook +type VideoV1CompositionHook struct { + AccountSid string `json:"AccountSid,omitempty"` + AudioSources []string `json:"AudioSources,omitempty"` + AudioSourcesExcluded []string `json:"AudioSourcesExcluded,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated *time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + Format string `json:"Format,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Resolution string `json:"Resolution,omitempty"` + Sid string `json:"Sid,omitempty"` + StatusCallback *string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + Trim bool `json:"Trim,omitempty"` + Url string `json:"Url,omitempty"` + VideoLayout map[string]interface{} `json:"VideoLayout,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_composition_settings.go b/rest/video/v1/model_video_v1_composition_settings.go new file mode 100644 index 000000000..549f8fd0d --- /dev/null +++ b/rest/video/v1/model_video_v1_composition_settings.go @@ -0,0 +1,22 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VideoV1CompositionSettings struct for VideoV1CompositionSettings +type VideoV1CompositionSettings struct { + AccountSid string `json:"AccountSid,omitempty"` + AwsCredentialsSid string `json:"AwsCredentialsSid,omitempty"` + AwsS3Url string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid string `json:"EncryptionKeySid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_recording.go b/rest/video/v1/model_video_v1_recording.go new file mode 100644 index 000000000..015070a0d --- /dev/null +++ b/rest/video/v1/model_video_v1_recording.go @@ -0,0 +1,32 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1Recording struct for VideoV1Recording +type VideoV1Recording struct { + AccountSid string `json:"AccountSid,omitempty"` + Codec string `json:"Codec,omitempty"` + ContainerFormat string `json:"ContainerFormat,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + GroupingSids map[string]interface{} `json:"GroupingSids,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Offset int32 `json:"Offset,omitempty"` + Sid string `json:"Sid,omitempty"` + Size int32 `json:"Size,omitempty"` + SourceSid string `json:"SourceSid,omitempty"` + Status string `json:"Status,omitempty"` + TrackName string `json:"TrackName,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_recording_settings.go b/rest/video/v1/model_video_v1_recording_settings.go new file mode 100644 index 000000000..f2323e1cd --- /dev/null +++ b/rest/video/v1/model_video_v1_recording_settings.go @@ -0,0 +1,22 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VideoV1RecordingSettings struct for VideoV1RecordingSettings +type VideoV1RecordingSettings struct { + AccountSid string `json:"AccountSid,omitempty"` + AwsCredentialsSid string `json:"AwsCredentialsSid,omitempty"` + AwsS3Url string `json:"AwsS3Url,omitempty"` + AwsStorageEnabled bool `json:"AwsStorageEnabled,omitempty"` + EncryptionEnabled bool `json:"EncryptionEnabled,omitempty"` + EncryptionKeySid string `json:"EncryptionKeySid,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room.go b/rest/video/v1/model_video_v1_room.go new file mode 100644 index 000000000..5bba325ca --- /dev/null +++ b/rest/video/v1/model_video_v1_room.go @@ -0,0 +1,36 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1Room struct for VideoV1Room +type VideoV1Room struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + EnableTurn bool `json:"EnableTurn,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + MaxConcurrentPublishedTracks *int32 `json:"MaxConcurrentPublishedTracks,omitempty"` + MaxParticipants int32 `json:"MaxParticipants,omitempty"` + MediaRegion string `json:"MediaRegion,omitempty"` + RecordParticipantsOnConnect bool `json:"RecordParticipantsOnConnect,omitempty"` + Sid string `json:"Sid,omitempty"` + Status string `json:"Status,omitempty"` + StatusCallback string `json:"StatusCallback,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + Type string `json:"Type,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VideoCodecs []string `json:"VideoCodecs,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_participant.go b/rest/video/v1/model_video_v1_room_room_participant.go new file mode 100644 index 000000000..b83793989 --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_participant.go @@ -0,0 +1,29 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomParticipant struct for VideoV1RoomRoomParticipant +type VideoV1RoomRoomParticipant struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + EndTime time.Time `json:"EndTime,omitempty"` + Identity string `json:"Identity,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Sid string `json:"Sid,omitempty"` + StartTime time.Time `json:"StartTime,omitempty"` + Status string `json:"Status,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go b/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go new file mode 100644 index 000000000..3577bcc63 --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_participant_room_participant_published_track.go @@ -0,0 +1,26 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct for VideoV1RoomRoomParticipantRoomParticipantPublishedTrack +type VideoV1RoomRoomParticipantRoomParticipantPublishedTrack struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + Kind string `json:"Kind,omitempty"` + Name string `json:"Name,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go b/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go new file mode 100644 index 000000000..ef58434bf --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribe_rule.go @@ -0,0 +1,22 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct for VideoV1RoomRoomParticipantRoomParticipantSubscribeRule +type VideoV1RoomRoomParticipantRoomParticipantSubscribeRule struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Rules []map[string]interface{} `json:"Rules,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go b/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go new file mode 100644 index 000000000..f24e915e6 --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_participant_room_participant_subscribed_track.go @@ -0,0 +1,27 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct for VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack +type VideoV1RoomRoomParticipantRoomParticipantSubscribedTrack struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + Kind string `json:"Kind,omitempty"` + Name string `json:"Name,omitempty"` + ParticipantSid string `json:"ParticipantSid,omitempty"` + PublisherSid string `json:"PublisherSid,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_recording.go b/rest/video/v1/model_video_v1_room_room_recording.go new file mode 100644 index 000000000..9efb9b1e5 --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_recording.go @@ -0,0 +1,33 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomRecording struct for VideoV1RoomRoomRecording +type VideoV1RoomRoomRecording struct { + AccountSid string `json:"AccountSid,omitempty"` + Codec string `json:"Codec,omitempty"` + ContainerFormat string `json:"ContainerFormat,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + Duration *int32 `json:"Duration,omitempty"` + GroupingSids map[string]interface{} `json:"GroupingSids,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Offset int32 `json:"Offset,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Sid string `json:"Sid,omitempty"` + Size int32 `json:"Size,omitempty"` + SourceSid string `json:"SourceSid,omitempty"` + Status string `json:"Status,omitempty"` + TrackName string `json:"TrackName,omitempty"` + Type string `json:"Type,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/video/v1/model_video_v1_room_room_recording_rule.go b/rest/video/v1/model_video_v1_room_room_recording_rule.go new file mode 100644 index 000000000..2458815a4 --- /dev/null +++ b/rest/video/v1/model_video_v1_room_room_recording_rule.go @@ -0,0 +1,21 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VideoV1RoomRoomRecordingRule struct for VideoV1RoomRoomRecordingRule +type VideoV1RoomRoomRecordingRule struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + RoomSid string `json:"RoomSid,omitempty"` + Rules []map[string]interface{} `json:"Rules,omitempty"` +} diff --git a/rest/video/v1/response.go b/rest/video/v1/response.go new file mode 100644 index 000000000..a0ec7b50c --- /dev/null +++ b/rest/video/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Video + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/voice/v1/.openapi-generator-ignore b/rest/voice/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/voice/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/voice/v1/README.md b/rest/voice/v1/README.md new file mode 100644 index 000000000..eb2c9fcb2 --- /dev/null +++ b/rest/voice/v1/README.md @@ -0,0 +1,123 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateByocTrunk**](docs/DefaultApi.md#createbyoctrunk) | **Post** /v1/ByocTrunks | +*DefaultApi* | [**CreateConnectionPolicy**](docs/DefaultApi.md#createconnectionpolicy) | **Post** /v1/ConnectionPolicies | +*DefaultApi* | [**CreateConnectionPolicyTarget**](docs/DefaultApi.md#createconnectionpolicytarget) | **Post** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets | +*DefaultApi* | [**CreateDialingPermissionsCountryBulkUpdate**](docs/DefaultApi.md#createdialingpermissionscountrybulkupdate) | **Post** /v1/DialingPermissions/BulkCountryUpdates | +*DefaultApi* | [**CreateIpRecord**](docs/DefaultApi.md#createiprecord) | **Post** /v1/IpRecords | +*DefaultApi* | [**CreateSourceIpMapping**](docs/DefaultApi.md#createsourceipmapping) | **Post** /v1/SourceIpMappings | +*DefaultApi* | [**DeleteByocTrunk**](docs/DefaultApi.md#deletebyoctrunk) | **Delete** /v1/ByocTrunks/{Sid} | +*DefaultApi* | [**DeleteConnectionPolicy**](docs/DefaultApi.md#deleteconnectionpolicy) | **Delete** /v1/ConnectionPolicies/{Sid} | +*DefaultApi* | [**DeleteConnectionPolicyTarget**](docs/DefaultApi.md#deleteconnectionpolicytarget) | **Delete** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +*DefaultApi* | [**DeleteIpRecord**](docs/DefaultApi.md#deleteiprecord) | **Delete** /v1/IpRecords/{Sid} | +*DefaultApi* | [**DeleteSourceIpMapping**](docs/DefaultApi.md#deletesourceipmapping) | **Delete** /v1/SourceIpMappings/{Sid} | +*DefaultApi* | [**FetchByocTrunk**](docs/DefaultApi.md#fetchbyoctrunk) | **Get** /v1/ByocTrunks/{Sid} | +*DefaultApi* | [**FetchConnectionPolicy**](docs/DefaultApi.md#fetchconnectionpolicy) | **Get** /v1/ConnectionPolicies/{Sid} | +*DefaultApi* | [**FetchConnectionPolicyTarget**](docs/DefaultApi.md#fetchconnectionpolicytarget) | **Get** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +*DefaultApi* | [**FetchDialingPermissionsCountry**](docs/DefaultApi.md#fetchdialingpermissionscountry) | **Get** /v1/DialingPermissions/Countries/{IsoCode} | +*DefaultApi* | [**FetchDialingPermissionsSettings**](docs/DefaultApi.md#fetchdialingpermissionssettings) | **Get** /v1/Settings | +*DefaultApi* | [**FetchIpRecord**](docs/DefaultApi.md#fetchiprecord) | **Get** /v1/IpRecords/{Sid} | +*DefaultApi* | [**FetchSourceIpMapping**](docs/DefaultApi.md#fetchsourceipmapping) | **Get** /v1/SourceIpMappings/{Sid} | +*DefaultApi* | [**ListByocTrunk**](docs/DefaultApi.md#listbyoctrunk) | **Get** /v1/ByocTrunks | +*DefaultApi* | [**ListConnectionPolicy**](docs/DefaultApi.md#listconnectionpolicy) | **Get** /v1/ConnectionPolicies | +*DefaultApi* | [**ListConnectionPolicyTarget**](docs/DefaultApi.md#listconnectionpolicytarget) | **Get** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets | +*DefaultApi* | [**ListDialingPermissionsCountry**](docs/DefaultApi.md#listdialingpermissionscountry) | **Get** /v1/DialingPermissions/Countries | +*DefaultApi* | [**ListDialingPermissionsHrsPrefixes**](docs/DefaultApi.md#listdialingpermissionshrsprefixes) | **Get** /v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes | +*DefaultApi* | [**ListIpRecord**](docs/DefaultApi.md#listiprecord) | **Get** /v1/IpRecords | +*DefaultApi* | [**ListSourceIpMapping**](docs/DefaultApi.md#listsourceipmapping) | **Get** /v1/SourceIpMappings | +*DefaultApi* | [**UpdateByocTrunk**](docs/DefaultApi.md#updatebyoctrunk) | **Post** /v1/ByocTrunks/{Sid} | +*DefaultApi* | [**UpdateConnectionPolicy**](docs/DefaultApi.md#updateconnectionpolicy) | **Post** /v1/ConnectionPolicies/{Sid} | +*DefaultApi* | [**UpdateConnectionPolicyTarget**](docs/DefaultApi.md#updateconnectionpolicytarget) | **Post** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +*DefaultApi* | [**UpdateDialingPermissionsSettings**](docs/DefaultApi.md#updatedialingpermissionssettings) | **Post** /v1/Settings | +*DefaultApi* | [**UpdateIpRecord**](docs/DefaultApi.md#updateiprecord) | **Post** /v1/IpRecords/{Sid} | +*DefaultApi* | [**UpdateSourceIpMapping**](docs/DefaultApi.md#updatesourceipmapping) | **Post** /v1/SourceIpMappings/{Sid} | + + +## Documentation For Models + + - [CreateByocTrunkRequest](docs/CreateByocTrunkRequest.md) + - [CreateConnectionPolicyRequest](docs/CreateConnectionPolicyRequest.md) + - [CreateConnectionPolicyTargetRequest](docs/CreateConnectionPolicyTargetRequest.md) + - [CreateDialingPermissionsCountryBulkUpdateRequest](docs/CreateDialingPermissionsCountryBulkUpdateRequest.md) + - [CreateIpRecordRequest](docs/CreateIpRecordRequest.md) + - [CreateSourceIpMappingRequest](docs/CreateSourceIpMappingRequest.md) + - [ListByocTrunkResponse](docs/ListByocTrunkResponse.md) + - [ListByocTrunkResponseMeta](docs/ListByocTrunkResponseMeta.md) + - [ListConnectionPolicyResponse](docs/ListConnectionPolicyResponse.md) + - [ListConnectionPolicyTargetResponse](docs/ListConnectionPolicyTargetResponse.md) + - [ListDialingPermissionsCountryResponse](docs/ListDialingPermissionsCountryResponse.md) + - [ListDialingPermissionsHrsPrefixesResponse](docs/ListDialingPermissionsHrsPrefixesResponse.md) + - [ListIpRecordResponse](docs/ListIpRecordResponse.md) + - [ListSourceIpMappingResponse](docs/ListSourceIpMappingResponse.md) + - [UpdateByocTrunkRequest](docs/UpdateByocTrunkRequest.md) + - [UpdateConnectionPolicyRequest](docs/UpdateConnectionPolicyRequest.md) + - [UpdateConnectionPolicyTargetRequest](docs/UpdateConnectionPolicyTargetRequest.md) + - [UpdateDialingPermissionsSettingsRequest](docs/UpdateDialingPermissionsSettingsRequest.md) + - [UpdateIpRecordRequest](docs/UpdateIpRecordRequest.md) + - [UpdateSourceIpMappingRequest](docs/UpdateSourceIpMappingRequest.md) + - [VoiceV1ByocTrunk](docs/VoiceV1ByocTrunk.md) + - [VoiceV1ConnectionPolicy](docs/VoiceV1ConnectionPolicy.md) + - [VoiceV1ConnectionPolicyConnectionPolicyTarget](docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md) + - [VoiceV1DialingPermissionsDialingPermissionsCountry](docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md) + - [VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate](docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md) + - [VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes](docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md) + - [VoiceV1DialingPermissionsDialingPermissionsCountryInstance](docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md) + - [VoiceV1DialingPermissionsDialingPermissionsSettings](docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md) + - [VoiceV1IpRecord](docs/VoiceV1IpRecord.md) + - [VoiceV1SourceIpMapping](docs/VoiceV1SourceIpMapping.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/voice/v1/api_default.go b/rest/voice/v1/api_default.go new file mode 100644 index 000000000..df1efdceb --- /dev/null +++ b/rest/voice/v1/api_default.go @@ -0,0 +1,1265 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://voice.twilio.com"), + } +} +// CreateByocTrunkParams Optional parameters for the method 'CreateByocTrunk' +type CreateByocTrunkParams struct { + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +CreateByocTrunk Method for CreateByocTrunk + * @param optional nil or *CreateByocTrunkOpts - Optional Parameters: + * @param "CnamLookupEnabled" (bool) - Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + * @param "ConnectionPolicySid" (string) - The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "FromDomainSid" (string) - The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. + * @param "StatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. +@return VoiceV1ByocTrunk +*/ +func (c *DefaultApiService) CreateByocTrunk(params *CreateByocTrunkParams) (*VoiceV1ByocTrunk, error) { + path := "/v1/ByocTrunks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateConnectionPolicyParams Optional parameters for the method 'CreateConnectionPolicy' +type CreateConnectionPolicyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +CreateConnectionPolicy Method for CreateConnectionPolicy + * @param optional nil or *CreateConnectionPolicyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. +@return VoiceV1ConnectionPolicy +*/ +func (c *DefaultApiService) CreateConnectionPolicy(params *CreateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { + path := "/v1/ConnectionPolicies" + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateConnectionPolicyTargetParams Optional parameters for the method 'CreateConnectionPolicyTarget' +type CreateConnectionPolicyTargetParams struct { + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` +} + +/* +CreateConnectionPolicyTarget Method for CreateConnectionPolicyTarget + * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. + * @param optional nil or *CreateConnectionPolicyTargetOpts - Optional Parameters: + * @param "Enabled" (bool) - Whether the Target is enabled. The default is `true`. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "Priority" (int32) - The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. + * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. + * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. +@return VoiceV1ConnectionPolicyConnectionPolicyTarget +*/ +func (c *DefaultApiService) CreateConnectionPolicyTarget(ConnectionPolicySid string, params *CreateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateDialingPermissionsCountryBulkUpdateParams Optional parameters for the method 'CreateDialingPermissionsCountryBulkUpdate' +type CreateDialingPermissionsCountryBulkUpdateParams struct { + UpdateRequest *string `json:"UpdateRequest,omitempty"` +} + +/* +CreateDialingPermissionsCountryBulkUpdate Method for CreateDialingPermissionsCountryBulkUpdate +Create a bulk update request to change voice dialing country permissions of one or more countries identified by the corresponding [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + * @param optional nil or *CreateDialingPermissionsCountryBulkUpdateOpts - Optional Parameters: + * @param "UpdateRequest" (string) - URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]` +@return VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate +*/ +func (c *DefaultApiService) CreateDialingPermissionsCountryBulkUpdate(params *CreateDialingPermissionsCountryBulkUpdateParams) (*VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate, error) { + path := "/v1/DialingPermissions/BulkCountryUpdates" + + + data := url.Values{} + headers := 0 + + if params != nil && params.UpdateRequest != nil { + data.Set("UpdateRequest", *params.UpdateRequest) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateIpRecordParams Optional parameters for the method 'CreateIpRecord' +type CreateIpRecordParams struct { + CidrPrefixLength *int32 `json:"CidrPrefixLength,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + IpAddress *string `json:"IpAddress,omitempty"` +} + +/* +CreateIpRecord Method for CreateIpRecord + * @param optional nil or *CreateIpRecordOpts - Optional Parameters: + * @param "CidrPrefixLength" (int32) - An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "IpAddress" (string) - An IP address in dotted decimal notation, IPv4 only. +@return VoiceV1IpRecord +*/ +func (c *DefaultApiService) CreateIpRecord(params *CreateIpRecordParams) (*VoiceV1IpRecord, error) { + path := "/v1/IpRecords" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CidrPrefixLength != nil { + data.Set("CidrPrefixLength", fmt.Sprint(*params.CidrPrefixLength)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.IpAddress != nil { + data.Set("IpAddress", *params.IpAddress) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateSourceIpMappingParams Optional parameters for the method 'CreateSourceIpMapping' +type CreateSourceIpMappingParams struct { + IpRecordSid *string `json:"IpRecordSid,omitempty"` + SipDomainSid *string `json:"SipDomainSid,omitempty"` +} + +/* +CreateSourceIpMapping Method for CreateSourceIpMapping + * @param optional nil or *CreateSourceIpMappingOpts - Optional Parameters: + * @param "IpRecordSid" (string) - The Twilio-provided string that uniquely identifies the IP Record resource to map from. + * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. +@return VoiceV1SourceIpMapping +*/ +func (c *DefaultApiService) CreateSourceIpMapping(params *CreateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { + path := "/v1/SourceIpMappings" + + + data := url.Values{} + headers := 0 + + if params != nil && params.IpRecordSid != nil { + data.Set("IpRecordSid", *params.IpRecordSid) + } + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteByocTrunk Method for DeleteByocTrunk + * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete. +*/ +func (c *DefaultApiService) DeleteByocTrunk(Sid string) (error) { + path := "/v1/ByocTrunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteConnectionPolicy Method for DeleteConnectionPolicy + * @param Sid The unique string that we created to identify the Connection Policy resource to delete. +*/ +func (c *DefaultApiService) DeleteConnectionPolicy(Sid string) (error) { + path := "/v1/ConnectionPolicies/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteConnectionPolicyTarget Method for DeleteConnectionPolicyTarget + * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. + * @param Sid The unique string that we created to identify the Target resource to delete. +*/ +func (c *DefaultApiService) DeleteConnectionPolicyTarget(ConnectionPolicySid string, Sid string) (error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteIpRecord Method for DeleteIpRecord + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. +*/ +func (c *DefaultApiService) DeleteIpRecord(Sid string) (error) { + path := "/v1/IpRecords/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSourceIpMapping Method for DeleteSourceIpMapping + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to delete. +*/ +func (c *DefaultApiService) DeleteSourceIpMapping(Sid string) (error) { + path := "/v1/SourceIpMappings/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchByocTrunk Method for FetchByocTrunk + * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch. +@return VoiceV1ByocTrunk +*/ +func (c *DefaultApiService) FetchByocTrunk(Sid string) (*VoiceV1ByocTrunk, error) { + path := "/v1/ByocTrunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConnectionPolicy Method for FetchConnectionPolicy + * @param Sid The unique string that we created to identify the Connection Policy resource to fetch. +@return VoiceV1ConnectionPolicy +*/ +func (c *DefaultApiService) FetchConnectionPolicy(Sid string) (*VoiceV1ConnectionPolicy, error) { + path := "/v1/ConnectionPolicies/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchConnectionPolicyTarget Method for FetchConnectionPolicyTarget + * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. + * @param Sid The unique string that we created to identify the Target resource to fetch. +@return VoiceV1ConnectionPolicyConnectionPolicyTarget +*/ +func (c *DefaultApiService) FetchConnectionPolicyTarget(ConnectionPolicySid string, Sid string) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDialingPermissionsCountry Method for FetchDialingPermissionsCountry +Retrieve voice dialing country permissions identified by the given ISO country code + * @param IsoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch +@return VoiceV1DialingPermissionsDialingPermissionsCountryInstance +*/ +func (c *DefaultApiService) FetchDialingPermissionsCountry(IsoCode string) (*VoiceV1DialingPermissionsDialingPermissionsCountryInstance, error) { + path := "/v1/DialingPermissions/Countries/{IsoCode}" + path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsCountryInstance{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchDialingPermissionsSettings Method for FetchDialingPermissionsSettings +Retrieve voice dialing permissions inheritance for the sub-account +@return VoiceV1DialingPermissionsDialingPermissionsSettings +*/ +func (c *DefaultApiService) FetchDialingPermissionsSettings() (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { + path := "/v1/Settings" + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchIpRecord Method for FetchIpRecord + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. +@return VoiceV1IpRecord +*/ +func (c *DefaultApiService) FetchIpRecord(Sid string) (*VoiceV1IpRecord, error) { + path := "/v1/IpRecords/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSourceIpMapping Method for FetchSourceIpMapping + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to fetch. +@return VoiceV1SourceIpMapping +*/ +func (c *DefaultApiService) FetchSourceIpMapping(Sid string) (*VoiceV1SourceIpMapping, error) { + path := "/v1/SourceIpMappings/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListByocTrunkParams Optional parameters for the method 'ListByocTrunk' +type ListByocTrunkParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListByocTrunk Method for ListByocTrunk + * @param optional nil or *ListByocTrunkOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListByocTrunkResponse +*/ +func (c *DefaultApiService) ListByocTrunk(params *ListByocTrunkParams) (*ListByocTrunkResponse, error) { + path := "/v1/ByocTrunks" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListByocTrunkResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConnectionPolicyParams Optional parameters for the method 'ListConnectionPolicy' +type ListConnectionPolicyParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConnectionPolicy Method for ListConnectionPolicy + * @param optional nil or *ListConnectionPolicyOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConnectionPolicyResponse +*/ +func (c *DefaultApiService) ListConnectionPolicy(params *ListConnectionPolicyParams) (*ListConnectionPolicyResponse, error) { + path := "/v1/ConnectionPolicies" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConnectionPolicyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListConnectionPolicyTargetParams Optional parameters for the method 'ListConnectionPolicyTarget' +type ListConnectionPolicyTargetParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListConnectionPolicyTarget Method for ListConnectionPolicyTarget + * @param ConnectionPolicySid The SID of the Connection Policy from which to read the Targets. + * @param optional nil or *ListConnectionPolicyTargetOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListConnectionPolicyTargetResponse +*/ +func (c *DefaultApiService) ListConnectionPolicyTarget(ConnectionPolicySid string, params *ListConnectionPolicyTargetParams) (*ListConnectionPolicyTargetResponse, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets" + path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListConnectionPolicyTargetResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDialingPermissionsCountryParams Optional parameters for the method 'ListDialingPermissionsCountry' +type ListDialingPermissionsCountryParams struct { + IsoCode *string `json:"IsoCode,omitempty"` + Continent *string `json:"Continent,omitempty"` + CountryCode *string `json:"CountryCode,omitempty"` + LowRiskNumbersEnabled *bool `json:"LowRiskNumbersEnabled,omitempty"` + HighRiskSpecialNumbersEnabled *bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + HighRiskTollfraudNumbersEnabled *bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDialingPermissionsCountry Method for ListDialingPermissionsCountry +Retrieve all voice dialing country permissions for this account + * @param optional nil or *ListDialingPermissionsCountryOpts - Optional Parameters: + * @param "IsoCode" (string) - Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + * @param "Continent" (string) - Filter to retrieve the country permissions by specifying the continent + * @param "CountryCode" (string) - Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html) + * @param "LowRiskNumbersEnabled" (bool) - Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`. + * @param "HighRiskSpecialNumbersEnabled" (bool) - Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` + * @param "HighRiskTollfraudNumbersEnabled" (bool) - Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDialingPermissionsCountryResponse +*/ +func (c *DefaultApiService) ListDialingPermissionsCountry(params *ListDialingPermissionsCountryParams) (*ListDialingPermissionsCountryResponse, error) { + path := "/v1/DialingPermissions/Countries" + + + data := url.Values{} + headers := 0 + + if params != nil && params.IsoCode != nil { + data.Set("IsoCode", *params.IsoCode) + } + if params != nil && params.Continent != nil { + data.Set("Continent", *params.Continent) + } + if params != nil && params.CountryCode != nil { + data.Set("CountryCode", *params.CountryCode) + } + if params != nil && params.LowRiskNumbersEnabled != nil { + data.Set("LowRiskNumbersEnabled", fmt.Sprint(*params.LowRiskNumbersEnabled)) + } + if params != nil && params.HighRiskSpecialNumbersEnabled != nil { + data.Set("HighRiskSpecialNumbersEnabled", fmt.Sprint(*params.HighRiskSpecialNumbersEnabled)) + } + if params != nil && params.HighRiskTollfraudNumbersEnabled != nil { + data.Set("HighRiskTollfraudNumbersEnabled", fmt.Sprint(*params.HighRiskTollfraudNumbersEnabled)) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDialingPermissionsCountryResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDialingPermissionsHrsPrefixesParams Optional parameters for the method 'ListDialingPermissionsHrsPrefixes' +type ListDialingPermissionsHrsPrefixesParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDialingPermissionsHrsPrefixes Method for ListDialingPermissionsHrsPrefixes +Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + * @param IsoCode The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched + * @param optional nil or *ListDialingPermissionsHrsPrefixesOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDialingPermissionsHrsPrefixesResponse +*/ +func (c *DefaultApiService) ListDialingPermissionsHrsPrefixes(IsoCode string, params *ListDialingPermissionsHrsPrefixesParams) (*ListDialingPermissionsHrsPrefixesResponse, error) { + path := "/v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes" + path = strings.Replace(path, "{"+"IsoCode"+"}", IsoCode, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDialingPermissionsHrsPrefixesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListIpRecordParams Optional parameters for the method 'ListIpRecord' +type ListIpRecordParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListIpRecord Method for ListIpRecord + * @param optional nil or *ListIpRecordOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListIpRecordResponse +*/ +func (c *DefaultApiService) ListIpRecord(params *ListIpRecordParams) (*ListIpRecordResponse, error) { + path := "/v1/IpRecords" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListIpRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSourceIpMappingParams Optional parameters for the method 'ListSourceIpMapping' +type ListSourceIpMappingParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSourceIpMapping Method for ListSourceIpMapping + * @param optional nil or *ListSourceIpMappingOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSourceIpMappingResponse +*/ +func (c *DefaultApiService) ListSourceIpMapping(params *ListSourceIpMappingParams) (*ListSourceIpMappingResponse, error) { + path := "/v1/SourceIpMappings" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSourceIpMappingResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateByocTrunkParams Optional parameters for the method 'UpdateByocTrunk' +type UpdateByocTrunkParams struct { + CnamLookupEnabled *bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid *string `json:"ConnectionPolicySid,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + FromDomainSid *string `json:"FromDomainSid,omitempty"` + StatusCallbackMethod *string `json:"StatusCallbackMethod,omitempty"` + StatusCallbackUrl *string `json:"StatusCallbackUrl,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateByocTrunk Method for UpdateByocTrunk + * @param Sid The Twilio-provided string that uniquely identifies the BYOC Trunk resource to update. + * @param optional nil or *UpdateByocTrunkOpts - Optional Parameters: + * @param "CnamLookupEnabled" (bool) - Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + * @param "ConnectionPolicySid" (string) - The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "FromDomainSid" (string) - The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". + * @param "StatusCallbackMethod" (string) - The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. + * @param "StatusCallbackUrl" (string) - The URL that we should call to pass status parameters (such as call ended) to your application. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + * @param "VoiceMethod" (string) - The HTTP method we should use to call `voice_url` + * @param "VoiceUrl" (string) - The URL we should call when the BYOC Trunk receives a call. +@return VoiceV1ByocTrunk +*/ +func (c *DefaultApiService) UpdateByocTrunk(Sid string, params *UpdateByocTrunkParams) (*VoiceV1ByocTrunk, error) { + path := "/v1/ByocTrunks/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.CnamLookupEnabled != nil { + data.Set("CnamLookupEnabled", fmt.Sprint(*params.CnamLookupEnabled)) + } + if params != nil && params.ConnectionPolicySid != nil { + data.Set("ConnectionPolicySid", *params.ConnectionPolicySid) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.FromDomainSid != nil { + data.Set("FromDomainSid", *params.FromDomainSid) + } + if params != nil && params.StatusCallbackMethod != nil { + data.Set("StatusCallbackMethod", *params.StatusCallbackMethod) + } + if params != nil && params.StatusCallbackUrl != nil { + data.Set("StatusCallbackUrl", *params.StatusCallbackUrl) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ByocTrunk{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConnectionPolicyParams Optional parameters for the method 'UpdateConnectionPolicy' +type UpdateConnectionPolicyParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateConnectionPolicy Method for UpdateConnectionPolicy + * @param Sid The unique string that we created to identify the Connection Policy resource to update. + * @param optional nil or *UpdateConnectionPolicyOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. +@return VoiceV1ConnectionPolicy +*/ +func (c *DefaultApiService) UpdateConnectionPolicy(Sid string, params *UpdateConnectionPolicyParams) (*VoiceV1ConnectionPolicy, error) { + path := "/v1/ConnectionPolicies/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicy{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateConnectionPolicyTargetParams Optional parameters for the method 'UpdateConnectionPolicyTarget' +type UpdateConnectionPolicyTargetParams struct { + Enabled *bool `json:"Enabled,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + Priority *int32 `json:"Priority,omitempty"` + Target *string `json:"Target,omitempty"` + Weight *int32 `json:"Weight,omitempty"` +} + +/* +UpdateConnectionPolicyTarget Method for UpdateConnectionPolicyTarget + * @param ConnectionPolicySid The SID of the Connection Policy that owns the Target. + * @param Sid The unique string that we created to identify the Target resource to update. + * @param optional nil or *UpdateConnectionPolicyTargetOpts - Optional Parameters: + * @param "Enabled" (bool) - Whether the Target is enabled. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + * @param "Priority" (int32) - The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. + * @param "Target" (string) - The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. + * @param "Weight" (int32) - The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. +@return VoiceV1ConnectionPolicyConnectionPolicyTarget +*/ +func (c *DefaultApiService) UpdateConnectionPolicyTarget(ConnectionPolicySid string, Sid string, params *UpdateConnectionPolicyTargetParams) (*VoiceV1ConnectionPolicyConnectionPolicyTarget, error) { + path := "/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}" + path = strings.Replace(path, "{"+"ConnectionPolicySid"+"}", ConnectionPolicySid, -1) + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.Enabled != nil { + data.Set("Enabled", fmt.Sprint(*params.Enabled)) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.Priority != nil { + data.Set("Priority", fmt.Sprint(*params.Priority)) + } + if params != nil && params.Target != nil { + data.Set("Target", *params.Target) + } + if params != nil && params.Weight != nil { + data.Set("Weight", fmt.Sprint(*params.Weight)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1ConnectionPolicyConnectionPolicyTarget{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateDialingPermissionsSettingsParams Optional parameters for the method 'UpdateDialingPermissionsSettings' +type UpdateDialingPermissionsSettingsParams struct { + DialingPermissionsInheritance *bool `json:"DialingPermissionsInheritance,omitempty"` +} + +/* +UpdateDialingPermissionsSettings Method for UpdateDialingPermissionsSettings +Update voice dialing permissions inheritance for the sub-account + * @param optional nil or *UpdateDialingPermissionsSettingsOpts - Optional Parameters: + * @param "DialingPermissionsInheritance" (bool) - `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. +@return VoiceV1DialingPermissionsDialingPermissionsSettings +*/ +func (c *DefaultApiService) UpdateDialingPermissionsSettings(params *UpdateDialingPermissionsSettingsParams) (*VoiceV1DialingPermissionsDialingPermissionsSettings, error) { + path := "/v1/Settings" + + + data := url.Values{} + headers := 0 + + if params != nil && params.DialingPermissionsInheritance != nil { + data.Set("DialingPermissionsInheritance", fmt.Sprint(*params.DialingPermissionsInheritance)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1DialingPermissionsDialingPermissionsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateIpRecordParams Optional parameters for the method 'UpdateIpRecord' +type UpdateIpRecordParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` +} + +/* +UpdateIpRecord Method for UpdateIpRecord + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to update. + * @param optional nil or *UpdateIpRecordOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. +@return VoiceV1IpRecord +*/ +func (c *DefaultApiService) UpdateIpRecord(Sid string, params *UpdateIpRecordParams) (*VoiceV1IpRecord, error) { + path := "/v1/IpRecords/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1IpRecord{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSourceIpMappingParams Optional parameters for the method 'UpdateSourceIpMapping' +type UpdateSourceIpMappingParams struct { + SipDomainSid *string `json:"SipDomainSid,omitempty"` +} + +/* +UpdateSourceIpMapping Method for UpdateSourceIpMapping + * @param Sid The Twilio-provided string that uniquely identifies the IP Record resource to update. + * @param optional nil or *UpdateSourceIpMappingOpts - Optional Parameters: + * @param "SipDomainSid" (string) - The SID of the SIP Domain that the IP Record should be mapped to. +@return VoiceV1SourceIpMapping +*/ +func (c *DefaultApiService) UpdateSourceIpMapping(Sid string, params *UpdateSourceIpMappingParams) (*VoiceV1SourceIpMapping, error) { + path := "/v1/SourceIpMappings/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.SipDomainSid != nil { + data.Set("SipDomainSid", *params.SipDomainSid) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &VoiceV1SourceIpMapping{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/voice/v1/docs/CreateByocTrunkRequest.md b/rest/voice/v1/docs/CreateByocTrunkRequest.md new file mode 100644 index 000000000..62b7cd92b --- /dev/null +++ b/rest/voice/v1/docs/CreateByocTrunkRequest.md @@ -0,0 +1,20 @@ +# CreateByocTrunkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | [optional] +**ConnectionPolicySid** | **string** | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**FromDomainSid** | **string** | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \"call back\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \"sip.twilio.com\". | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. | [optional] +**StatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | [optional] +**VoiceUrl** | **string** | The URL we should call when the BYOC Trunk receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/CreateConnectionPolicyRequest.md b/rest/voice/v1/docs/CreateConnectionPolicyRequest.md new file mode 100644 index 000000000..f178a0c0e --- /dev/null +++ b/rest/voice/v1/docs/CreateConnectionPolicyRequest.md @@ -0,0 +1,11 @@ +# CreateConnectionPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/CreateConnectionPolicyTargetRequest.md b/rest/voice/v1/docs/CreateConnectionPolicyTargetRequest.md new file mode 100644 index 000000000..fab302ce9 --- /dev/null +++ b/rest/voice/v1/docs/CreateConnectionPolicyTargetRequest.md @@ -0,0 +1,15 @@ +# CreateConnectionPolicyTargetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the Target is enabled. The default is `true`. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**Priority** | **int32** | The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. | [optional] +**Target** | **string** | The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. | +**Weight** | **int32** | The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/CreateDialingPermissionsCountryBulkUpdateRequest.md b/rest/voice/v1/docs/CreateDialingPermissionsCountryBulkUpdateRequest.md new file mode 100644 index 000000000..dd9269361 --- /dev/null +++ b/rest/voice/v1/docs/CreateDialingPermissionsCountryBulkUpdateRequest.md @@ -0,0 +1,11 @@ +# CreateDialingPermissionsCountryBulkUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpdateRequest** | **string** | URL encoded JSON array of update objects. example : `[ { \"iso_code\": \"GB\", \"low_risk_numbers_enabled\": \"true\", \"high_risk_special_numbers_enabled\":\"true\", \"high_risk_tollfraud_numbers_enabled\": \"false\" } ]` | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/CreateIpRecordRequest.md b/rest/voice/v1/docs/CreateIpRecordRequest.md new file mode 100644 index 000000000..b0d97acad --- /dev/null +++ b/rest/voice/v1/docs/CreateIpRecordRequest.md @@ -0,0 +1,13 @@ +# CreateIpRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CidrPrefixLength** | **int32** | An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**IpAddress** | **string** | An IP address in dotted decimal notation, IPv4 only. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/CreateSourceIpMappingRequest.md b/rest/voice/v1/docs/CreateSourceIpMappingRequest.md new file mode 100644 index 000000000..b87d4a86c --- /dev/null +++ b/rest/voice/v1/docs/CreateSourceIpMappingRequest.md @@ -0,0 +1,12 @@ +# CreateSourceIpMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpRecordSid** | **string** | The Twilio-provided string that uniquely identifies the IP Record resource to map from. | +**SipDomainSid** | **string** | The SID of the SIP Domain that the IP Record should be mapped to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/DefaultApi.md b/rest/voice/v1/docs/DefaultApi.md new file mode 100644 index 000000000..9f661b808 --- /dev/null +++ b/rest/voice/v1/docs/DefaultApi.md @@ -0,0 +1,1265 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateByocTrunk**](DefaultApi.md#CreateByocTrunk) | **Post** /v1/ByocTrunks | +[**CreateConnectionPolicy**](DefaultApi.md#CreateConnectionPolicy) | **Post** /v1/ConnectionPolicies | +[**CreateConnectionPolicyTarget**](DefaultApi.md#CreateConnectionPolicyTarget) | **Post** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets | +[**CreateDialingPermissionsCountryBulkUpdate**](DefaultApi.md#CreateDialingPermissionsCountryBulkUpdate) | **Post** /v1/DialingPermissions/BulkCountryUpdates | +[**CreateIpRecord**](DefaultApi.md#CreateIpRecord) | **Post** /v1/IpRecords | +[**CreateSourceIpMapping**](DefaultApi.md#CreateSourceIpMapping) | **Post** /v1/SourceIpMappings | +[**DeleteByocTrunk**](DefaultApi.md#DeleteByocTrunk) | **Delete** /v1/ByocTrunks/{Sid} | +[**DeleteConnectionPolicy**](DefaultApi.md#DeleteConnectionPolicy) | **Delete** /v1/ConnectionPolicies/{Sid} | +[**DeleteConnectionPolicyTarget**](DefaultApi.md#DeleteConnectionPolicyTarget) | **Delete** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +[**DeleteIpRecord**](DefaultApi.md#DeleteIpRecord) | **Delete** /v1/IpRecords/{Sid} | +[**DeleteSourceIpMapping**](DefaultApi.md#DeleteSourceIpMapping) | **Delete** /v1/SourceIpMappings/{Sid} | +[**FetchByocTrunk**](DefaultApi.md#FetchByocTrunk) | **Get** /v1/ByocTrunks/{Sid} | +[**FetchConnectionPolicy**](DefaultApi.md#FetchConnectionPolicy) | **Get** /v1/ConnectionPolicies/{Sid} | +[**FetchConnectionPolicyTarget**](DefaultApi.md#FetchConnectionPolicyTarget) | **Get** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +[**FetchDialingPermissionsCountry**](DefaultApi.md#FetchDialingPermissionsCountry) | **Get** /v1/DialingPermissions/Countries/{IsoCode} | +[**FetchDialingPermissionsSettings**](DefaultApi.md#FetchDialingPermissionsSettings) | **Get** /v1/Settings | +[**FetchIpRecord**](DefaultApi.md#FetchIpRecord) | **Get** /v1/IpRecords/{Sid} | +[**FetchSourceIpMapping**](DefaultApi.md#FetchSourceIpMapping) | **Get** /v1/SourceIpMappings/{Sid} | +[**ListByocTrunk**](DefaultApi.md#ListByocTrunk) | **Get** /v1/ByocTrunks | +[**ListConnectionPolicy**](DefaultApi.md#ListConnectionPolicy) | **Get** /v1/ConnectionPolicies | +[**ListConnectionPolicyTarget**](DefaultApi.md#ListConnectionPolicyTarget) | **Get** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets | +[**ListDialingPermissionsCountry**](DefaultApi.md#ListDialingPermissionsCountry) | **Get** /v1/DialingPermissions/Countries | +[**ListDialingPermissionsHrsPrefixes**](DefaultApi.md#ListDialingPermissionsHrsPrefixes) | **Get** /v1/DialingPermissions/Countries/{IsoCode}/HighRiskSpecialPrefixes | +[**ListIpRecord**](DefaultApi.md#ListIpRecord) | **Get** /v1/IpRecords | +[**ListSourceIpMapping**](DefaultApi.md#ListSourceIpMapping) | **Get** /v1/SourceIpMappings | +[**UpdateByocTrunk**](DefaultApi.md#UpdateByocTrunk) | **Post** /v1/ByocTrunks/{Sid} | +[**UpdateConnectionPolicy**](DefaultApi.md#UpdateConnectionPolicy) | **Post** /v1/ConnectionPolicies/{Sid} | +[**UpdateConnectionPolicyTarget**](DefaultApi.md#UpdateConnectionPolicyTarget) | **Post** /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} | +[**UpdateDialingPermissionsSettings**](DefaultApi.md#UpdateDialingPermissionsSettings) | **Post** /v1/Settings | +[**UpdateIpRecord**](DefaultApi.md#UpdateIpRecord) | **Post** /v1/IpRecords/{Sid} | +[**UpdateSourceIpMapping**](DefaultApi.md#UpdateSourceIpMapping) | **Post** /v1/SourceIpMappings/{Sid} | + + + +## CreateByocTrunk + +> VoiceV1ByocTrunk CreateByocTrunk(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateByocTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateByocTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CnamLookupEnabled** | **optional.Bool**| Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | + **ConnectionPolicySid** | **optional.String**| The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **FromDomainSid** | **optional.String**| The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. | + **StatusCallbackUrl** | **optional.String**| The URL that we should call to pass status parameters (such as call ended) to your application. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. | + **VoiceUrl** | **optional.String**| The URL we should call when the BYOC Trunk receives a call. | + +### Return type + +[**VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateConnectionPolicy + +> VoiceV1ConnectionPolicy CreateConnectionPolicy(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateConnectionPolicyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConnectionPolicyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + +### Return type + +[**VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateConnectionPolicyTarget + +> VoiceV1ConnectionPolicyConnectionPolicyTarget CreateConnectionPolicyTarget(ctx, ConnectionPolicySid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConnectionPolicySid** | **string**| The SID of the Connection Policy that owns the Target. | + **optional** | ***CreateConnectionPolicyTargetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateConnectionPolicyTargetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **Enabled** | **optional.Bool**| Whether the Target is enabled. The default is `true`. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **Priority** | **optional.Int32**| The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. | + **Target** | **optional.String**| The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. | + **Weight** | **optional.Int32**| The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. | + +### Return type + +[**VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDialingPermissionsCountryBulkUpdate + +> VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate CreateDialingPermissionsCountryBulkUpdate(ctx, optional) + + + +Create a bulk update request to change voice dialing country permissions of one or more countries identified by the corresponding [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateDialingPermissionsCountryBulkUpdateOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateDialingPermissionsCountryBulkUpdateOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **UpdateRequest** | **optional.String**| URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]` | + +### Return type + +[**VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate**](voice.v1.dialing_permissions.dialing_permissions_country_bulk_update.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateIpRecord + +> VoiceV1IpRecord CreateIpRecord(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateIpRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateIpRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CidrPrefixLength** | **optional.Int32**| An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **IpAddress** | **optional.String**| An IP address in dotted decimal notation, IPv4 only. | + +### Return type + +[**VoiceV1IpRecord**](voice.v1.ip_record.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateSourceIpMapping + +> VoiceV1SourceIpMapping CreateSourceIpMapping(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateSourceIpMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateSourceIpMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **IpRecordSid** | **optional.String**| The Twilio-provided string that uniquely identifies the IP Record resource to map from. | + **SipDomainSid** | **optional.String**| The SID of the SIP Domain that the IP Record should be mapped to. | + +### Return type + +[**VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteByocTrunk + +> DeleteByocTrunk(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the BYOC Trunk resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConnectionPolicy + +> DeleteConnectionPolicy(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Connection Policy resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConnectionPolicyTarget + +> DeleteConnectionPolicyTarget(ctx, ConnectionPolicySid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConnectionPolicySid** | **string**| The SID of the Connection Policy that owns the Target. | +**Sid** | **string**| The unique string that we created to identify the Target resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteIpRecord + +> DeleteIpRecord(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSourceIpMapping + +> DeleteSourceIpMapping(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchByocTrunk + +> VoiceV1ByocTrunk FetchByocTrunk(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the BYOC Trunk resource to fetch. | + +### Return type + +[**VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConnectionPolicy + +> VoiceV1ConnectionPolicy FetchConnectionPolicy(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Connection Policy resource to fetch. | + +### Return type + +[**VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchConnectionPolicyTarget + +> VoiceV1ConnectionPolicyConnectionPolicyTarget FetchConnectionPolicyTarget(ctx, ConnectionPolicySid, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConnectionPolicySid** | **string**| The SID of the Connection Policy that owns the Target. | +**Sid** | **string**| The unique string that we created to identify the Target resource to fetch. | + +### Return type + +[**VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDialingPermissionsCountry + +> VoiceV1DialingPermissionsDialingPermissionsCountryInstance FetchDialingPermissionsCountry(ctx, IsoCode) + + + +Retrieve voice dialing country permissions identified by the given ISO country code + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCode** | **string**| The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch | + +### Return type + +[**VoiceV1DialingPermissionsDialingPermissionsCountryInstance**](voice.v1.dialing_permissions.dialing_permissions_country-instance.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchDialingPermissionsSettings + +> VoiceV1DialingPermissionsDialingPermissionsSettings FetchDialingPermissionsSettings(ctx, ) + + + +Retrieve voice dialing permissions inheritance for the sub-account + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**VoiceV1DialingPermissionsDialingPermissionsSettings**](voice.v1.dialing_permissions.dialing_permissions_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchIpRecord + +> VoiceV1IpRecord FetchIpRecord(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to fetch. | + +### Return type + +[**VoiceV1IpRecord**](voice.v1.ip_record.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSourceIpMapping + +> VoiceV1SourceIpMapping FetchSourceIpMapping(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to fetch. | + +### Return type + +[**VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListByocTrunk + +> ListByocTrunkResponse ListByocTrunk(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListByocTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListByocTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListByocTrunkResponse**](ListByocTrunkResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectionPolicy + +> ListConnectionPolicyResponse ListConnectionPolicy(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListConnectionPolicyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConnectionPolicyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConnectionPolicyResponse**](ListConnectionPolicyResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectionPolicyTarget + +> ListConnectionPolicyTargetResponse ListConnectionPolicyTarget(ctx, ConnectionPolicySid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConnectionPolicySid** | **string**| The SID of the Connection Policy from which to read the Targets. | + **optional** | ***ListConnectionPolicyTargetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListConnectionPolicyTargetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListConnectionPolicyTargetResponse**](ListConnectionPolicyTargetResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDialingPermissionsCountry + +> ListDialingPermissionsCountryResponse ListDialingPermissionsCountry(ctx, optional) + + + +Retrieve all voice dialing country permissions for this account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListDialingPermissionsCountryOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDialingPermissionsCountryOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **IsoCode** | **optional.String**| Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | + **Continent** | **optional.String**| Filter to retrieve the country permissions by specifying the continent | + **CountryCode** | **optional.String**| Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html) | + **LowRiskNumbersEnabled** | **optional.Bool**| Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`. | + **HighRiskSpecialNumbersEnabled** | **optional.Bool**| Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false` | + **HighRiskTollfraudNumbersEnabled** | **optional.Bool**| Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDialingPermissionsCountryResponse**](ListDialingPermissionsCountryResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDialingPermissionsHrsPrefixes + +> ListDialingPermissionsHrsPrefixesResponse ListDialingPermissionsHrsPrefixes(ctx, IsoCode, optional) + + + +Fetch the high-risk special services prefixes from the country resource corresponding to the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IsoCode** | **string**| The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched | + **optional** | ***ListDialingPermissionsHrsPrefixesOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDialingPermissionsHrsPrefixesOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDialingPermissionsHrsPrefixesResponse**](ListDialingPermissionsHrsPrefixesResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIpRecord + +> ListIpRecordResponse ListIpRecord(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListIpRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListIpRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListIpRecordResponse**](ListIpRecordResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSourceIpMapping + +> ListSourceIpMappingResponse ListSourceIpMapping(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSourceIpMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSourceIpMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSourceIpMappingResponse**](ListSourceIpMappingResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateByocTrunk + +> VoiceV1ByocTrunk UpdateByocTrunk(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the BYOC Trunk resource to update. | + **optional** | ***UpdateByocTrunkOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateByocTrunkOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **CnamLookupEnabled** | **optional.Bool**| Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | + **ConnectionPolicySid** | **optional.String**| The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **FromDomainSid** | **optional.String**| The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \\\"call back\\\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \\\"sip.twilio.com\\\". | + **StatusCallbackMethod** | **optional.String**| The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. | + **StatusCallbackUrl** | **optional.String**| The URL that we should call to pass status parameters (such as call ended) to your application. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use to call `voice_url` | + **VoiceUrl** | **optional.String**| The URL we should call when the BYOC Trunk receives a call. | + +### Return type + +[**VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConnectionPolicy + +> VoiceV1ConnectionPolicy UpdateConnectionPolicy(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The unique string that we created to identify the Connection Policy resource to update. | + **optional** | ***UpdateConnectionPolicyOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConnectionPolicyOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + +### Return type + +[**VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConnectionPolicyTarget + +> VoiceV1ConnectionPolicyConnectionPolicyTarget UpdateConnectionPolicyTarget(ctx, ConnectionPolicySid, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ConnectionPolicySid** | **string**| The SID of the Connection Policy that owns the Target. | +**Sid** | **string**| The unique string that we created to identify the Target resource to update. | + **optional** | ***UpdateConnectionPolicyTargetOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateConnectionPolicyTargetOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **Enabled** | **optional.Bool**| Whether the Target is enabled. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + **Priority** | **optional.Int32**| The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. | + **Target** | **optional.String**| The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. | + **Weight** | **optional.Int32**| The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. | + +### Return type + +[**VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDialingPermissionsSettings + +> VoiceV1DialingPermissionsDialingPermissionsSettings UpdateDialingPermissionsSettings(ctx, optional) + + + +Update voice dialing permissions inheritance for the sub-account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***UpdateDialingPermissionsSettingsOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateDialingPermissionsSettingsOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **DialingPermissionsInheritance** | **optional.Bool**| `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. | + +### Return type + +[**VoiceV1DialingPermissionsDialingPermissionsSettings**](voice.v1.dialing_permissions.dialing_permissions_settings.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateIpRecord + +> VoiceV1IpRecord UpdateIpRecord(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to update. | + **optional** | ***UpdateIpRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateIpRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | + +### Return type + +[**VoiceV1IpRecord**](voice.v1.ip_record.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSourceIpMapping + +> VoiceV1SourceIpMapping UpdateSourceIpMapping(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The Twilio-provided string that uniquely identifies the IP Record resource to update. | + **optional** | ***UpdateSourceIpMappingOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSourceIpMappingOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **SipDomainSid** | **optional.String**| The SID of the SIP Domain that the IP Record should be mapped to. | + +### Return type + +[**VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/voice/v1/docs/ListByocTrunkResponse.md b/rest/voice/v1/docs/ListByocTrunkResponse.md new file mode 100644 index 000000000..999d4cd33 --- /dev/null +++ b/rest/voice/v1/docs/ListByocTrunkResponse.md @@ -0,0 +1,12 @@ +# ListByocTrunkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ByocTrunks** | [**[]VoiceV1ByocTrunk**](voice.v1.byoc_trunk.md) | | [optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListByocTrunkResponseMeta.md b/rest/voice/v1/docs/ListByocTrunkResponseMeta.md new file mode 100644 index 000000000..2a39dc0db --- /dev/null +++ b/rest/voice/v1/docs/ListByocTrunkResponseMeta.md @@ -0,0 +1,17 @@ +# ListByocTrunkResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListConnectionPolicyResponse.md b/rest/voice/v1/docs/ListConnectionPolicyResponse.md new file mode 100644 index 000000000..4238c3a60 --- /dev/null +++ b/rest/voice/v1/docs/ListConnectionPolicyResponse.md @@ -0,0 +1,12 @@ +# ListConnectionPolicyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectionPolicies** | [**[]VoiceV1ConnectionPolicy**](voice.v1.connection_policy.md) | | [optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md b/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md new file mode 100644 index 000000000..c9774c07a --- /dev/null +++ b/rest/voice/v1/docs/ListConnectionPolicyTargetResponse.md @@ -0,0 +1,12 @@ +# ListConnectionPolicyTargetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] +**Targets** | [**[]VoiceV1ConnectionPolicyConnectionPolicyTarget**](voice.v1.connection_policy.connection_policy_target.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md b/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md new file mode 100644 index 000000000..a1450fd3a --- /dev/null +++ b/rest/voice/v1/docs/ListDialingPermissionsCountryResponse.md @@ -0,0 +1,12 @@ +# ListDialingPermissionsCountryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountry**](voice.v1.dialing_permissions.dialing_permissions_country.md) | | [optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md b/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md new file mode 100644 index 000000000..9b5935866 --- /dev/null +++ b/rest/voice/v1/docs/ListDialingPermissionsHrsPrefixesResponse.md @@ -0,0 +1,12 @@ +# ListDialingPermissionsHrsPrefixesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | [**[]VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes**](voice.v1.dialing_permissions.dialing_permissions_country.dialing_permissions_hrs_prefixes.md) | | [optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListIpRecordResponse.md b/rest/voice/v1/docs/ListIpRecordResponse.md new file mode 100644 index 000000000..ee3700dd5 --- /dev/null +++ b/rest/voice/v1/docs/ListIpRecordResponse.md @@ -0,0 +1,12 @@ +# ListIpRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpRecords** | [**[]VoiceV1IpRecord**](voice.v1.ip_record.md) | | [optional] +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/ListSourceIpMappingResponse.md b/rest/voice/v1/docs/ListSourceIpMappingResponse.md new file mode 100644 index 000000000..69d1d9e9b --- /dev/null +++ b/rest/voice/v1/docs/ListSourceIpMappingResponse.md @@ -0,0 +1,12 @@ +# ListSourceIpMappingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListByocTrunkResponseMeta**](ListByocTrunkResponse_meta.md) | | [optional] +**SourceIpMappings** | [**[]VoiceV1SourceIpMapping**](voice.v1.source_ip_mapping.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateByocTrunkRequest.md b/rest/voice/v1/docs/UpdateByocTrunkRequest.md new file mode 100644 index 000000000..508d752f8 --- /dev/null +++ b/rest/voice/v1/docs/UpdateByocTrunkRequest.md @@ -0,0 +1,20 @@ +# UpdateByocTrunkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CnamLookupEnabled** | **bool** | Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. | [optional] +**ConnectionPolicySid** | **string** | The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**FromDomainSid** | **string** | The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \"call back\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \"sip.twilio.com\". | [optional] +**StatusCallbackMethod** | **string** | The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. | [optional] +**StatusCallbackUrl** | **string** | The URL that we should call to pass status parameters (such as call ended) to your application. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use to call `voice_url` | [optional] +**VoiceUrl** | **string** | The URL we should call when the BYOC Trunk receives a call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateConnectionPolicyRequest.md b/rest/voice/v1/docs/UpdateConnectionPolicyRequest.md new file mode 100644 index 000000000..bba546f2d --- /dev/null +++ b/rest/voice/v1/docs/UpdateConnectionPolicyRequest.md @@ -0,0 +1,11 @@ +# UpdateConnectionPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateConnectionPolicyTargetRequest.md b/rest/voice/v1/docs/UpdateConnectionPolicyTargetRequest.md new file mode 100644 index 000000000..ef61fa7e9 --- /dev/null +++ b/rest/voice/v1/docs/UpdateConnectionPolicyTargetRequest.md @@ -0,0 +1,15 @@ +# UpdateConnectionPolicyTargetRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the Target is enabled. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] +**Priority** | **int32** | The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. | [optional] +**Target** | **string** | The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. | [optional] +**Weight** | **int32** | The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateDialingPermissionsSettingsRequest.md b/rest/voice/v1/docs/UpdateDialingPermissionsSettingsRequest.md new file mode 100644 index 000000000..cf4988ec9 --- /dev/null +++ b/rest/voice/v1/docs/UpdateDialingPermissionsSettingsRequest.md @@ -0,0 +1,11 @@ +# UpdateDialingPermissionsSettingsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DialingPermissionsInheritance** | **bool** | `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateIpRecordRequest.md b/rest/voice/v1/docs/UpdateIpRecordRequest.md new file mode 100644 index 000000000..9bde878aa --- /dev/null +++ b/rest/voice/v1/docs/UpdateIpRecordRequest.md @@ -0,0 +1,11 @@ +# UpdateIpRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/UpdateSourceIpMappingRequest.md b/rest/voice/v1/docs/UpdateSourceIpMappingRequest.md new file mode 100644 index 000000000..b3feaf8d7 --- /dev/null +++ b/rest/voice/v1/docs/UpdateSourceIpMappingRequest.md @@ -0,0 +1,11 @@ +# UpdateSourceIpMappingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SipDomainSid** | **string** | The SID of the SIP Domain that the IP Record should be mapped to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1ByocTrunk.md b/rest/voice/v1/docs/VoiceV1ByocTrunk.md new file mode 100644 index 000000000..3c6a617f8 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1ByocTrunk.md @@ -0,0 +1,25 @@ +# VoiceV1ByocTrunk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CnamLookupEnabled** | **bool** | | [optional] +**ConnectionPolicySid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**FromDomainSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**StatusCallbackMethod** | **string** | | [optional] +**StatusCallbackUrl** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md b/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md new file mode 100644 index 000000000..0a5b39cb5 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1ConnectionPolicy.md @@ -0,0 +1,17 @@ +# VoiceV1ConnectionPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md b/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md new file mode 100644 index 000000000..d73be1c06 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1ConnectionPolicyConnectionPolicyTarget.md @@ -0,0 +1,21 @@ +# VoiceV1ConnectionPolicyConnectionPolicyTarget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**ConnectionPolicySid** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**Enabled** | **bool** | | [optional] +**FriendlyName** | **string** | | [optional] +**Priority** | **int32** | | [optional] +**Sid** | **string** | | [optional] +**Target** | **string** | | [optional] +**Url** | **string** | | [optional] +**Weight** | **int32** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md new file mode 100644 index 000000000..b174e772d --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountry.md @@ -0,0 +1,19 @@ +# VoiceV1DialingPermissionsDialingPermissionsCountry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Continent** | **string** | | [optional] +**CountryCodes** | **[]string** | | [optional] +**HighRiskSpecialNumbersEnabled** | **bool** | | [optional] +**HighRiskTollfraudNumbersEnabled** | **bool** | | [optional] +**IsoCode** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**LowRiskNumbersEnabled** | **bool** | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md new file mode 100644 index 000000000..119f7cb51 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate.md @@ -0,0 +1,12 @@ +# VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpdateCount** | **int32** | | [optional] +**UpdateRequest** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md new file mode 100644 index 000000000..ec2d2330b --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes.md @@ -0,0 +1,11 @@ +# VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prefix** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md new file mode 100644 index 000000000..e6ac6f9c9 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsCountryInstance.md @@ -0,0 +1,19 @@ +# VoiceV1DialingPermissionsDialingPermissionsCountryInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Continent** | **string** | | [optional] +**CountryCodes** | **[]string** | | [optional] +**HighRiskSpecialNumbersEnabled** | **bool** | | [optional] +**HighRiskTollfraudNumbersEnabled** | **bool** | | [optional] +**IsoCode** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**LowRiskNumbersEnabled** | **bool** | | [optional] +**Name** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md new file mode 100644 index 000000000..8e7646f25 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1DialingPermissionsDialingPermissionsSettings.md @@ -0,0 +1,12 @@ +# VoiceV1DialingPermissionsDialingPermissionsSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DialingPermissionsInheritance** | **bool** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1IpRecord.md b/rest/voice/v1/docs/VoiceV1IpRecord.md new file mode 100644 index 000000000..02250a137 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1IpRecord.md @@ -0,0 +1,18 @@ +# VoiceV1IpRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CidrPrefixLength** | **int32** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**IpAddress** | **string** | | [optional] +**Sid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/docs/VoiceV1SourceIpMapping.md b/rest/voice/v1/docs/VoiceV1SourceIpMapping.md new file mode 100644 index 000000000..9c9febc87 --- /dev/null +++ b/rest/voice/v1/docs/VoiceV1SourceIpMapping.md @@ -0,0 +1,16 @@ +# VoiceV1SourceIpMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**IpRecordSid** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SipDomainSid** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/voice/v1/model_create_byoc_trunk_request.go b/rest/voice/v1/model_create_byoc_trunk_request.go new file mode 100644 index 000000000..927a8c749 --- /dev/null +++ b/rest/voice/v1/model_create_byoc_trunk_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateByocTrunkRequest struct for CreateByocTrunkRequest +type CreateByocTrunkRequest struct { + // Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + // The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. + ConnectionPolicySid string `json:"ConnectionPolicySid,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \"call back\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \"sip.twilio.com\". + FromDomainSid string `json:"FromDomainSid,omitempty"` + // The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The URL that we should call to pass status parameters (such as call ended) to your application. + StatusCallbackUrl string `json:"StatusCallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The URL we should call when the BYOC Trunk receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/voice/v1/model_create_connection_policy_request.go b/rest/voice/v1/model_create_connection_policy_request.go new file mode 100644 index 000000000..19491dff2 --- /dev/null +++ b/rest/voice/v1/model_create_connection_policy_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateConnectionPolicyRequest struct for CreateConnectionPolicyRequest +type CreateConnectionPolicyRequest struct { + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/voice/v1/model_create_connection_policy_target_request.go b/rest/voice/v1/model_create_connection_policy_target_request.go new file mode 100644 index 000000000..036871411 --- /dev/null +++ b/rest/voice/v1/model_create_connection_policy_target_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateConnectionPolicyTargetRequest struct for CreateConnectionPolicyTargetRequest +type CreateConnectionPolicyTargetRequest struct { + // Whether the Target is enabled. The default is `true`. + Enabled bool `json:"Enabled,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target. + Priority int32 `json:"Priority,omitempty"` + // The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. + Target string `json:"Target"` + // The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority. + Weight int32 `json:"Weight,omitempty"` +} diff --git a/rest/voice/v1/model_create_dialing_permissions_country_bulk_update_request.go b/rest/voice/v1/model_create_dialing_permissions_country_bulk_update_request.go new file mode 100644 index 000000000..f59b3e232 --- /dev/null +++ b/rest/voice/v1/model_create_dialing_permissions_country_bulk_update_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateDialingPermissionsCountryBulkUpdateRequest struct for CreateDialingPermissionsCountryBulkUpdateRequest +type CreateDialingPermissionsCountryBulkUpdateRequest struct { + // URL encoded JSON array of update objects. example : `[ { \"iso_code\": \"GB\", \"low_risk_numbers_enabled\": \"true\", \"high_risk_special_numbers_enabled\":\"true\", \"high_risk_tollfraud_numbers_enabled\": \"false\" } ]` + UpdateRequest string `json:"UpdateRequest"` +} diff --git a/rest/voice/v1/model_create_ip_record_request.go b/rest/voice/v1/model_create_ip_record_request.go new file mode 100644 index 000000000..19f6a8aac --- /dev/null +++ b/rest/voice/v1/model_create_ip_record_request.go @@ -0,0 +1,20 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateIpRecordRequest struct for CreateIpRecordRequest +type CreateIpRecordRequest struct { + // An integer representing the length of the [CIDR](https://tools.ietf.org/html/rfc4632) prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32. + CidrPrefixLength int32 `json:"CidrPrefixLength,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // An IP address in dotted decimal notation, IPv4 only. + IpAddress string `json:"IpAddress"` +} diff --git a/rest/voice/v1/model_create_source_ip_mapping_request.go b/rest/voice/v1/model_create_source_ip_mapping_request.go new file mode 100644 index 000000000..66b49993d --- /dev/null +++ b/rest/voice/v1/model_create_source_ip_mapping_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateSourceIpMappingRequest struct for CreateSourceIpMappingRequest +type CreateSourceIpMappingRequest struct { + // The Twilio-provided string that uniquely identifies the IP Record resource to map from. + IpRecordSid string `json:"IpRecordSid"` + // The SID of the SIP Domain that the IP Record should be mapped to. + SipDomainSid string `json:"SipDomainSid"` +} diff --git a/rest/voice/v1/model_list_byoc_trunk_response.go b/rest/voice/v1/model_list_byoc_trunk_response.go new file mode 100644 index 000000000..1313dcc8d --- /dev/null +++ b/rest/voice/v1/model_list_byoc_trunk_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListByocTrunkResponse struct for ListByocTrunkResponse +type ListByocTrunkResponse struct { + ByocTrunks []VoiceV1ByocTrunk `json:"ByocTrunks,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/voice/v1/model_list_byoc_trunk_response_meta.go b/rest/voice/v1/model_list_byoc_trunk_response_meta.go new file mode 100644 index 000000000..879a18e2f --- /dev/null +++ b/rest/voice/v1/model_list_byoc_trunk_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListByocTrunkResponseMeta struct for ListByocTrunkResponseMeta +type ListByocTrunkResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_list_connection_policy_response.go b/rest/voice/v1/model_list_connection_policy_response.go new file mode 100644 index 000000000..f0824bbf7 --- /dev/null +++ b/rest/voice/v1/model_list_connection_policy_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConnectionPolicyResponse struct for ListConnectionPolicyResponse +type ListConnectionPolicyResponse struct { + ConnectionPolicies []VoiceV1ConnectionPolicy `json:"ConnectionPolicies,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/voice/v1/model_list_connection_policy_target_response.go b/rest/voice/v1/model_list_connection_policy_target_response.go new file mode 100644 index 000000000..18ce46dcc --- /dev/null +++ b/rest/voice/v1/model_list_connection_policy_target_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListConnectionPolicyTargetResponse struct for ListConnectionPolicyTargetResponse +type ListConnectionPolicyTargetResponse struct { + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + Targets []VoiceV1ConnectionPolicyConnectionPolicyTarget `json:"Targets,omitempty"` +} diff --git a/rest/voice/v1/model_list_dialing_permissions_country_response.go b/rest/voice/v1/model_list_dialing_permissions_country_response.go new file mode 100644 index 000000000..b4bd62ac0 --- /dev/null +++ b/rest/voice/v1/model_list_dialing_permissions_country_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDialingPermissionsCountryResponse struct for ListDialingPermissionsCountryResponse +type ListDialingPermissionsCountryResponse struct { + Content []VoiceV1DialingPermissionsDialingPermissionsCountry `json:"Content,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go b/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go new file mode 100644 index 000000000..c7d0180c4 --- /dev/null +++ b/rest/voice/v1/model_list_dialing_permissions_hrs_prefixes_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDialingPermissionsHrsPrefixesResponse struct for ListDialingPermissionsHrsPrefixesResponse +type ListDialingPermissionsHrsPrefixesResponse struct { + Content []VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes `json:"Content,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/voice/v1/model_list_ip_record_response.go b/rest/voice/v1/model_list_ip_record_response.go new file mode 100644 index 000000000..b3d8f59bd --- /dev/null +++ b/rest/voice/v1/model_list_ip_record_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListIpRecordResponse struct for ListIpRecordResponse +type ListIpRecordResponse struct { + IpRecords []VoiceV1IpRecord `json:"IpRecords,omitempty"` + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/voice/v1/model_list_source_ip_mapping_response.go b/rest/voice/v1/model_list_source_ip_mapping_response.go new file mode 100644 index 000000000..13c75f6e2 --- /dev/null +++ b/rest/voice/v1/model_list_source_ip_mapping_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSourceIpMappingResponse struct for ListSourceIpMappingResponse +type ListSourceIpMappingResponse struct { + Meta ListByocTrunkResponseMeta `json:"Meta,omitempty"` + SourceIpMappings []VoiceV1SourceIpMapping `json:"SourceIpMappings,omitempty"` +} diff --git a/rest/voice/v1/model_update_byoc_trunk_request.go b/rest/voice/v1/model_update_byoc_trunk_request.go new file mode 100644 index 000000000..fa239cd31 --- /dev/null +++ b/rest/voice/v1/model_update_byoc_trunk_request.go @@ -0,0 +1,34 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateByocTrunkRequest struct for UpdateByocTrunkRequest +type UpdateByocTrunkRequest struct { + // Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information. + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + // The SID of the Connection Policy that Twilio will use when routing traffic to your communications infrastructure. + ConnectionPolicySid string `json:"ConnectionPolicySid,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID of the SIP Domain that should be used in the `From` header of originating calls sent to your SIP infrastructure. If your SIP infrastructure allows users to \"call back\" an incoming call, configure this with a [SIP Domain](https://www.twilio.com/docs/voice/api/sending-sip) to ensure proper routing. If not configured, the from domain will default to \"sip.twilio.com\". + FromDomainSid string `json:"FromDomainSid,omitempty"` + // The HTTP method we should use to call `status_callback_url`. Can be: `GET` or `POST`. + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + // The URL that we should call to pass status parameters (such as call ended) to your application. + StatusCallbackUrl string `json:"StatusCallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use to call `voice_url` + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The URL we should call when the BYOC Trunk receives a call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/voice/v1/model_update_connection_policy_request.go b/rest/voice/v1/model_update_connection_policy_request.go new file mode 100644 index 000000000..f62f7011c --- /dev/null +++ b/rest/voice/v1/model_update_connection_policy_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConnectionPolicyRequest struct for UpdateConnectionPolicyRequest +type UpdateConnectionPolicyRequest struct { + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/voice/v1/model_update_connection_policy_target_request.go b/rest/voice/v1/model_update_connection_policy_target_request.go new file mode 100644 index 000000000..37d448a5b --- /dev/null +++ b/rest/voice/v1/model_update_connection_policy_target_request.go @@ -0,0 +1,24 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateConnectionPolicyTargetRequest struct for UpdateConnectionPolicyTargetRequest +type UpdateConnectionPolicyTargetRequest struct { + // Whether the Target is enabled. + Enabled bool `json:"Enabled,omitempty"` + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` + // The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target. + Priority int32 `json:"Priority,omitempty"` + // The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported. + Target string `json:"Target,omitempty"` + // The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority. + Weight int32 `json:"Weight,omitempty"` +} diff --git a/rest/voice/v1/model_update_dialing_permissions_settings_request.go b/rest/voice/v1/model_update_dialing_permissions_settings_request.go new file mode 100644 index 000000000..87f63379c --- /dev/null +++ b/rest/voice/v1/model_update_dialing_permissions_settings_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateDialingPermissionsSettingsRequest struct for UpdateDialingPermissionsSettingsRequest +type UpdateDialingPermissionsSettingsRequest struct { + // `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`. + DialingPermissionsInheritance bool `json:"DialingPermissionsInheritance,omitempty"` +} diff --git a/rest/voice/v1/model_update_ip_record_request.go b/rest/voice/v1/model_update_ip_record_request.go new file mode 100644 index 000000000..58d89ce7d --- /dev/null +++ b/rest/voice/v1/model_update_ip_record_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateIpRecordRequest struct for UpdateIpRecordRequest +type UpdateIpRecordRequest struct { + // A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long. + FriendlyName string `json:"FriendlyName,omitempty"` +} diff --git a/rest/voice/v1/model_update_source_ip_mapping_request.go b/rest/voice/v1/model_update_source_ip_mapping_request.go new file mode 100644 index 000000000..1baa1d110 --- /dev/null +++ b/rest/voice/v1/model_update_source_ip_mapping_request.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSourceIpMappingRequest struct for UpdateSourceIpMappingRequest +type UpdateSourceIpMappingRequest struct { + // The SID of the SIP Domain that the IP Record should be mapped to. + SipDomainSid string `json:"SipDomainSid"` +} diff --git a/rest/voice/v1/model_voice_v1_byoc_trunk.go b/rest/voice/v1/model_voice_v1_byoc_trunk.go new file mode 100644 index 000000000..62ab23289 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_byoc_trunk.go @@ -0,0 +1,32 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VoiceV1ByocTrunk struct for VoiceV1ByocTrunk +type VoiceV1ByocTrunk struct { + AccountSid string `json:"AccountSid,omitempty"` + CnamLookupEnabled bool `json:"CnamLookupEnabled,omitempty"` + ConnectionPolicySid string `json:"ConnectionPolicySid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + FromDomainSid string `json:"FromDomainSid,omitempty"` + Sid string `json:"Sid,omitempty"` + StatusCallbackMethod string `json:"StatusCallbackMethod,omitempty"` + StatusCallbackUrl string `json:"StatusCallbackUrl,omitempty"` + Url string `json:"Url,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_connection_policy.go b/rest/voice/v1/model_voice_v1_connection_policy.go new file mode 100644 index 000000000..c216b8e1b --- /dev/null +++ b/rest/voice/v1/model_voice_v1_connection_policy.go @@ -0,0 +1,24 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VoiceV1ConnectionPolicy struct for VoiceV1ConnectionPolicy +type VoiceV1ConnectionPolicy struct { + AccountSid string `json:"AccountSid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go b/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go new file mode 100644 index 000000000..703d1a555 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_connection_policy_connection_policy_target.go @@ -0,0 +1,28 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VoiceV1ConnectionPolicyConnectionPolicyTarget struct for VoiceV1ConnectionPolicyConnectionPolicyTarget +type VoiceV1ConnectionPolicyConnectionPolicyTarget struct { + AccountSid string `json:"AccountSid,omitempty"` + ConnectionPolicySid string `json:"ConnectionPolicySid,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + Enabled bool `json:"Enabled,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Priority int32 `json:"Priority,omitempty"` + Sid string `json:"Sid,omitempty"` + Target string `json:"Target,omitempty"` + Url string `json:"Url,omitempty"` + Weight int32 `json:"Weight,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go new file mode 100644 index 000000000..b9b5f6b47 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country.go @@ -0,0 +1,23 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VoiceV1DialingPermissionsDialingPermissionsCountry struct for VoiceV1DialingPermissionsDialingPermissionsCountry +type VoiceV1DialingPermissionsDialingPermissionsCountry struct { + Continent string `json:"Continent,omitempty"` + CountryCodes []string `json:"CountryCodes,omitempty"` + HighRiskSpecialNumbersEnabled bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + HighRiskTollfraudNumbersEnabled bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + IsoCode string `json:"IsoCode,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LowRiskNumbersEnabled bool `json:"LowRiskNumbersEnabled,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go new file mode 100644 index 000000000..45add915f --- /dev/null +++ b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_bulk_update.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct for VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate +type VoiceV1DialingPermissionsDialingPermissionsCountryBulkUpdate struct { + UpdateCount int32 `json:"UpdateCount,omitempty"` + UpdateRequest string `json:"UpdateRequest,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go new file mode 100644 index 000000000..e2fd31f63 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_dialing_permissions_hrs_prefixes.go @@ -0,0 +1,15 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct for VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes +type VoiceV1DialingPermissionsDialingPermissionsCountryDialingPermissionsHrsPrefixes struct { + Prefix string `json:"Prefix,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go new file mode 100644 index 000000000..83c538343 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_country_instance.go @@ -0,0 +1,23 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct for VoiceV1DialingPermissionsDialingPermissionsCountryInstance +type VoiceV1DialingPermissionsDialingPermissionsCountryInstance struct { + Continent string `json:"Continent,omitempty"` + CountryCodes []string `json:"CountryCodes,omitempty"` + HighRiskSpecialNumbersEnabled bool `json:"HighRiskSpecialNumbersEnabled,omitempty"` + HighRiskTollfraudNumbersEnabled bool `json:"HighRiskTollfraudNumbersEnabled,omitempty"` + IsoCode string `json:"IsoCode,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + LowRiskNumbersEnabled bool `json:"LowRiskNumbersEnabled,omitempty"` + Name string `json:"Name,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go new file mode 100644 index 000000000..9c8eda787 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_dialing_permissions_dialing_permissions_settings.go @@ -0,0 +1,16 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// VoiceV1DialingPermissionsDialingPermissionsSettings struct for VoiceV1DialingPermissionsDialingPermissionsSettings +type VoiceV1DialingPermissionsDialingPermissionsSettings struct { + DialingPermissionsInheritance bool `json:"DialingPermissionsInheritance,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_ip_record.go b/rest/voice/v1/model_voice_v1_ip_record.go new file mode 100644 index 000000000..d4dc98857 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_ip_record.go @@ -0,0 +1,25 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VoiceV1IpRecord struct for VoiceV1IpRecord +type VoiceV1IpRecord struct { + AccountSid string `json:"AccountSid,omitempty"` + CidrPrefixLength int32 `json:"CidrPrefixLength,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + IpAddress string `json:"IpAddress,omitempty"` + Sid string `json:"Sid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/model_voice_v1_source_ip_mapping.go b/rest/voice/v1/model_voice_v1_source_ip_mapping.go new file mode 100644 index 000000000..75c3087b2 --- /dev/null +++ b/rest/voice/v1/model_voice_v1_source_ip_mapping.go @@ -0,0 +1,23 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// VoiceV1SourceIpMapping struct for VoiceV1SourceIpMapping +type VoiceV1SourceIpMapping struct { + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + IpRecordSid string `json:"IpRecordSid,omitempty"` + Sid string `json:"Sid,omitempty"` + SipDomainSid string `json:"SipDomainSid,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/voice/v1/response.go b/rest/voice/v1/response.go new file mode 100644 index 000000000..af10df6e2 --- /dev/null +++ b/rest/voice/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Voice + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/rest/wireless/v1/.openapi-generator-ignore b/rest/wireless/v1/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/rest/wireless/v1/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/wireless/v1/README.md b/rest/wireless/v1/README.md new file mode 100644 index 000000000..411bad9bf --- /dev/null +++ b/rest/wireless/v1/README.md @@ -0,0 +1,95 @@ +# Go API client for openapi + +This is the public Twilio REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: com.twilio.oai.TwilioGoGenerator +For more information, please visit [https://support.twilio.com](https://support.twilio.com) + +## Installation + +Install the following dependencies: + +```shell +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: + +```golang +import "./openapi" +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateCommand**](docs/DefaultApi.md#createcommand) | **Post** /v1/Commands | +*DefaultApi* | [**CreateRatePlan**](docs/DefaultApi.md#createrateplan) | **Post** /v1/RatePlans | +*DefaultApi* | [**DeleteCommand**](docs/DefaultApi.md#deletecommand) | **Delete** /v1/Commands/{Sid} | +*DefaultApi* | [**DeleteRatePlan**](docs/DefaultApi.md#deleterateplan) | **Delete** /v1/RatePlans/{Sid} | +*DefaultApi* | [**DeleteSim**](docs/DefaultApi.md#deletesim) | **Delete** /v1/Sims/{Sid} | +*DefaultApi* | [**FetchCommand**](docs/DefaultApi.md#fetchcommand) | **Get** /v1/Commands/{Sid} | +*DefaultApi* | [**FetchRatePlan**](docs/DefaultApi.md#fetchrateplan) | **Get** /v1/RatePlans/{Sid} | +*DefaultApi* | [**FetchSim**](docs/DefaultApi.md#fetchsim) | **Get** /v1/Sims/{Sid} | +*DefaultApi* | [**ListAccountUsageRecord**](docs/DefaultApi.md#listaccountusagerecord) | **Get** /v1/UsageRecords | +*DefaultApi* | [**ListCommand**](docs/DefaultApi.md#listcommand) | **Get** /v1/Commands | +*DefaultApi* | [**ListDataSession**](docs/DefaultApi.md#listdatasession) | **Get** /v1/Sims/{SimSid}/DataSessions | +*DefaultApi* | [**ListRatePlan**](docs/DefaultApi.md#listrateplan) | **Get** /v1/RatePlans | +*DefaultApi* | [**ListSim**](docs/DefaultApi.md#listsim) | **Get** /v1/Sims | +*DefaultApi* | [**ListUsageRecord**](docs/DefaultApi.md#listusagerecord) | **Get** /v1/Sims/{SimSid}/UsageRecords | +*DefaultApi* | [**UpdateRatePlan**](docs/DefaultApi.md#updaterateplan) | **Post** /v1/RatePlans/{Sid} | +*DefaultApi* | [**UpdateSim**](docs/DefaultApi.md#updatesim) | **Post** /v1/Sims/{Sid} | + + +## Documentation For Models + + - [CreateCommandRequest](docs/CreateCommandRequest.md) + - [CreateRatePlanRequest](docs/CreateRatePlanRequest.md) + - [ListAccountUsageRecordResponse](docs/ListAccountUsageRecordResponse.md) + - [ListCommandResponse](docs/ListCommandResponse.md) + - [ListCommandResponseMeta](docs/ListCommandResponseMeta.md) + - [ListDataSessionResponse](docs/ListDataSessionResponse.md) + - [ListRatePlanResponse](docs/ListRatePlanResponse.md) + - [ListSimResponse](docs/ListSimResponse.md) + - [ListUsageRecordResponse](docs/ListUsageRecordResponse.md) + - [UpdateRatePlanRequest](docs/UpdateRatePlanRequest.md) + - [UpdateSimRequest](docs/UpdateSimRequest.md) + - [WirelessV1AccountUsageRecord](docs/WirelessV1AccountUsageRecord.md) + - [WirelessV1Command](docs/WirelessV1Command.md) + - [WirelessV1RatePlan](docs/WirelessV1RatePlan.md) + - [WirelessV1Sim](docs/WirelessV1Sim.md) + - [WirelessV1SimDataSession](docs/WirelessV1SimDataSession.md) + - [WirelessV1SimUsageRecord](docs/WirelessV1SimUsageRecord.md) + + +## Documentation For Authorization + + + +## accountSid_authToken + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Author + +support@twilio.com + diff --git a/rest/wireless/v1/api_default.go b/rest/wireless/v1/api_default.go new file mode 100644 index 000000000..99380a1e0 --- /dev/null +++ b/rest/wireless/v1/api_default.go @@ -0,0 +1,825 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "encoding/json" + "fmt" + twilio "github.com/twilio/twilio-go/client" + "net/url" + "strings" + "time" +) + +type DefaultApiService struct { + baseURL string + client *twilio.Client +} + +func NewDefaultApiService(client *twilio.Client) *DefaultApiService { + return &DefaultApiService { + client: client, + baseURL: fmt.Sprintf("https://wireless.twilio.com"), + } +} +// CreateCommandParams Optional parameters for the method 'CreateCommand' +type CreateCommandParams struct { + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + Command *string `json:"Command,omitempty"` + CommandMode *string `json:"CommandMode,omitempty"` + DeliveryReceiptRequested *bool `json:"DeliveryReceiptRequested,omitempty"` + IncludeSid *string `json:"IncludeSid,omitempty"` + Sim *string `json:"Sim,omitempty"` +} + +/* +CreateCommand Method for CreateCommand +Send a Command to a Sim. + * @param optional nil or *CreateCommandOpts - Optional Parameters: + * @param "CallbackMethod" (string) - The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. + * @param "CallbackUrl" (string) - The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. + * @param "Command" (string) - The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode. + * @param "CommandMode" (string) - The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`. + * @param "DeliveryReceiptRequested" (bool) - Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. + * @param "IncludeSid" (string) - Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. + * @param "Sim" (string) - The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. +@return WirelessV1Command +*/ +func (c *DefaultApiService) CreateCommand(params *CreateCommandParams) (*WirelessV1Command, error) { + path := "/v1/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.Command != nil { + data.Set("Command", *params.Command) + } + if params != nil && params.CommandMode != nil { + data.Set("CommandMode", *params.CommandMode) + } + if params != nil && params.DeliveryReceiptRequested != nil { + data.Set("DeliveryReceiptRequested", fmt.Sprint(*params.DeliveryReceiptRequested)) + } + if params != nil && params.IncludeSid != nil { + data.Set("IncludeSid", *params.IncludeSid) + } + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// CreateRatePlanParams Optional parameters for the method 'CreateRatePlan' +type CreateRatePlanParams struct { + DataEnabled *bool `json:"DataEnabled,omitempty"` + DataLimit *int32 `json:"DataLimit,omitempty"` + DataMetering *string `json:"DataMetering,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + InternationalRoaming *[]string `json:"InternationalRoaming,omitempty"` + InternationalRoamingDataLimit *int32 `json:"InternationalRoamingDataLimit,omitempty"` + MessagingEnabled *bool `json:"MessagingEnabled,omitempty"` + NationalRoamingDataLimit *int32 `json:"NationalRoamingDataLimit,omitempty"` + NationalRoamingEnabled *bool `json:"NationalRoamingEnabled,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceEnabled *bool `json:"VoiceEnabled,omitempty"` +} + +/* +CreateRatePlan Method for CreateRatePlan + * @param optional nil or *CreateRatePlanOpts - Optional Parameters: + * @param "DataEnabled" (bool) - Whether SIMs can use GPRS/3G/4G/LTE data connectivity. + * @param "DataLimit" (int32) - The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`. + * @param "DataMetering" (string) - The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans). + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It does not have to be unique. + * @param "InternationalRoaming" ([]string) - The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can be: `data`, `voice`, and `messaging`. + * @param "InternationalRoamingDataLimit" (int32) - The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. + * @param "MessagingEnabled" (bool) - Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource). + * @param "NationalRoamingDataLimit" (int32) - The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info. + * @param "NationalRoamingEnabled" (bool) - Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming). + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + * @param "VoiceEnabled" (bool) - Whether SIMs can make and receive voice calls. +@return WirelessV1RatePlan +*/ +func (c *DefaultApiService) CreateRatePlan(params *CreateRatePlanParams) (*WirelessV1RatePlan, error) { + path := "/v1/RatePlans" + + + data := url.Values{} + headers := 0 + + if params != nil && params.DataEnabled != nil { + data.Set("DataEnabled", fmt.Sprint(*params.DataEnabled)) + } + if params != nil && params.DataLimit != nil { + data.Set("DataLimit", fmt.Sprint(*params.DataLimit)) + } + if params != nil && params.DataMetering != nil { + data.Set("DataMetering", *params.DataMetering) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.InternationalRoaming != nil { + data.Set("InternationalRoaming", strings.Join(*params.InternationalRoaming, ",")) + } + if params != nil && params.InternationalRoamingDataLimit != nil { + data.Set("InternationalRoamingDataLimit", fmt.Sprint(*params.InternationalRoamingDataLimit)) + } + if params != nil && params.MessagingEnabled != nil { + data.Set("MessagingEnabled", fmt.Sprint(*params.MessagingEnabled)) + } + if params != nil && params.NationalRoamingDataLimit != nil { + data.Set("NationalRoamingDataLimit", fmt.Sprint(*params.NationalRoamingDataLimit)) + } + if params != nil && params.NationalRoamingEnabled != nil { + data.Set("NationalRoamingEnabled", fmt.Sprint(*params.NationalRoamingEnabled)) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceEnabled != nil { + data.Set("VoiceEnabled", fmt.Sprint(*params.VoiceEnabled)) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +DeleteCommand Method for DeleteCommand +Delete a Command instance from your account. + * @param Sid The SID of the Command resource to delete. +*/ +func (c *DefaultApiService) DeleteCommand(Sid string) (error) { + path := "/v1/Commands/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteRatePlan Method for DeleteRatePlan + * @param Sid The SID of the RatePlan resource to delete. +*/ +func (c *DefaultApiService) DeleteRatePlan(Sid string) (error) { + path := "/v1/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +DeleteSim Method for DeleteSim +Delete a Sim resource on your Account. + * @param Sid The SID or the `unique_name` of the Sim resource to delete. +*/ +func (c *DefaultApiService) DeleteSim(Sid string) (error) { + path := "/v1/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Delete(c.baseURL+path, data, headers) + if err != nil { + return err + } + + defer resp.Body.Close() + + return nil +} + +/* +FetchCommand Method for FetchCommand +Fetch a Command instance from your account. + * @param Sid The SID of the Command resource to fetch. +@return WirelessV1Command +*/ +func (c *DefaultApiService) FetchCommand(Sid string) (*WirelessV1Command, error) { + path := "/v1/Commands/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1Command{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchRatePlan Method for FetchRatePlan + * @param Sid The SID of the RatePlan resource to fetch. +@return WirelessV1RatePlan +*/ +func (c *DefaultApiService) FetchRatePlan(Sid string) (*WirelessV1RatePlan, error) { + path := "/v1/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} + +/* +FetchSim Method for FetchSim +Fetch a Sim resource on your Account. + * @param Sid The SID or the `unique_name` of the Sim resource to fetch. +@return WirelessV1Sim +*/ +func (c *DefaultApiService) FetchSim(Sid string) (*WirelessV1Sim, error) { + path := "/v1/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListAccountUsageRecordParams Optional parameters for the method 'ListAccountUsageRecord' +type ListAccountUsageRecordParams struct { + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListAccountUsageRecord Method for ListAccountUsageRecord + * @param optional nil or *ListAccountUsageRecordOpts - Optional Parameters: + * @param "End" (time.Time) - Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). + * @param "Start" (time.Time) - Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). + * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListAccountUsageRecordResponse +*/ +func (c *DefaultApiService) ListAccountUsageRecord(params *ListAccountUsageRecordParams) (*ListAccountUsageRecordResponse, error) { + path := "/v1/UsageRecords" + + + data := url.Values{} + headers := 0 + + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) + } + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListAccountUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListCommandParams Optional parameters for the method 'ListCommand' +type ListCommandParams struct { + Sim *string `json:"Sim,omitempty"` + Status *string `json:"Status,omitempty"` + Direction *string `json:"Direction,omitempty"` + Transport *string `json:"Transport,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListCommand Method for ListCommand +Retrieve a list of Commands from your account. + * @param optional nil or *ListCommandOpts - Optional Parameters: + * @param "Sim" (string) - The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/wireless/api/sim-resource) to read. + * @param "Status" (string) - The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`. + * @param "Direction" (string) - Only return Commands with this direction value. + * @param "Transport" (string) - Only return Commands with this transport value. Can be: `sms` or `ip`. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListCommandResponse +*/ +func (c *DefaultApiService) ListCommand(params *ListCommandParams) (*ListCommandResponse, error) { + path := "/v1/Commands" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Sim != nil { + data.Set("Sim", *params.Sim) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Direction != nil { + data.Set("Direction", *params.Direction) + } + if params != nil && params.Transport != nil { + data.Set("Transport", *params.Transport) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListCommandResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListDataSessionParams Optional parameters for the method 'ListDataSession' +type ListDataSessionParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListDataSession Method for ListDataSession + * @param SimSid The SID of the [Sim resource](https://www.twilio.com/docs/wireless/api/sim-resource) with the Data Sessions to read. + * @param optional nil or *ListDataSessionOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListDataSessionResponse +*/ +func (c *DefaultApiService) ListDataSession(SimSid string, params *ListDataSessionParams) (*ListDataSessionResponse, error) { + path := "/v1/Sims/{SimSid}/DataSessions" + path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListDataSessionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListRatePlanParams Optional parameters for the method 'ListRatePlan' +type ListRatePlanParams struct { + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListRatePlan Method for ListRatePlan + * @param optional nil or *ListRatePlanOpts - Optional Parameters: + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListRatePlanResponse +*/ +func (c *DefaultApiService) ListRatePlan(params *ListRatePlanParams) (*ListRatePlanResponse, error) { + path := "/v1/RatePlans" + + + data := url.Values{} + headers := 0 + + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListRatePlanResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListSimParams Optional parameters for the method 'ListSim' +type ListSimParams struct { + Status *string `json:"Status,omitempty"` + Iccid *string `json:"Iccid,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + EId *string `json:"EId,omitempty"` + SimRegistrationCode *string `json:"SimRegistrationCode,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListSim Method for ListSim +Retrieve a list of Sim resources on your Account. + * @param optional nil or *ListSimOpts - Optional Parameters: + * @param "Status" (string) - Only return Sim resources with this status. + * @param "Iccid" (string) - Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. + * @param "RatePlan" (string) - The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. + * @param "EId" (string) - Deprecated. + * @param "SimRegistrationCode" (string) - Only return Sim resources with this registration code. This will return a list with a maximum size of 1. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListSimResponse +*/ +func (c *DefaultApiService) ListSim(params *ListSimParams) (*ListSimResponse, error) { + path := "/v1/Sims" + + + data := url.Values{} + headers := 0 + + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.Iccid != nil { + data.Set("Iccid", *params.Iccid) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.EId != nil { + data.Set("EId", *params.EId) + } + if params != nil && params.SimRegistrationCode != nil { + data.Set("SimRegistrationCode", *params.SimRegistrationCode) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListSimResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// ListUsageRecordParams Optional parameters for the method 'ListUsageRecord' +type ListUsageRecordParams struct { + End *time.Time `json:"End,omitempty"` + Start *time.Time `json:"Start,omitempty"` + Granularity *string `json:"Granularity,omitempty"` + PageSize *int32 `json:"PageSize,omitempty"` +} + +/* +ListUsageRecord Method for ListUsageRecord + * @param SimSid The SID of the [Sim resource](https://www.twilio.com/docs/wireless/api/sim-resource) to read the usage from. + * @param optional nil or *ListUsageRecordOpts - Optional Parameters: + * @param "End" (time.Time) - Only include usage that occurred on or before this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is the current time. + * @param "Start" (time.Time) - Only include usage that has occurred on or after this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is one month before the `end` parameter value. + * @param "Granularity" (string) - How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. + * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. +@return ListUsageRecordResponse +*/ +func (c *DefaultApiService) ListUsageRecord(SimSid string, params *ListUsageRecordParams) (*ListUsageRecordResponse, error) { + path := "/v1/Sims/{SimSid}/UsageRecords" + path = strings.Replace(path, "{"+"SimSid"+"}", SimSid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.End != nil { + data.Set("End", fmt.Sprint(*params.End)) + } + if params != nil && params.Start != nil { + data.Set("Start", fmt.Sprint(*params.Start)) + } + if params != nil && params.Granularity != nil { + data.Set("Granularity", *params.Granularity) + } + if params != nil && params.PageSize != nil { + data.Set("PageSize", fmt.Sprint(*params.PageSize)) + } + + + resp, err := c.client.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &ListUsageRecordResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateRatePlanParams Optional parameters for the method 'UpdateRatePlan' +type UpdateRatePlanParams struct { + FriendlyName *string `json:"FriendlyName,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` +} + +/* +UpdateRatePlan Method for UpdateRatePlan + * @param Sid The SID of the RatePlan resource to update. + * @param optional nil or *UpdateRatePlanOpts - Optional Parameters: + * @param "FriendlyName" (string) - A descriptive string that you create to describe the resource. It does not have to be unique. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. +@return WirelessV1RatePlan +*/ +func (c *DefaultApiService) UpdateRatePlan(Sid string, params *UpdateRatePlanParams) (*WirelessV1RatePlan, error) { + path := "/v1/RatePlans/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1RatePlan{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} +// UpdateSimParams Optional parameters for the method 'UpdateSim' +type UpdateSimParams struct { + AccountSid *string `json:"AccountSid,omitempty"` + CallbackMethod *string `json:"CallbackMethod,omitempty"` + CallbackUrl *string `json:"CallbackUrl,omitempty"` + CommandsCallbackMethod *string `json:"CommandsCallbackMethod,omitempty"` + CommandsCallbackUrl *string `json:"CommandsCallbackUrl,omitempty"` + FriendlyName *string `json:"FriendlyName,omitempty"` + RatePlan *string `json:"RatePlan,omitempty"` + ResetStatus *string `json:"ResetStatus,omitempty"` + SmsFallbackMethod *string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl *string `json:"SmsFallbackUrl,omitempty"` + SmsMethod *string `json:"SmsMethod,omitempty"` + SmsUrl *string `json:"SmsUrl,omitempty"` + Status *string `json:"Status,omitempty"` + UniqueName *string `json:"UniqueName,omitempty"` + VoiceFallbackMethod *string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl *string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod *string `json:"VoiceMethod,omitempty"` + VoiceUrl *string `json:"VoiceUrl,omitempty"` +} + +/* +UpdateSim Method for UpdateSim +Updates the given properties of a Sim resource on your Account. + * @param Sid The SID or the `unique_name` of the Sim resource to update. + * @param optional nil or *UpdateSimOpts - Optional Parameters: + * @param "AccountSid" (string) - The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts). + * @param "CallbackMethod" (string) - The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`. + * @param "CallbackUrl" (string) - The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`). + * @param "CommandsCallbackMethod" (string) - The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`. + * @param "CommandsCallbackUrl" (string) - The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored. + * @param "FriendlyName" (string) - A descriptive string that you create to describe the Sim resource. It does not need to be unique. + * @param "RatePlan" (string) - The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned. + * @param "ResetStatus" (string) - Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid. + * @param "SmsFallbackMethod" (string) - The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`. + * @param "SmsFallbackUrl" (string) - The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`. + * @param "SmsMethod" (string) - The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`. + * @param "SmsUrl" (string) - The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource). + * @param "Status" (string) - The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`. + * @param "UniqueName" (string) - An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource. + * @param "VoiceFallbackMethod" (string) - The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + * @param "VoiceFallbackUrl" (string) - The URL we should call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`. + * @param "VoiceMethod" (string) - The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. + * @param "VoiceUrl" (string) - The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. +@return WirelessV1Sim +*/ +func (c *DefaultApiService) UpdateSim(Sid string, params *UpdateSimParams) (*WirelessV1Sim, error) { + path := "/v1/Sims/{Sid}" + path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) + + + data := url.Values{} + headers := 0 + + if params != nil && params.AccountSid != nil { + data.Set("AccountSid", *params.AccountSid) + } + if params != nil && params.CallbackMethod != nil { + data.Set("CallbackMethod", *params.CallbackMethod) + } + if params != nil && params.CallbackUrl != nil { + data.Set("CallbackUrl", *params.CallbackUrl) + } + if params != nil && params.CommandsCallbackMethod != nil { + data.Set("CommandsCallbackMethod", *params.CommandsCallbackMethod) + } + if params != nil && params.CommandsCallbackUrl != nil { + data.Set("CommandsCallbackUrl", *params.CommandsCallbackUrl) + } + if params != nil && params.FriendlyName != nil { + data.Set("FriendlyName", *params.FriendlyName) + } + if params != nil && params.RatePlan != nil { + data.Set("RatePlan", *params.RatePlan) + } + if params != nil && params.ResetStatus != nil { + data.Set("ResetStatus", *params.ResetStatus) + } + if params != nil && params.SmsFallbackMethod != nil { + data.Set("SmsFallbackMethod", *params.SmsFallbackMethod) + } + if params != nil && params.SmsFallbackUrl != nil { + data.Set("SmsFallbackUrl", *params.SmsFallbackUrl) + } + if params != nil && params.SmsMethod != nil { + data.Set("SmsMethod", *params.SmsMethod) + } + if params != nil && params.SmsUrl != nil { + data.Set("SmsUrl", *params.SmsUrl) + } + if params != nil && params.Status != nil { + data.Set("Status", *params.Status) + } + if params != nil && params.UniqueName != nil { + data.Set("UniqueName", *params.UniqueName) + } + if params != nil && params.VoiceFallbackMethod != nil { + data.Set("VoiceFallbackMethod", *params.VoiceFallbackMethod) + } + if params != nil && params.VoiceFallbackUrl != nil { + data.Set("VoiceFallbackUrl", *params.VoiceFallbackUrl) + } + if params != nil && params.VoiceMethod != nil { + data.Set("VoiceMethod", *params.VoiceMethod) + } + if params != nil && params.VoiceUrl != nil { + data.Set("VoiceUrl", *params.VoiceUrl) + } + + + resp, err := c.client.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + + ps := &WirelessV1Sim{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err +} diff --git a/rest/wireless/v1/docs/CreateCommandRequest.md b/rest/wireless/v1/docs/CreateCommandRequest.md new file mode 100644 index 000000000..3b50c6a5e --- /dev/null +++ b/rest/wireless/v1/docs/CreateCommandRequest.md @@ -0,0 +1,17 @@ +# CreateCommandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackMethod** | **string** | The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. | [optional] +**CallbackUrl** | **string** | The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. | [optional] +**Command** | **string** | The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode. | +**CommandMode** | **string** | The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`. | [optional] +**DeliveryReceiptRequested** | **bool** | Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. | [optional] +**IncludeSid** | **string** | Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. | [optional] +**Sim** | **string** | The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/CreateRatePlanRequest.md b/rest/wireless/v1/docs/CreateRatePlanRequest.md new file mode 100644 index 000000000..d5930a5e5 --- /dev/null +++ b/rest/wireless/v1/docs/CreateRatePlanRequest.md @@ -0,0 +1,21 @@ +# CreateRatePlanRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataEnabled** | **bool** | Whether SIMs can use GPRS/3G/4G/LTE data connectivity. | [optional] +**DataLimit** | **int32** | The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`. | [optional] +**DataMetering** | **string** | The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans). | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It does not have to be unique. | [optional] +**InternationalRoaming** | **[]string** | The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can be: `data`, `voice`, and `messaging`. | [optional] +**InternationalRoamingDataLimit** | **int32** | The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. | [optional] +**MessagingEnabled** | **bool** | Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource). | [optional] +**NationalRoamingDataLimit** | **int32** | The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info. | [optional] +**NationalRoamingEnabled** | **bool** | Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming). | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] +**VoiceEnabled** | **bool** | Whether SIMs can make and receive voice calls. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/DefaultApi.md b/rest/wireless/v1/docs/DefaultApi.md new file mode 100644 index 000000000..97f26d382 --- /dev/null +++ b/rest/wireless/v1/docs/DefaultApi.md @@ -0,0 +1,699 @@ +# \DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCommand**](DefaultApi.md#CreateCommand) | **Post** /v1/Commands | +[**CreateRatePlan**](DefaultApi.md#CreateRatePlan) | **Post** /v1/RatePlans | +[**DeleteCommand**](DefaultApi.md#DeleteCommand) | **Delete** /v1/Commands/{Sid} | +[**DeleteRatePlan**](DefaultApi.md#DeleteRatePlan) | **Delete** /v1/RatePlans/{Sid} | +[**DeleteSim**](DefaultApi.md#DeleteSim) | **Delete** /v1/Sims/{Sid} | +[**FetchCommand**](DefaultApi.md#FetchCommand) | **Get** /v1/Commands/{Sid} | +[**FetchRatePlan**](DefaultApi.md#FetchRatePlan) | **Get** /v1/RatePlans/{Sid} | +[**FetchSim**](DefaultApi.md#FetchSim) | **Get** /v1/Sims/{Sid} | +[**ListAccountUsageRecord**](DefaultApi.md#ListAccountUsageRecord) | **Get** /v1/UsageRecords | +[**ListCommand**](DefaultApi.md#ListCommand) | **Get** /v1/Commands | +[**ListDataSession**](DefaultApi.md#ListDataSession) | **Get** /v1/Sims/{SimSid}/DataSessions | +[**ListRatePlan**](DefaultApi.md#ListRatePlan) | **Get** /v1/RatePlans | +[**ListSim**](DefaultApi.md#ListSim) | **Get** /v1/Sims | +[**ListUsageRecord**](DefaultApi.md#ListUsageRecord) | **Get** /v1/Sims/{SimSid}/UsageRecords | +[**UpdateRatePlan**](DefaultApi.md#UpdateRatePlan) | **Post** /v1/RatePlans/{Sid} | +[**UpdateSim**](DefaultApi.md#UpdateSim) | **Post** /v1/Sims/{Sid} | + + + +## CreateCommand + +> WirelessV1Command CreateCommand(ctx, optional) + + + +Send a Command to a Sim. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **CallbackMethod** | **optional.String**| The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. | + **CallbackUrl** | **optional.String**| The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. | + **Command** | **optional.String**| The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode. | + **CommandMode** | **optional.String**| The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`. | + **DeliveryReceiptRequested** | **optional.Bool**| Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. | + **IncludeSid** | **optional.String**| Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. | + **Sim** | **optional.String**| The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. | + +### Return type + +[**WirelessV1Command**](wireless.v1.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRatePlan + +> WirelessV1RatePlan CreateRatePlan(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CreateRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a CreateRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **DataEnabled** | **optional.Bool**| Whether SIMs can use GPRS/3G/4G/LTE data connectivity. | + **DataLimit** | **optional.Int32**| The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`. | + **DataMetering** | **optional.String**| The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans). | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It does not have to be unique. | + **InternationalRoaming** | [**optional.Interface of []string**](string.md)| The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can be: `data`, `voice`, and `messaging`. | + **InternationalRoamingDataLimit** | **optional.Int32**| The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. | + **MessagingEnabled** | **optional.Bool**| Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource). | + **NationalRoamingDataLimit** | **optional.Int32**| The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info. | + **NationalRoamingEnabled** | **optional.Bool**| Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming). | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + **VoiceEnabled** | **optional.Bool**| Whether SIMs can make and receive voice calls. | + +### Return type + +[**WirelessV1RatePlan**](wireless.v1.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCommand + +> DeleteCommand(ctx, Sid) + + + +Delete a Command instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Command resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRatePlan + +> DeleteRatePlan(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the RatePlan resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteSim + +> DeleteSim(ctx, Sid) + + + +Delete a Sim resource on your Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID or the `unique_name` of the Sim resource to delete. | + +### Return type + + (empty response body) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchCommand + +> WirelessV1Command FetchCommand(ctx, Sid) + + + +Fetch a Command instance from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the Command resource to fetch. | + +### Return type + +[**WirelessV1Command**](wireless.v1.command.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchRatePlan + +> WirelessV1RatePlan FetchRatePlan(ctx, Sid) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the RatePlan resource to fetch. | + +### Return type + +[**WirelessV1RatePlan**](wireless.v1.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## FetchSim + +> WirelessV1Sim FetchSim(ctx, Sid) + + + +Fetch a Sim resource on your Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID or the `unique_name` of the Sim resource to fetch. | + +### Return type + +[**WirelessV1Sim**](wireless.v1.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAccountUsageRecord + +> ListAccountUsageRecordResponse ListAccountUsageRecord(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListAccountUsageRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListAccountUsageRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **End** | **optional.Time**| Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). | + **Start** | **optional.Time**| Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). | + **Granularity** | **optional.String**| How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListAccountUsageRecordResponse**](ListAccountUsageRecordResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCommand + +> ListCommandResponse ListCommand(ctx, optional) + + + +Retrieve a list of Commands from your account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListCommandOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListCommandOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Sim** | **optional.String**| The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/wireless/api/sim-resource) to read. | + **Status** | **optional.String**| The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`. | + **Direction** | **optional.String**| Only return Commands with this direction value. | + **Transport** | **optional.String**| Only return Commands with this transport value. Can be: `sms` or `ip`. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListCommandResponse**](ListCommandResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDataSession + +> ListDataSessionResponse ListDataSession(ctx, SimSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SimSid** | **string**| The SID of the [Sim resource](https://www.twilio.com/docs/wireless/api/sim-resource) with the Data Sessions to read. | + **optional** | ***ListDataSessionOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListDataSessionOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListDataSessionResponse**](ListDataSessionResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRatePlan + +> ListRatePlanResponse ListRatePlan(ctx, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListRatePlanResponse**](ListRatePlanResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListSim + +> ListSimResponse ListSim(ctx, optional) + + + +Retrieve a list of Sim resources on your Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***ListSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Status** | **optional.String**| Only return Sim resources with this status. | + **Iccid** | **optional.String**| Only return Sim resources with this ICCID. This will return a list with a maximum size of 1. | + **RatePlan** | **optional.String**| The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource. | + **EId** | **optional.String**| Deprecated. | + **SimRegistrationCode** | **optional.String**| Only return Sim resources with this registration code. This will return a list with a maximum size of 1. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListSimResponse**](ListSimResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsageRecord + +> ListUsageRecordResponse ListUsageRecord(ctx, SimSid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SimSid** | **string**| The SID of the [Sim resource](https://www.twilio.com/docs/wireless/api/sim-resource) to read the usage from. | + **optional** | ***ListUsageRecordOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a ListUsageRecordOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **End** | **optional.Time**| Only include usage that occurred on or before this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is the current time. | + **Start** | **optional.Time**| Only include usage that has occurred on or after this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is one month before the `end` parameter value. | + **Granularity** | **optional.String**| How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. | + **PageSize** | **optional.Int32**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | + +### Return type + +[**ListUsageRecordResponse**](ListUsageRecordResponse.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRatePlan + +> WirelessV1RatePlan UpdateRatePlan(ctx, Sid, optional) + + + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID of the RatePlan resource to update. | + **optional** | ***UpdateRatePlanOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateRatePlanOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the resource. It does not have to be unique. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | + +### Return type + +[**WirelessV1RatePlan**](wireless.v1.rate_plan.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSim + +> WirelessV1Sim UpdateSim(ctx, Sid, optional) + + + +Updates the given properties of a Sim resource on your Account. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Sid** | **string**| The SID or the `unique_name` of the Sim resource to update. | + **optional** | ***UpdateSimOpts** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a pointer to a UpdateSimOpts struct + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **AccountSid** | **optional.String**| The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts). | + **CallbackMethod** | **optional.String**| The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`. | + **CallbackUrl** | **optional.String**| The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`). | + **CommandsCallbackMethod** | **optional.String**| The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`. | + **CommandsCallbackUrl** | **optional.String**| The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored. | + **FriendlyName** | **optional.String**| A descriptive string that you create to describe the Sim resource. It does not need to be unique. | + **RatePlan** | **optional.String**| The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned. | + **ResetStatus** | **optional.String**| Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid. | + **SmsFallbackMethod** | **optional.String**| The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`. | + **SmsFallbackUrl** | **optional.String**| The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`. | + **SmsMethod** | **optional.String**| The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`. | + **SmsUrl** | **optional.String**| The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource). | + **Status** | **optional.String**| The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`. | + **UniqueName** | **optional.String**| An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource. | + **VoiceFallbackMethod** | **optional.String**| The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | + **VoiceFallbackUrl** | **optional.String**| The URL we should call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`. | + **VoiceMethod** | **optional.String**| The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. | + **VoiceUrl** | **optional.String**| The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. | + +### Return type + +[**WirelessV1Sim**](wireless.v1.sim.md) + +### Authorization + +[accountSid_authToken](../README.md#accountSid_authToken) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md b/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md new file mode 100644 index 000000000..3e25b1e86 --- /dev/null +++ b/rest/wireless/v1/docs/ListAccountUsageRecordResponse.md @@ -0,0 +1,12 @@ +# ListAccountUsageRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**UsageRecords** | [**[]WirelessV1AccountUsageRecord**](wireless.v1.account_usage_record.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListCommandResponse.md b/rest/wireless/v1/docs/ListCommandResponse.md new file mode 100644 index 000000000..3f8f78ec9 --- /dev/null +++ b/rest/wireless/v1/docs/ListCommandResponse.md @@ -0,0 +1,12 @@ +# ListCommandResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Commands** | [**[]WirelessV1Command**](wireless.v1.command.md) | | [optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListCommandResponseMeta.md b/rest/wireless/v1/docs/ListCommandResponseMeta.md new file mode 100644 index 000000000..84838a66c --- /dev/null +++ b/rest/wireless/v1/docs/ListCommandResponseMeta.md @@ -0,0 +1,17 @@ +# ListCommandResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstPageUrl** | **string** | | [optional] +**Key** | **string** | | [optional] +**NextPageUrl** | **string** | | [optional] +**Page** | **int32** | | [optional] +**PageSize** | **int32** | | [optional] +**PreviousPageUrl** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListDataSessionResponse.md b/rest/wireless/v1/docs/ListDataSessionResponse.md new file mode 100644 index 000000000..228a0b5d3 --- /dev/null +++ b/rest/wireless/v1/docs/ListDataSessionResponse.md @@ -0,0 +1,12 @@ +# ListDataSessionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataSessions** | [**[]WirelessV1SimDataSession**](wireless.v1.sim.data_session.md) | | [optional] +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListRatePlanResponse.md b/rest/wireless/v1/docs/ListRatePlanResponse.md new file mode 100644 index 000000000..54e75bb94 --- /dev/null +++ b/rest/wireless/v1/docs/ListRatePlanResponse.md @@ -0,0 +1,12 @@ +# ListRatePlanResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**RatePlans** | [**[]WirelessV1RatePlan**](wireless.v1.rate_plan.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListSimResponse.md b/rest/wireless/v1/docs/ListSimResponse.md new file mode 100644 index 000000000..e75a0d25c --- /dev/null +++ b/rest/wireless/v1/docs/ListSimResponse.md @@ -0,0 +1,12 @@ +# ListSimResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**Sims** | [**[]WirelessV1Sim**](wireless.v1.sim.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/ListUsageRecordResponse.md b/rest/wireless/v1/docs/ListUsageRecordResponse.md new file mode 100644 index 000000000..c952ba802 --- /dev/null +++ b/rest/wireless/v1/docs/ListUsageRecordResponse.md @@ -0,0 +1,12 @@ +# ListUsageRecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Meta** | [**ListCommandResponseMeta**](ListCommandResponse_meta.md) | | [optional] +**UsageRecords** | [**[]WirelessV1SimUsageRecord**](wireless.v1.sim.usage_record.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/UpdateRatePlanRequest.md b/rest/wireless/v1/docs/UpdateRatePlanRequest.md new file mode 100644 index 000000000..a7573d683 --- /dev/null +++ b/rest/wireless/v1/docs/UpdateRatePlanRequest.md @@ -0,0 +1,12 @@ +# UpdateRatePlanRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | A descriptive string that you create to describe the resource. It does not have to be unique. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/UpdateSimRequest.md b/rest/wireless/v1/docs/UpdateSimRequest.md new file mode 100644 index 000000000..a02d0e5a2 --- /dev/null +++ b/rest/wireless/v1/docs/UpdateSimRequest.md @@ -0,0 +1,28 @@ +# UpdateSimRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts). | [optional] +**CallbackMethod** | **string** | The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`. | [optional] +**CallbackUrl** | **string** | The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`). | [optional] +**CommandsCallbackMethod** | **string** | The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`. | [optional] +**CommandsCallbackUrl** | **string** | The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored. | [optional] +**FriendlyName** | **string** | A descriptive string that you create to describe the Sim resource. It does not need to be unique. | [optional] +**RatePlan** | **string** | The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned. | [optional] +**ResetStatus** | **string** | Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid. | [optional] +**SmsFallbackMethod** | **string** | The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`. | [optional] +**SmsFallbackUrl** | **string** | The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`. | [optional] +**SmsMethod** | **string** | The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`. | [optional] +**SmsUrl** | **string** | The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource). | [optional] +**Status** | **string** | The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`. | [optional] +**UniqueName** | **string** | An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource. | [optional] +**VoiceFallbackMethod** | **string** | The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. | [optional] +**VoiceFallbackUrl** | **string** | The URL we should call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`. | [optional] +**VoiceMethod** | **string** | The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. | [optional] +**VoiceUrl** | **string** | The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md b/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md new file mode 100644 index 000000000..be9a2e9e5 --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1AccountUsageRecord.md @@ -0,0 +1,14 @@ +# WirelessV1AccountUsageRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Commands** | [**map[string]interface{}**](.md) | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Period** | [**map[string]interface{}**](.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1Command.md b/rest/wireless/v1/docs/WirelessV1Command.md new file mode 100644 index 000000000..280f88986 --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1Command.md @@ -0,0 +1,22 @@ +# WirelessV1Command + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Command** | **string** | | [optional] +**CommandMode** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**DeliveryReceiptRequested** | **bool** | | [optional] +**Direction** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SimSid** | **string** | | [optional] +**Status** | **string** | | [optional] +**Transport** | **string** | | [optional] +**Url** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1RatePlan.md b/rest/wireless/v1/docs/WirelessV1RatePlan.md new file mode 100644 index 000000000..ba2d81d18 --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1RatePlan.md @@ -0,0 +1,26 @@ +# WirelessV1RatePlan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**DataEnabled** | **bool** | | [optional] +**DataLimit** | **int32** | | [optional] +**DataMetering** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**FriendlyName** | **string** | | [optional] +**InternationalRoaming** | **[]string** | | [optional] +**InternationalRoamingDataLimit** | **int32** | | [optional] +**MessagingEnabled** | **bool** | | [optional] +**NationalRoamingDataLimit** | **int32** | | [optional] +**NationalRoamingEnabled** | **bool** | | [optional] +**Sid** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceEnabled** | **bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1Sim.md b/rest/wireless/v1/docs/WirelessV1Sim.md new file mode 100644 index 000000000..38ad1dd21 --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1Sim.md @@ -0,0 +1,34 @@ +# WirelessV1Sim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CommandsCallbackMethod** | **string** | | [optional] +**CommandsCallbackUrl** | **string** | | [optional] +**DateCreated** | [**time.Time**](time.Time.md) | | [optional] +**DateUpdated** | [**time.Time**](time.Time.md) | | [optional] +**EId** | **string** | | [optional] +**FriendlyName** | **string** | | [optional] +**Iccid** | **string** | | [optional] +**IpAddress** | **string** | | [optional] +**Links** | [**map[string]interface{}**](.md) | | [optional] +**RatePlanSid** | **string** | | [optional] +**ResetStatus** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SmsFallbackMethod** | **string** | | [optional] +**SmsFallbackUrl** | **string** | | [optional] +**SmsMethod** | **string** | | [optional] +**SmsUrl** | **string** | | [optional] +**Status** | **string** | | [optional] +**UniqueName** | **string** | | [optional] +**Url** | **string** | | [optional] +**VoiceFallbackMethod** | **string** | | [optional] +**VoiceFallbackUrl** | **string** | | [optional] +**VoiceMethod** | **string** | | [optional] +**VoiceUrl** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1SimDataSession.md b/rest/wireless/v1/docs/WirelessV1SimDataSession.md new file mode 100644 index 000000000..82e9d74cc --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1SimDataSession.md @@ -0,0 +1,26 @@ +# WirelessV1SimDataSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**CellId** | **string** | | [optional] +**CellLocationEstimate** | [**map[string]interface{}**](.md) | | [optional] +**End** | [**time.Time**](time.Time.md) | | [optional] +**Imei** | **string** | | [optional] +**LastUpdated** | [**time.Time**](time.Time.md) | | [optional] +**OperatorCountry** | **string** | | [optional] +**OperatorMcc** | **string** | | [optional] +**OperatorMnc** | **string** | | [optional] +**OperatorName** | **string** | | [optional] +**PacketsDownloaded** | **int32** | | [optional] +**PacketsUploaded** | **int32** | | [optional] +**RadioLink** | **string** | | [optional] +**Sid** | **string** | | [optional] +**SimSid** | **string** | | [optional] +**Start** | [**time.Time**](time.Time.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md b/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md new file mode 100644 index 000000000..23c85a6e1 --- /dev/null +++ b/rest/wireless/v1/docs/WirelessV1SimUsageRecord.md @@ -0,0 +1,15 @@ +# WirelessV1SimUsageRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountSid** | **string** | | [optional] +**Commands** | [**map[string]interface{}**](.md) | | [optional] +**Data** | [**map[string]interface{}**](.md) | | [optional] +**Period** | [**map[string]interface{}**](.md) | | [optional] +**SimSid** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/wireless/v1/model_create_command_request.go b/rest/wireless/v1/model_create_command_request.go new file mode 100644 index 000000000..625b42019 --- /dev/null +++ b/rest/wireless/v1/model_create_command_request.go @@ -0,0 +1,28 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateCommandRequest struct for CreateCommandRequest +type CreateCommandRequest struct { + // The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed. + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode. + Command string `json:"Command"` + // The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`. + CommandMode string `json:"CommandMode,omitempty"` + // Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`. + DeliveryReceiptRequested bool `json:"DeliveryReceiptRequested,omitempty"` + // Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included. + IncludeSid string `json:"IncludeSid,omitempty"` + // The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to. + Sim string `json:"Sim,omitempty"` +} diff --git a/rest/wireless/v1/model_create_rate_plan_request.go b/rest/wireless/v1/model_create_rate_plan_request.go new file mode 100644 index 000000000..be10e4b0c --- /dev/null +++ b/rest/wireless/v1/model_create_rate_plan_request.go @@ -0,0 +1,36 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// CreateRatePlanRequest struct for CreateRatePlanRequest +type CreateRatePlanRequest struct { + // Whether SIMs can use GPRS/3G/4G/LTE data connectivity. + DataEnabled bool `json:"DataEnabled,omitempty"` + // The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`. + DataLimit int32 `json:"DataLimit,omitempty"` + // The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans). + DataMetering string `json:"DataMetering,omitempty"` + // A descriptive string that you create to describe the resource. It does not have to be unique. + FriendlyName string `json:"FriendlyName,omitempty"` + // The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can be: `data`, `voice`, and `messaging`. + InternationalRoaming []string `json:"InternationalRoaming,omitempty"` + // The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB. + InternationalRoamingDataLimit int32 `json:"InternationalRoamingDataLimit,omitempty"` + // Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource). + MessagingEnabled bool `json:"MessagingEnabled,omitempty"` + // The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info. + NationalRoamingDataLimit int32 `json:"NationalRoamingDataLimit,omitempty"` + // Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming). + NationalRoamingEnabled bool `json:"NationalRoamingEnabled,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` + // Whether SIMs can make and receive voice calls. + VoiceEnabled bool `json:"VoiceEnabled,omitempty"` +} diff --git a/rest/wireless/v1/model_list_account_usage_record_response.go b/rest/wireless/v1/model_list_account_usage_record_response.go new file mode 100644 index 000000000..a244c3181 --- /dev/null +++ b/rest/wireless/v1/model_list_account_usage_record_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListAccountUsageRecordResponse struct for ListAccountUsageRecordResponse +type ListAccountUsageRecordResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + UsageRecords []WirelessV1AccountUsageRecord `json:"UsageRecords,omitempty"` +} diff --git a/rest/wireless/v1/model_list_command_response.go b/rest/wireless/v1/model_list_command_response.go new file mode 100644 index 000000000..8a69f92f7 --- /dev/null +++ b/rest/wireless/v1/model_list_command_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCommandResponse struct for ListCommandResponse +type ListCommandResponse struct { + Commands []WirelessV1Command `json:"Commands,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/wireless/v1/model_list_command_response_meta.go b/rest/wireless/v1/model_list_command_response_meta.go new file mode 100644 index 000000000..741744570 --- /dev/null +++ b/rest/wireless/v1/model_list_command_response_meta.go @@ -0,0 +1,21 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListCommandResponseMeta struct for ListCommandResponseMeta +type ListCommandResponseMeta struct { + FirstPageUrl string `json:"FirstPageUrl,omitempty"` + Key string `json:"Key,omitempty"` + NextPageUrl string `json:"NextPageUrl,omitempty"` + Page int32 `json:"Page,omitempty"` + PageSize int32 `json:"PageSize,omitempty"` + PreviousPageUrl string `json:"PreviousPageUrl,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/wireless/v1/model_list_data_session_response.go b/rest/wireless/v1/model_list_data_session_response.go new file mode 100644 index 000000000..989c39bbf --- /dev/null +++ b/rest/wireless/v1/model_list_data_session_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListDataSessionResponse struct for ListDataSessionResponse +type ListDataSessionResponse struct { + DataSessions []WirelessV1SimDataSession `json:"DataSessions,omitempty"` + Meta ListCommandResponseMeta `json:"Meta,omitempty"` +} diff --git a/rest/wireless/v1/model_list_rate_plan_response.go b/rest/wireless/v1/model_list_rate_plan_response.go new file mode 100644 index 000000000..2f8aa79fd --- /dev/null +++ b/rest/wireless/v1/model_list_rate_plan_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListRatePlanResponse struct for ListRatePlanResponse +type ListRatePlanResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + RatePlans []WirelessV1RatePlan `json:"RatePlans,omitempty"` +} diff --git a/rest/wireless/v1/model_list_sim_response.go b/rest/wireless/v1/model_list_sim_response.go new file mode 100644 index 000000000..9488b98c7 --- /dev/null +++ b/rest/wireless/v1/model_list_sim_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListSimResponse struct for ListSimResponse +type ListSimResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + Sims []WirelessV1Sim `json:"Sims,omitempty"` +} diff --git a/rest/wireless/v1/model_list_usage_record_response.go b/rest/wireless/v1/model_list_usage_record_response.go new file mode 100644 index 000000000..30e6fe4d8 --- /dev/null +++ b/rest/wireless/v1/model_list_usage_record_response.go @@ -0,0 +1,16 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// ListUsageRecordResponse struct for ListUsageRecordResponse +type ListUsageRecordResponse struct { + Meta ListCommandResponseMeta `json:"Meta,omitempty"` + UsageRecords []WirelessV1SimUsageRecord `json:"UsageRecords,omitempty"` +} diff --git a/rest/wireless/v1/model_update_rate_plan_request.go b/rest/wireless/v1/model_update_rate_plan_request.go new file mode 100644 index 000000000..e763477c4 --- /dev/null +++ b/rest/wireless/v1/model_update_rate_plan_request.go @@ -0,0 +1,18 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateRatePlanRequest struct for UpdateRatePlanRequest +type UpdateRatePlanRequest struct { + // A descriptive string that you create to describe the resource. It does not have to be unique. + FriendlyName string `json:"FriendlyName,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource. + UniqueName string `json:"UniqueName,omitempty"` +} diff --git a/rest/wireless/v1/model_update_sim_request.go b/rest/wireless/v1/model_update_sim_request.go new file mode 100644 index 000000000..fff3a9c01 --- /dev/null +++ b/rest/wireless/v1/model_update_sim_request.go @@ -0,0 +1,50 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// UpdateSimRequest struct for UpdateSimRequest +type UpdateSimRequest struct { + // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts). + AccountSid string `json:"AccountSid,omitempty"` + // The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`. + CallbackMethod string `json:"CallbackMethod,omitempty"` + // The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`). + CallbackUrl string `json:"CallbackUrl,omitempty"` + // The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`. + CommandsCallbackMethod string `json:"CommandsCallbackMethod,omitempty"` + // The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored. + CommandsCallbackUrl string `json:"CommandsCallbackUrl,omitempty"` + // A descriptive string that you create to describe the Sim resource. It does not need to be unique. + FriendlyName string `json:"FriendlyName,omitempty"` + // The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned. + RatePlan string `json:"RatePlan,omitempty"` + // Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid. + ResetStatus string `json:"ResetStatus,omitempty"` + // The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`. + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + // The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`. + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + // The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`. + SmsMethod string `json:"SmsMethod,omitempty"` + // The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource). + SmsUrl string `json:"SmsUrl,omitempty"` + // The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`. + Status string `json:"Status,omitempty"` + // An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource. + UniqueName string `json:"UniqueName,omitempty"` + // The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`. + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + // The URL we should call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`. + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + // The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`. + VoiceMethod string `json:"VoiceMethod,omitempty"` + // The URL we should call using the `voice_method` when the SIM-connected device makes a voice call. + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_account_usage_record.go b/rest/wireless/v1/model_wireless_v1_account_usage_record.go new file mode 100644 index 000000000..a99342f8a --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_account_usage_record.go @@ -0,0 +1,18 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// WirelessV1AccountUsageRecord struct for WirelessV1AccountUsageRecord +type WirelessV1AccountUsageRecord struct { + AccountSid string `json:"AccountSid,omitempty"` + Commands map[string]interface{} `json:"Commands,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Period map[string]interface{} `json:"Period,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_command.go b/rest/wireless/v1/model_wireless_v1_command.go new file mode 100644 index 000000000..440ed8a15 --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_command.go @@ -0,0 +1,29 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// WirelessV1Command struct for WirelessV1Command +type WirelessV1Command struct { + AccountSid string `json:"AccountSid,omitempty"` + Command string `json:"Command,omitempty"` + CommandMode string `json:"CommandMode,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + DeliveryReceiptRequested bool `json:"DeliveryReceiptRequested,omitempty"` + Direction string `json:"Direction,omitempty"` + Sid string `json:"Sid,omitempty"` + SimSid string `json:"SimSid,omitempty"` + Status string `json:"Status,omitempty"` + Transport string `json:"Transport,omitempty"` + Url string `json:"Url,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_rate_plan.go b/rest/wireless/v1/model_wireless_v1_rate_plan.go new file mode 100644 index 000000000..3e4c9abe9 --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_rate_plan.go @@ -0,0 +1,33 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// WirelessV1RatePlan struct for WirelessV1RatePlan +type WirelessV1RatePlan struct { + AccountSid string `json:"AccountSid,omitempty"` + DataEnabled bool `json:"DataEnabled,omitempty"` + DataLimit int32 `json:"DataLimit,omitempty"` + DataMetering string `json:"DataMetering,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + InternationalRoaming []string `json:"InternationalRoaming,omitempty"` + InternationalRoamingDataLimit int32 `json:"InternationalRoamingDataLimit,omitempty"` + MessagingEnabled bool `json:"MessagingEnabled,omitempty"` + NationalRoamingDataLimit int32 `json:"NationalRoamingDataLimit,omitempty"` + NationalRoamingEnabled bool `json:"NationalRoamingEnabled,omitempty"` + Sid string `json:"Sid,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VoiceEnabled bool `json:"VoiceEnabled,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_sim.go b/rest/wireless/v1/model_wireless_v1_sim.go new file mode 100644 index 000000000..9ee14a754 --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_sim.go @@ -0,0 +1,41 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// WirelessV1Sim struct for WirelessV1Sim +type WirelessV1Sim struct { + AccountSid string `json:"AccountSid,omitempty"` + CommandsCallbackMethod string `json:"CommandsCallbackMethod,omitempty"` + CommandsCallbackUrl string `json:"CommandsCallbackUrl,omitempty"` + DateCreated time.Time `json:"DateCreated,omitempty"` + DateUpdated time.Time `json:"DateUpdated,omitempty"` + EId string `json:"EId,omitempty"` + FriendlyName string `json:"FriendlyName,omitempty"` + Iccid string `json:"Iccid,omitempty"` + IpAddress string `json:"IpAddress,omitempty"` + Links map[string]interface{} `json:"Links,omitempty"` + RatePlanSid string `json:"RatePlanSid,omitempty"` + ResetStatus string `json:"ResetStatus,omitempty"` + Sid string `json:"Sid,omitempty"` + SmsFallbackMethod string `json:"SmsFallbackMethod,omitempty"` + SmsFallbackUrl string `json:"SmsFallbackUrl,omitempty"` + SmsMethod string `json:"SmsMethod,omitempty"` + SmsUrl string `json:"SmsUrl,omitempty"` + Status string `json:"Status,omitempty"` + UniqueName string `json:"UniqueName,omitempty"` + Url string `json:"Url,omitempty"` + VoiceFallbackMethod string `json:"VoiceFallbackMethod,omitempty"` + VoiceFallbackUrl string `json:"VoiceFallbackUrl,omitempty"` + VoiceMethod string `json:"VoiceMethod,omitempty"` + VoiceUrl string `json:"VoiceUrl,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_sim_data_session.go b/rest/wireless/v1/model_wireless_v1_sim_data_session.go new file mode 100644 index 000000000..1aa471e8e --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_sim_data_session.go @@ -0,0 +1,33 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +import ( + "time" +) +// WirelessV1SimDataSession struct for WirelessV1SimDataSession +type WirelessV1SimDataSession struct { + AccountSid string `json:"AccountSid,omitempty"` + CellId string `json:"CellId,omitempty"` + CellLocationEstimate map[string]interface{} `json:"CellLocationEstimate,omitempty"` + End time.Time `json:"End,omitempty"` + Imei string `json:"Imei,omitempty"` + LastUpdated time.Time `json:"LastUpdated,omitempty"` + OperatorCountry string `json:"OperatorCountry,omitempty"` + OperatorMcc string `json:"OperatorMcc,omitempty"` + OperatorMnc string `json:"OperatorMnc,omitempty"` + OperatorName string `json:"OperatorName,omitempty"` + PacketsDownloaded int32 `json:"PacketsDownloaded,omitempty"` + PacketsUploaded int32 `json:"PacketsUploaded,omitempty"` + RadioLink string `json:"RadioLink,omitempty"` + Sid string `json:"Sid,omitempty"` + SimSid string `json:"SimSid,omitempty"` + Start time.Time `json:"Start,omitempty"` +} diff --git a/rest/wireless/v1/model_wireless_v1_sim_usage_record.go b/rest/wireless/v1/model_wireless_v1_sim_usage_record.go new file mode 100644 index 000000000..dc57fafd3 --- /dev/null +++ b/rest/wireless/v1/model_wireless_v1_sim_usage_record.go @@ -0,0 +1,19 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi +// WirelessV1SimUsageRecord struct for WirelessV1SimUsageRecord +type WirelessV1SimUsageRecord struct { + AccountSid string `json:"AccountSid,omitempty"` + Commands map[string]interface{} `json:"Commands,omitempty"` + Data map[string]interface{} `json:"Data,omitempty"` + Period map[string]interface{} `json:"Period,omitempty"` + SimSid string `json:"SimSid,omitempty"` +} diff --git a/rest/wireless/v1/response.go b/rest/wireless/v1/response.go new file mode 100644 index 000000000..8ceedd273 --- /dev/null +++ b/rest/wireless/v1/response.go @@ -0,0 +1,45 @@ +/* + * Twilio - Wireless + * + * This is the public Twilio REST API. + * + * API version: 1.0.0 + * Contact: support@twilio.com + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/studio/v2/.openapi-generator/FILES b/studio/v2/.openapi-generator/FILES deleted file mode 100644 index 6c91cd792..000000000 --- a/studio/v2/.openapi-generator/FILES +++ /dev/null @@ -1,15 +0,0 @@ -.openapi-generator-ignore -README.md -api_default.go -docs/DefaultApi.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineResponse200.md -docs/InlineResponse200Meta.md -docs/StudioV2Flow.md -model_inline_object.go -model_inline_object_1.go -model_inline_response_200.go -model_inline_response_200_meta.go -model_studio_v2_flow.go -response.go diff --git a/studio/v2/.openapi-generator/VERSION b/studio/v2/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d..000000000 --- a/studio/v2/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/studio/v2/README.md b/studio/v2/README.md deleted file mode 100644 index 4e1b4a92e..000000000 --- a/studio/v2/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Go API client for openapi - -This is the public Twilio REST API. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: com.twilio.oai.TwilioGoGenerator -For more information, please visit [https://support.twilio.com](https://support.twilio.com) - -## Installation - -Install the following dependencies: - -```shell -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: - -```golang -import "./openapi" -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**FlowsCreate**](docs/DefaultApi.md#flowscreate) | **Post** /v2/Flows | -*DefaultApi* | [**FlowsDelete**](docs/DefaultApi.md#flowsdelete) | **Delete** /v2/Flows/{Sid} | -*DefaultApi* | [**FlowsList**](docs/DefaultApi.md#flowslist) | **Get** /v2/Flows | -*DefaultApi* | [**FlowsRead**](docs/DefaultApi.md#flowsread) | **Get** /v2/Flows/{Sid} | -*DefaultApi* | [**FlowsUpdate**](docs/DefaultApi.md#flowsupdate) | **Post** /v2/Flows/{Sid} | - - -## Documentation For Models - - - [InlineObject](docs/InlineObject.md) - - [InlineObject1](docs/InlineObject1.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse200Meta](docs/InlineResponse200Meta.md) - - [StudioV2Flow](docs/StudioV2Flow.md) - - -## Documentation For Authorization - - - -## accountSid_authToken - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - - -## Author - -support@twilio.com - diff --git a/studio/v2/api_default.go b/studio/v2/api_default.go deleted file mode 100644 index 2a2e9c778..000000000 --- a/studio/v2/api_default.go +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi - -import ( - "encoding/json" - "fmt" - twilio "github.com/twilio/twilio-go/client" - "net/url" - "strings" -) - -type DefaultApiService struct { - baseURL string - client *twilio.Client -} - -func NewDefaultApiService(client *twilio.Client) *DefaultApiService { - return &DefaultApiService{ - client: client, - baseURL: fmt.Sprintf("https://studio.%s", client.BaseURL), - } -} - -// FlowsCreateParams Optional parameters for the method 'FlowsCreate' -type FlowsCreateParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` -} - -/* -FlowsCreate Method for FlowsCreate -Create a Flow. - * @param optional nil or *FlowsCreateOpts - Optional Parameters: - * @param "CommitMessage" (string) - Description on change made in the revision. - * @param "Definition" (map[string]interface{}) - JSON representation of flow definition. - * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. - * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. -@return StudioV2Flow -*/ -func (c *DefaultApiService) FlowsCreate(params *FlowsCreateParams) (*StudioV2Flow, error) { - path := "/v2/Flows" - - data := url.Values{} - headers := 0 - - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) - } - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - - if err != nil { - return nil, err - } - - data.Set("Definition", string(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -FlowsDelete Method for FlowsDelete -Delete a specific Flow. - * @param sid The SID of the Flow resource to delete. -*/ -func (c *DefaultApiService) FlowsDelete(sid string) error { - path := "/v2/Flows/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -// FlowsListParams Optional parameters for the method 'FlowsList' -type FlowsListParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -FlowsList Method for FlowsList -Retrieve a list of all Flows. - * @param optional nil or *FlowsListOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse200 -*/ -func (c *DefaultApiService) FlowsList(params *FlowsListParams) (*InlineResponse200, error) { - path := "/v2/Flows" - - data := url.Values{} - headers := 0 - - if params != nil && params.PageSize != nil { - data.Set("PageSize", string(*params.PageSize)) - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -FlowsRead Method for FlowsRead -Retrieve a specific Flow. - * @param sid The SID of the Flow resource to fetch. -@return StudioV2Flow -*/ -func (c *DefaultApiService) FlowsRead(sid string) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// FlowsUpdateParams Optional parameters for the method 'FlowsUpdate' -type FlowsUpdateParams struct { - CommitMessage *string `json:"CommitMessage,omitempty"` - Definition *map[string]interface{} `json:"Definition,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` -} - -/* -FlowsUpdate Method for FlowsUpdate -Update a Flow. - * @param sid The SID of the Flow resource to fetch. - * @param optional nil or *FlowsUpdateOpts - Optional Parameters: - * @param "CommitMessage" (string) - Description on change made in the revision. - * @param "Definition" (map[string]interface{}) - JSON representation of flow definition. - * @param "FriendlyName" (string) - The string that you assigned to describe the Flow. - * @param "Status" (string) - The status of the Flow. Can be: `draft` or `published`. -@return StudioV2Flow -*/ -func (c *DefaultApiService) FlowsUpdate(sid string, params *FlowsUpdateParams) (*StudioV2Flow, error) { - path := "/v2/Flows/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := url.Values{} - headers := 0 - - if params != nil && params.CommitMessage != nil { - data.Set("CommitMessage", *params.CommitMessage) - } - if params != nil && params.Definition != nil { - v, err := json.Marshal(params.Definition) - - if err != nil { - return nil, err - } - - data.Set("Definition", string(v)) - } - if params != nil && params.FriendlyName != nil { - data.Set("FriendlyName", *params.FriendlyName) - } - if params != nil && params.Status != nil { - data.Set("Status", *params.Status) - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &StudioV2Flow{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} diff --git a/studio/v2/docs/DefaultApi.md b/studio/v2/docs/DefaultApi.md deleted file mode 100644 index cb6cd2996..000000000 --- a/studio/v2/docs/DefaultApi.md +++ /dev/null @@ -1,218 +0,0 @@ -# \DefaultApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**FlowsCreate**](DefaultApi.md#FlowsCreate) | **Post** /v2/Flows | -[**FlowsDelete**](DefaultApi.md#FlowsDelete) | **Delete** /v2/Flows/{Sid} | -[**FlowsList**](DefaultApi.md#FlowsList) | **Get** /v2/Flows | -[**FlowsRead**](DefaultApi.md#FlowsRead) | **Get** /v2/Flows/{Sid} | -[**FlowsUpdate**](DefaultApi.md#FlowsUpdate) | **Post** /v2/Flows/{Sid} | - - - -## FlowsCreate - -> StudioV2Flow FlowsCreate(ctx, optional) - - - -Create a Flow. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FlowsCreateOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FlowsCreateOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **commitMessage** | **optional.**| Description on change made in the revision. | - **definition** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON representation of flow definition. | - **friendlyName** | **optional.**| The string that you assigned to describe the Flow. | - **status** | **optional.**| The status of the Flow. Can be: `draft` or `published`. | - -### Return type - -[**StudioV2Flow**](studio.v2.flow.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FlowsDelete - -> FlowsDelete(ctx, sid) - - - -Delete a specific Flow. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The SID of the Flow resource to delete. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FlowsList - -> InlineResponse200 FlowsList(ctx, optional) - - - -Retrieve a list of all Flows. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FlowsListOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FlowsListOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse200**](inline_response_200.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FlowsRead - -> StudioV2Flow FlowsRead(ctx, sid) - - - -Retrieve a specific Flow. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The SID of the Flow resource to fetch. | - -### Return type - -[**StudioV2Flow**](studio.v2.flow.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FlowsUpdate - -> StudioV2Flow FlowsUpdate(ctx, sid, optional) - - - -Update a Flow. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The SID of the Flow resource to fetch. | - **optional** | ***FlowsUpdateOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FlowsUpdateOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **commitMessage** | **optional.**| Description on change made in the revision. | - **definition** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| JSON representation of flow definition. | - **friendlyName** | **optional.**| The string that you assigned to describe the Flow. | - **status** | **optional.**| The status of the Flow. Can be: `draft` or `published`. | - -### Return type - -[**StudioV2Flow**](studio.v2.flow.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/studio/v2/docs/InlineObject.md b/studio/v2/docs/InlineObject.md deleted file mode 100644 index ee29758a4..000000000 --- a/studio/v2/docs/InlineObject.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CommitMessage** | **string** | Description on change made in the revision. | [optional] -**Definition** | **map[string]interface{}** | JSON representation of flow definition. | -**FriendlyName** | **string** | The string that you assigned to describe the Flow. | -**Status** | **string** | The status of the Flow. Can be: `draft` or `published`. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/studio/v2/docs/InlineObject1.md b/studio/v2/docs/InlineObject1.md deleted file mode 100644 index cdb2ce951..000000000 --- a/studio/v2/docs/InlineObject1.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CommitMessage** | **string** | Description on change made in the revision. | [optional] -**Definition** | **map[string]interface{}** | JSON representation of flow definition. | [optional] -**FriendlyName** | **string** | The string that you assigned to describe the Flow. | [optional] -**Status** | **string** | The status of the Flow. Can be: `draft` or `published`. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/studio/v2/docs/InlineResponse200.md b/studio/v2/docs/InlineResponse200.md deleted file mode 100644 index 09792d6b5..000000000 --- a/studio/v2/docs/InlineResponse200.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Flows** | [**[]StudioV2Flow**](studio.v2.flow.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/studio/v2/docs/InlineResponse200Meta.md b/studio/v2/docs/InlineResponse200Meta.md deleted file mode 100644 index cfde5a387..000000000 --- a/studio/v2/docs/InlineResponse200Meta.md +++ /dev/null @@ -1,17 +0,0 @@ -# InlineResponse200Meta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | | [optional] -**Key** | **string** | | [optional] -**NextPageUrl** | **string** | | [optional] -**Page** | **int32** | | [optional] -**PageSize** | **int32** | | [optional] -**PreviousPageUrl** | **string** | | [optional] -**Url** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/studio/v2/model_inline_object.go b/studio/v2/model_inline_object.go deleted file mode 100644 index 37410495a..000000000 --- a/studio/v2/model_inline_object.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -// InlineObject struct for InlineObject -type InlineObject struct { - // Description on change made in the revision. - CommitMessage string `json:"CommitMessage,omitempty"` - // JSON representation of flow definition. - Definition map[string]interface{} `json:"Definition"` - // The string that you assigned to describe the Flow. - FriendlyName string `json:"FriendlyName"` - // The status of the Flow. Can be: `draft` or `published`. - Status string `json:"Status"` -} diff --git a/studio/v2/model_inline_object_1.go b/studio/v2/model_inline_object_1.go deleted file mode 100644 index 10e5294d5..000000000 --- a/studio/v2/model_inline_object_1.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -// InlineObject1 struct for InlineObject1 -type InlineObject1 struct { - // Description on change made in the revision. - CommitMessage string `json:"CommitMessage,omitempty"` - // JSON representation of flow definition. - Definition map[string]interface{} `json:"Definition,omitempty"` - // The string that you assigned to describe the Flow. - FriendlyName string `json:"FriendlyName,omitempty"` - // The status of the Flow. Can be: `draft` or `published`. - Status string `json:"Status"` -} diff --git a/studio/v2/model_inline_response_200.go b/studio/v2/model_inline_response_200.go deleted file mode 100644 index 60b60440b..000000000 --- a/studio/v2/model_inline_response_200.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -// InlineResponse200 struct for InlineResponse200 -type InlineResponse200 struct { - Flows []StudioV2Flow `json:"flows,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/studio/v2/model_inline_response_200_meta.go b/studio/v2/model_inline_response_200_meta.go deleted file mode 100644 index 27908f4f2..000000000 --- a/studio/v2/model_inline_response_200_meta.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -// InlineResponse200Meta struct for InlineResponse200Meta -type InlineResponse200Meta struct { - FirstPageUrl string `json:"first_page_url,omitempty"` - Key string `json:"key,omitempty"` - NextPageUrl string `json:"next_page_url,omitempty"` - Page int32 `json:"page,omitempty"` - PageSize int32 `json:"page_size,omitempty"` - PreviousPageUrl string `json:"previous_page_url,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/studio/v2/model_studio_v2_flow.go b/studio/v2/model_studio_v2_flow.go deleted file mode 100644 index ae15631c9..000000000 --- a/studio/v2/model_studio_v2_flow.go +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi -import ( - "time" -) -// StudioV2Flow struct for StudioV2Flow -type StudioV2Flow struct { - AccountSid string `json:"account_sid,omitempty"` - CommitMessage string `json:"commit_message,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Definition map[string]interface{} `json:"definition,omitempty"` - Errors []map[string]interface{} `json:"errors,omitempty"` - FriendlyName string `json:"friendly_name,omitempty"` - Links map[string]interface{} `json:"links,omitempty"` - Revision int32 `json:"revision,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - Url string `json:"url,omitempty"` - Valid bool `json:"valid,omitempty"` - Warnings []map[string]interface{} `json:"warnings,omitempty"` - WebhookUrl string `json:"webhook_url,omitempty"` -} diff --git a/studio/v2/response.go b/studio/v2/response.go deleted file mode 100644 index aab8f0dcf..000000000 --- a/studio/v2/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Twilio - Studio - * - * This is the public Twilio REST API. - * - * API version: 1.0.0 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package openapi - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/twilio/twilio.go b/twilio/twilio.go index b91d8f3f6..07d6b2e1a 100644 --- a/twilio/twilio.go +++ b/twilio/twilio.go @@ -3,8 +3,38 @@ package twilio import ( "github.com/twilio/twilio-go/client" - studioV2 "github.com/twilio/twilio-go/studio/v2" "time" + accountsV1 "github.com/twilio/twilio-go/rest/accounts/v1" + apiV2010 "github.com/twilio/twilio-go/rest/api/v2010" + autopilotV1 "github.com/twilio/twilio-go/rest/autopilot/v1" + bulkexportsV1 "github.com/twilio/twilio-go/rest/bulkexports/v1" + chatV1 "github.com/twilio/twilio-go/rest/chat/v1" + chatV2 "github.com/twilio/twilio-go/rest/chat/v2" + conversationsV1 "github.com/twilio/twilio-go/rest/conversations/v1" + eventsV1 "github.com/twilio/twilio-go/rest/events/v1" + faxV1 "github.com/twilio/twilio-go/rest/fax/v1" + flexV1 "github.com/twilio/twilio-go/rest/flex/v1" + insightsV1 "github.com/twilio/twilio-go/rest/insights/v1" + ipMessaging "github.com/twilio/twilio-go/rest/ip/messaging" + lookupsV1 "github.com/twilio/twilio-go/rest/lookups/v1" + messagingV1 "github.com/twilio/twilio-go/rest/messaging/v1" + monitorV1 "github.com/twilio/twilio-go/rest/monitor/v1" + notifyV1 "github.com/twilio/twilio-go/rest/notify/v1" + numbersV2 "github.com/twilio/twilio-go/rest/numbers/v2" + pricingV1 "github.com/twilio/twilio-go/rest/pricing/v1" + pricingV2 "github.com/twilio/twilio-go/rest/pricing/v2" + proxyV1 "github.com/twilio/twilio-go/rest/proxy/v1" + serverlessV1 "github.com/twilio/twilio-go/rest/serverless/v1" + studioV1 "github.com/twilio/twilio-go/rest/studio/v1" + studioV2 "github.com/twilio/twilio-go/rest/studio/v2" + supersimV1 "github.com/twilio/twilio-go/rest/supersim/v1" + syncV1 "github.com/twilio/twilio-go/rest/sync/v1" + taskrouterV1 "github.com/twilio/twilio-go/rest/taskrouter/v1" + trunkingV1 "github.com/twilio/twilio-go/rest/trunking/v1" + verifyV2 "github.com/twilio/twilio-go/rest/verify/v2" + videoV1 "github.com/twilio/twilio-go/rest/video/v1" + voiceV1 "github.com/twilio/twilio-go/rest/voice/v1" + wirelessV1 "github.com/twilio/twilio-go/rest/wireless/v1" ) // Twilio provides access to Twilio services. @@ -12,8 +42,38 @@ type Twilio struct { *client.Credentials *client.Client defaultbaseURL *string - common service - StudioV2 *studioV2.DefaultApiService + common service + AccountsV1 *accountsV1.DefaultApiService + ApiV2010 *apiV2010.DefaultApiService + AutopilotV1 *autopilotV1.DefaultApiService + BulkexportsV1 *bulkexportsV1.DefaultApiService + ChatV1 *chatV1.DefaultApiService + ChatV2 *chatV2.DefaultApiService + ConversationsV1 *conversationsV1.DefaultApiService + EventsV1 *eventsV1.DefaultApiService + FaxV1 *faxV1.DefaultApiService + FlexV1 *flexV1.DefaultApiService + InsightsV1 *insightsV1.DefaultApiService + IpMessaging *ipMessaging.DefaultApiService + LookupsV1 *lookupsV1.DefaultApiService + MessagingV1 *messagingV1.DefaultApiService + MonitorV1 *monitorV1.DefaultApiService + NotifyV1 *notifyV1.DefaultApiService + NumbersV2 *numbersV2.DefaultApiService + PricingV1 *pricingV1.DefaultApiService + PricingV2 *pricingV2.DefaultApiService + ProxyV1 *proxyV1.DefaultApiService + ServerlessV1 *serverlessV1.DefaultApiService + StudioV1 *studioV1.DefaultApiService + StudioV2 *studioV2.DefaultApiService + SupersimV1 *supersimV1.DefaultApiService + SyncV1 *syncV1.DefaultApiService + TaskrouterV1 *taskrouterV1.DefaultApiService + TrunkingV1 *trunkingV1.DefaultApiService + VerifyV2 *verifyV2.DefaultApiService + VideoV1 *videoV1.DefaultApiService + VoiceV1 *voiceV1.DefaultApiService + WirelessV1 *wirelessV1.DefaultApiService } type service struct { @@ -45,7 +105,37 @@ func NewClient(accountSID string, authToken string) *Twilio { } c.common.client = c + + c.AccountsV1 = accountsV1.NewDefaultApiService(c.Client) + c.ApiV2010 = apiV2010.NewDefaultApiService(c.Client) + c.AutopilotV1 = autopilotV1.NewDefaultApiService(c.Client) + c.BulkexportsV1 = bulkexportsV1.NewDefaultApiService(c.Client) + c.ChatV1 = chatV1.NewDefaultApiService(c.Client) + c.ChatV2 = chatV2.NewDefaultApiService(c.Client) + c.ConversationsV1 = conversationsV1.NewDefaultApiService(c.Client) + c.EventsV1 = eventsV1.NewDefaultApiService(c.Client) + c.FaxV1 = faxV1.NewDefaultApiService(c.Client) + c.FlexV1 = flexV1.NewDefaultApiService(c.Client) + c.InsightsV1 = insightsV1.NewDefaultApiService(c.Client) + c.IpMessaging = ipMessaging.NewDefaultApiService(c.Client) + c.LookupsV1 = lookupsV1.NewDefaultApiService(c.Client) + c.MessagingV1 = messagingV1.NewDefaultApiService(c.Client) + c.MonitorV1 = monitorV1.NewDefaultApiService(c.Client) + c.NotifyV1 = notifyV1.NewDefaultApiService(c.Client) + c.NumbersV2 = numbersV2.NewDefaultApiService(c.Client) + c.PricingV1 = pricingV1.NewDefaultApiService(c.Client) + c.ProxyV1 = proxyV1.NewDefaultApiService(c.Client) + c.ServerlessV1 = serverlessV1.NewDefaultApiService(c.Client) + c.StudioV1 = studioV1.NewDefaultApiService(c.Client) c.StudioV2 = studioV2.NewDefaultApiService(c.Client) + c.SupersimV1 = supersimV1.NewDefaultApiService(c.Client) + c.SyncV1 = syncV1.NewDefaultApiService(c.Client) + c.TaskrouterV1 = taskrouterV1.NewDefaultApiService(c.Client) + c.TrunkingV1 = trunkingV1.NewDefaultApiService(c.Client) + c.VerifyV2 = verifyV2.NewDefaultApiService(c.Client) + c.VideoV1 = videoV1.NewDefaultApiService(c.Client) + c.VoiceV1 = voiceV1.NewDefaultApiService(c.Client) + c.WirelessV1 = wirelessV1.NewDefaultApiService(c.Client) return c } diff --git a/verify/.openapi-generator/FILES b/verify/.openapi-generator/FILES deleted file mode 100644 index b811a9ad1..000000000 --- a/verify/.openapi-generator/FILES +++ /dev/null @@ -1,90 +0,0 @@ -.openapi-generator-ignore -README.md -api_ga.go -api_preview.go -api_service.go -docs/GAApi.md -docs/InlineObject.md -docs/InlineObject1.md -docs/InlineObject10.md -docs/InlineObject11.md -docs/InlineObject12.md -docs/InlineObject13.md -docs/InlineObject14.md -docs/InlineObject15.md -docs/InlineObject16.md -docs/InlineObject17.md -docs/InlineObject18.md -docs/InlineObject2.md -docs/InlineObject3.md -docs/InlineObject4.md -docs/InlineObject5.md -docs/InlineObject6.md -docs/InlineObject7.md -docs/InlineObject8.md -docs/InlineObject9.md -docs/InlineResponse200.md -docs/InlineResponse2001.md -docs/InlineResponse2002.md -docs/InlineResponse2003.md -docs/InlineResponse2004.md -docs/InlineResponse2005.md -docs/InlineResponse2006.md -docs/InlineResponse2007.md -docs/InlineResponse200Meta.md -docs/PreviewApi.md -docs/VerifyV2Form.md -docs/VerifyV2Service.md -docs/VerifyV2ServiceAccessToken.md -docs/VerifyV2ServiceEntity.md -docs/VerifyV2ServiceEntityChallenge.md -docs/VerifyV2ServiceEntityFactor.md -docs/VerifyV2ServiceMessagingConfiguration.md -docs/VerifyV2ServiceRateLimit.md -docs/VerifyV2ServiceRateLimitBucket.md -docs/VerifyV2ServiceVerification.md -docs/VerifyV2ServiceVerificationCheck.md -docs/VerifyV2ServiceWebhook.md -go.mod -go.sum -model_inline_object.go -model_inline_object_1.go -model_inline_object_10.go -model_inline_object_11.go -model_inline_object_12.go -model_inline_object_13.go -model_inline_object_14.go -model_inline_object_15.go -model_inline_object_16.go -model_inline_object_17.go -model_inline_object_18.go -model_inline_object_2.go -model_inline_object_3.go -model_inline_object_4.go -model_inline_object_5.go -model_inline_object_6.go -model_inline_object_7.go -model_inline_object_8.go -model_inline_object_9.go -model_inline_response_200.go -model_inline_response_200_1.go -model_inline_response_200_2.go -model_inline_response_200_3.go -model_inline_response_200_4.go -model_inline_response_200_5.go -model_inline_response_200_6.go -model_inline_response_200_7.go -model_inline_response_200_meta.go -model_verify_v2_form.go -model_verify_v2_service.go -model_verify_v2_service_access_token.go -model_verify_v2_service_entity.go -model_verify_v2_service_entity_challenge.go -model_verify_v2_service_entity_factor.go -model_verify_v2_service_messaging_configuration.go -model_verify_v2_service_rate_limit.go -model_verify_v2_service_rate_limit_bucket.go -model_verify_v2_service_verification.go -model_verify_v2_service_verification_check.go -model_verify_v2_service_webhook.go -response.go diff --git a/verify/.openapi-generator/VERSION b/verify/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d..000000000 --- a/verify/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/verify/README.md b/verify/README.md deleted file mode 100644 index 1024af772..000000000 --- a/verify/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# Go API client for twilio - -This is the public Twilio REST API. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.1 -- Package version: 1.0.0 -- Build package: com.twilio.oai.TwilioGoGenerator -For more information, please visit [https://support.twilio.com](https://support.twilio.com) - -## Installation - -Install the following dependencies: - -```shell -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: - -```golang -import "./twilio" -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GAApi* | [**V2ServicesGet**](docs/GAApi.md#v2servicesget) | **Get** /v2/Services | -*GAApi* | [**V2ServicesPost**](docs/GAApi.md#v2servicespost) | **Post** /v2/Services | -*GAApi* | [**V2ServicesServiceSidMessagingConfigurationsCountryDelete**](docs/GAApi.md#v2servicesservicesidmessagingconfigurationscountrydelete) | **Delete** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -*GAApi* | [**V2ServicesServiceSidMessagingConfigurationsCountryGet**](docs/GAApi.md#v2servicesservicesidmessagingconfigurationscountryget) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -*GAApi* | [**V2ServicesServiceSidMessagingConfigurationsCountryPost**](docs/GAApi.md#v2servicesservicesidmessagingconfigurationscountrypost) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -*GAApi* | [**V2ServicesServiceSidMessagingConfigurationsGet**](docs/GAApi.md#v2servicesservicesidmessagingconfigurationsget) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations | -*GAApi* | [**V2ServicesServiceSidMessagingConfigurationsPost**](docs/GAApi.md#v2servicesservicesidmessagingconfigurationspost) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations | -*GAApi* | [**V2ServicesServiceSidRateLimitsGet**](docs/GAApi.md#v2servicesservicesidratelimitsget) | **Get** /v2/Services/{ServiceSid}/RateLimits | -*GAApi* | [**V2ServicesServiceSidRateLimitsPost**](docs/GAApi.md#v2servicesservicesidratelimitspost) | **Post** /v2/Services/{ServiceSid}/RateLimits | -*GAApi* | [**V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet**](docs/GAApi.md#v2servicesservicesidratelimitsratelimitsidbucketsget) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | -*GAApi* | [**V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost**](docs/GAApi.md#v2servicesservicesidratelimitsratelimitsidbucketspost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | -*GAApi* | [**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete**](docs/GAApi.md#v2servicesservicesidratelimitsratelimitsidbucketssiddelete) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -*GAApi* | [**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet**](docs/GAApi.md#v2servicesservicesidratelimitsratelimitsidbucketssidget) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -*GAApi* | [**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost**](docs/GAApi.md#v2servicesservicesidratelimitsratelimitsidbucketssidpost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -*GAApi* | [**V2ServicesServiceSidRateLimitsSidDelete**](docs/GAApi.md#v2servicesservicesidratelimitssiddelete) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -*GAApi* | [**V2ServicesServiceSidRateLimitsSidGet**](docs/GAApi.md#v2servicesservicesidratelimitssidget) | **Get** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -*GAApi* | [**V2ServicesServiceSidRateLimitsSidPost**](docs/GAApi.md#v2servicesservicesidratelimitssidpost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -*GAApi* | [**V2ServicesServiceSidVerificationCheckPost**](docs/GAApi.md#v2servicesservicesidverificationcheckpost) | **Post** /v2/Services/{ServiceSid}/VerificationCheck | -*GAApi* | [**V2ServicesServiceSidVerificationsPost**](docs/GAApi.md#v2servicesservicesidverificationspost) | **Post** /v2/Services/{ServiceSid}/Verifications | -*GAApi* | [**V2ServicesServiceSidVerificationsSidGet**](docs/GAApi.md#v2servicesservicesidverificationssidget) | **Get** /v2/Services/{ServiceSid}/Verifications/{Sid} | -*GAApi* | [**V2ServicesServiceSidVerificationsSidPost**](docs/GAApi.md#v2servicesservicesidverificationssidpost) | **Post** /v2/Services/{ServiceSid}/Verifications/{Sid} | -*GAApi* | [**V2ServicesSidDelete**](docs/GAApi.md#v2servicessiddelete) | **Delete** /v2/Services/{Sid} | -*GAApi* | [**V2ServicesSidGet**](docs/GAApi.md#v2servicessidget) | **Get** /v2/Services/{Sid} | -*GAApi* | [**V2ServicesSidPost**](docs/GAApi.md#v2servicessidpost) | **Post** /v2/Services/{Sid} | -*PreviewApi* | [**V2FormsFormTypeGet**](docs/PreviewApi.md#v2formsformtypeget) | **Get** /v2/Forms/{FormType} | -*PreviewApi* | [**V2ServicesServiceSidAccessTokensPost**](docs/PreviewApi.md#v2servicesservicesidaccesstokenspost) | **Post** /v2/Services/{ServiceSid}/AccessTokens | -*PreviewApi* | [**V2ServicesServiceSidEntitiesGet**](docs/PreviewApi.md#v2servicesservicesidentitiesget) | **Get** /v2/Services/{ServiceSid}/Entities | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityChallengesGet**](docs/PreviewApi.md#v2servicesservicesidentitiesidentitychallengesget) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityChallengesPost**](docs/PreviewApi.md#v2servicesservicesidentitiesidentitychallengespost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityChallengesSidGet**](docs/PreviewApi.md#v2servicesservicesidentitiesidentitychallengessidget) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityChallengesSidPost**](docs/PreviewApi.md#v2servicesservicesidentitiesidentitychallengessidpost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityDelete**](docs/PreviewApi.md#v2servicesservicesidentitiesidentitydelete) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityFactorsGet**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityfactorsget) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityFactorsPost**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityfactorspost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityFactorsSidDelete**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityfactorssiddelete) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityFactorsSidGet**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityfactorssidget) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityFactorsSidPost**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityfactorssidpost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesIdentityGet**](docs/PreviewApi.md#v2servicesservicesidentitiesidentityget) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity} | -*PreviewApi* | [**V2ServicesServiceSidEntitiesPost**](docs/PreviewApi.md#v2servicesservicesidentitiespost) | **Post** /v2/Services/{ServiceSid}/Entities | -*PreviewApi* | [**V2ServicesServiceSidWebhooksGet**](docs/PreviewApi.md#v2servicesservicesidwebhooksget) | **Get** /v2/Services/{ServiceSid}/Webhooks | -*PreviewApi* | [**V2ServicesServiceSidWebhooksPost**](docs/PreviewApi.md#v2servicesservicesidwebhookspost) | **Post** /v2/Services/{ServiceSid}/Webhooks | -*PreviewApi* | [**V2ServicesServiceSidWebhooksSidDelete**](docs/PreviewApi.md#v2servicesservicesidwebhookssiddelete) | **Delete** /v2/Services/{ServiceSid}/Webhooks/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidWebhooksSidGet**](docs/PreviewApi.md#v2servicesservicesidwebhookssidget) | **Get** /v2/Services/{ServiceSid}/Webhooks/{Sid} | -*PreviewApi* | [**V2ServicesServiceSidWebhooksSidPost**](docs/PreviewApi.md#v2servicesservicesidwebhookssidpost) | **Post** /v2/Services/{ServiceSid}/Webhooks/{Sid} | - - -## Documentation For Models - - - [InlineObject](docs/InlineObject.md) - - [InlineObject1](docs/InlineObject1.md) - - [InlineObject10](docs/InlineObject10.md) - - [InlineObject11](docs/InlineObject11.md) - - [InlineObject12](docs/InlineObject12.md) - - [InlineObject13](docs/InlineObject13.md) - - [InlineObject14](docs/InlineObject14.md) - - [InlineObject15](docs/InlineObject15.md) - - [InlineObject16](docs/InlineObject16.md) - - [InlineObject17](docs/InlineObject17.md) - - [InlineObject18](docs/InlineObject18.md) - - [InlineObject2](docs/InlineObject2.md) - - [InlineObject3](docs/InlineObject3.md) - - [InlineObject4](docs/InlineObject4.md) - - [InlineObject5](docs/InlineObject5.md) - - [InlineObject6](docs/InlineObject6.md) - - [InlineObject7](docs/InlineObject7.md) - - [InlineObject8](docs/InlineObject8.md) - - [InlineObject9](docs/InlineObject9.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse2004](docs/InlineResponse2004.md) - - [InlineResponse2005](docs/InlineResponse2005.md) - - [InlineResponse2006](docs/InlineResponse2006.md) - - [InlineResponse2007](docs/InlineResponse2007.md) - - [InlineResponse200Meta](docs/InlineResponse200Meta.md) - - [VerifyV2Form](docs/VerifyV2Form.md) - - [VerifyV2Service](docs/VerifyV2Service.md) - - [VerifyV2ServiceAccessToken](docs/VerifyV2ServiceAccessToken.md) - - [VerifyV2ServiceEntity](docs/VerifyV2ServiceEntity.md) - - [VerifyV2ServiceEntityChallenge](docs/VerifyV2ServiceEntityChallenge.md) - - [VerifyV2ServiceEntityFactor](docs/VerifyV2ServiceEntityFactor.md) - - [VerifyV2ServiceMessagingConfiguration](docs/VerifyV2ServiceMessagingConfiguration.md) - - [VerifyV2ServiceRateLimit](docs/VerifyV2ServiceRateLimit.md) - - [VerifyV2ServiceRateLimitBucket](docs/VerifyV2ServiceRateLimitBucket.md) - - [VerifyV2ServiceVerification](docs/VerifyV2ServiceVerification.md) - - [VerifyV2ServiceVerificationCheck](docs/VerifyV2ServiceVerificationCheck.md) - - [VerifyV2ServiceWebhook](docs/VerifyV2ServiceWebhook.md) - - -## Documentation For Authorization - - - -## accountSid_authToken - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - - -## Author - -support@twilio.com - diff --git a/verify/api_ga.go b/verify/api_ga.go deleted file mode 100644 index 1bcaaab2e..000000000 --- a/verify/api_ga.go +++ /dev/null @@ -1,1074 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio - -import ( - "encoding/json" - "fmt" - "github.com/twilio/twilio-go/client" - "strings" -) - -type GAApiService struct { - baseURL string - client *twilio.Client -} - -func NewGAApiService(client *twilio.Client) *GAApiService { - return &GAApiService{ - client: client, - baseURL: fmt.Sprintf("https://studio.%s", client.BaseURL), - } -} -// V2ServicesGetParams Optional parameters for the method 'V2ServicesGet' -type V2ServicesGetParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesGet Method for V2ServicesGet -Retrieve a list of all Verification Services for an account. - * @param optional nil or *V2ServicesGetOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse200 -*/ -func (c *GAApiService) V2ServicesGet(params *V2ServicesGetParams) (*InlineResponse200, error) { - path := "/v2/Services" - - data := make(map[string]interface{}) - headers := 0 - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesPostParams Optional parameters for the method 'V2ServicesPost' -type V2ServicesPostParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - Push *map[string]interface{} `json:"Push,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` -} - -/* -V2ServicesPost Method for V2ServicesPost -Create a new Verification Service. - * @param optional nil or *V2ServicesPostOpts - Optional Parameters: - * @param "CodeLength" (int32) - The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. - * @param "CustomCodeEnabled" (bool) - Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. - * @param "DoNotShareWarningEnabled" (bool) - Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` - * @param "DtmfInputRequired" (bool) - Whether to ask the user to press a number before delivering the verify code in a phone call. - * @param "FriendlyName" (string) - A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** - * @param "LookupEnabled" (bool) - Whether to perform a lookup with each verification started and return info about the phone number. - * @param "Psd2Enabled" (bool) - Whether to pass PSD2 transaction parameters when starting a verification. - * @param "Push" (map[string]interface{}) - Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\\\"notify_service_sid\\\": \\\"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\\", \\\"include_date\\\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info - * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. - * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. -@return VerifyV2Service -*/ -func (c *GAApiService) V2ServicesPost(params *V2ServicesPostParams) (*VerifyV2Service, error) { - path := "/v2/Services" - - data := make(map[string]interface{}) - headers := 0 - - if params.CodeLength != nil { - data["CodeLength"] = *params.CodeLength - } - if params.CustomCodeEnabled != nil { - data["CustomCodeEnabled"] = *params.CustomCodeEnabled - } - if params.DoNotShareWarningEnabled != nil { - data["DoNotShareWarningEnabled"] = *params.DoNotShareWarningEnabled - } - if params.DtmfInputRequired != nil { - data["DtmfInputRequired"] = *params.DtmfInputRequired - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - if params.LookupEnabled != nil { - data["LookupEnabled"] = *params.LookupEnabled - } - if params.Psd2Enabled != nil { - data["Psd2Enabled"] = *params.Psd2Enabled - } - if params.Push != nil { - data["Push"] = *params.Push - } - if params.SkipSmsToLandlines != nil { - data["SkipSmsToLandlines"] = *params.SkipSmsToLandlines - } - if params.TtsName != nil { - data["TtsName"] = *params.TtsName - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesServiceSidMessagingConfigurationsCountryDelete Method for V2ServicesServiceSidMessagingConfigurationsCountryDelete -Delete a specific MessagingConfiguration. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. - * @param country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. -*/ -func (c *GAApiService) V2ServicesServiceSidMessagingConfigurationsCountryDelete(serviceSid string, country string) (error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Country"+"}", country, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -/* -V2ServicesServiceSidMessagingConfigurationsCountryGet Method for V2ServicesServiceSidMessagingConfigurationsCountryGet -Fetch a specific MessagingConfiguration. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. - * @param country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. -@return VerifyV2ServiceMessagingConfiguration -*/ -func (c *GAApiService) V2ServicesServiceSidMessagingConfigurationsCountryGet(serviceSid string, country string) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Country"+"}", country, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidMessagingConfigurationsCountryPostParams Optional parameters for the method 'V2ServicesServiceSidMessagingConfigurationsCountryPost' -type V2ServicesServiceSidMessagingConfigurationsCountryPostParams struct { - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` -} - -/* -V2ServicesServiceSidMessagingConfigurationsCountryPost Method for V2ServicesServiceSidMessagingConfigurationsCountryPost -Update a specific MessagingConfiguration - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. - * @param country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - * @param optional nil or *V2ServicesServiceSidMessagingConfigurationsCountryPostOpts - Optional Parameters: - * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. -@return VerifyV2ServiceMessagingConfiguration -*/ -func (c *GAApiService) V2ServicesServiceSidMessagingConfigurationsCountryPost(serviceSid string, country string, params *V2ServicesServiceSidMessagingConfigurationsCountryPostParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations/{Country}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Country"+"}", country, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.MessagingServiceSid != nil { - data["MessagingServiceSid"] = *params.MessagingServiceSid - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidMessagingConfigurationsGetParams Optional parameters for the method 'V2ServicesServiceSidMessagingConfigurationsGet' -type V2ServicesServiceSidMessagingConfigurationsGetParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidMessagingConfigurationsGet Method for V2ServicesServiceSidMessagingConfigurationsGet -Retrieve a list of all Messaging Configurations for a Service. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. - * @param optional nil or *V2ServicesServiceSidMessagingConfigurationsGetOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2004 -*/ -func (c *GAApiService) V2ServicesServiceSidMessagingConfigurationsGet(serviceSid string, params *V2ServicesServiceSidMessagingConfigurationsGetParams) (*InlineResponse2004, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2004{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidMessagingConfigurationsPostParams Optional parameters for the method 'V2ServicesServiceSidMessagingConfigurationsPost' -type V2ServicesServiceSidMessagingConfigurationsPostParams struct { - Country *string `json:"Country,omitempty"` - MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"` -} - -/* -V2ServicesServiceSidMessagingConfigurationsPost Method for V2ServicesServiceSidMessagingConfigurationsPost -Create a new MessagingConfiguration for a service. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. - * @param optional nil or *V2ServicesServiceSidMessagingConfigurationsPostOpts - Optional Parameters: - * @param "Country" (string) - The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - * @param "MessagingServiceSid" (string) - The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. -@return VerifyV2ServiceMessagingConfiguration -*/ -func (c *GAApiService) V2ServicesServiceSidMessagingConfigurationsPost(serviceSid string, params *V2ServicesServiceSidMessagingConfigurationsPostParams) (*VerifyV2ServiceMessagingConfiguration, error) { - path := "/v2/Services/{ServiceSid}/MessagingConfigurations" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Country != nil { - data["Country"] = *params.Country - } - if params.MessagingServiceSid != nil { - data["MessagingServiceSid"] = *params.MessagingServiceSid - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceMessagingConfiguration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsGetParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsGet' -type V2ServicesServiceSidRateLimitsGetParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsGet Method for V2ServicesServiceSidRateLimitsGet -Retrieve a list of all Rate Limits for a service. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param optional nil or *V2ServicesServiceSidRateLimitsGetOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2005 -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsGet(serviceSid string, params *V2ServicesServiceSidRateLimitsGetParams) (*InlineResponse2005, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2005{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsPostParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsPost' -type V2ServicesServiceSidRateLimitsPostParams struct { - Description *string `json:"Description,omitempty"` - UniqueName *string `json:"UniqueName,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsPost Method for V2ServicesServiceSidRateLimitsPost -Create a new Rate Limit for a Service - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param optional nil or *V2ServicesServiceSidRateLimitsPostOpts - Optional Parameters: - * @param "Description" (string) - Description of this Rate Limit - * @param "UniqueName" (string) - Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** -@return VerifyV2ServiceRateLimit -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsPost(serviceSid string, params *V2ServicesServiceSidRateLimitsPostParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Description != nil { - data["Description"] = *params.Description - } - if params.UniqueName != nil { - data["UniqueName"] = *params.UniqueName - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet' -type V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet Method for V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet -Retrieve a list of all Buckets for a Rate Limit. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. - * @param optional nil or *V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2006 -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet(serviceSid string, rateLimitSid string, params *V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetParams) (*InlineResponse2006, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"RateLimitSid"+"}", rateLimitSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2006{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost' -type V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostParams struct { - Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost Method for V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost -Create a new Bucket for a Rate Limit - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. - * @param optional nil or *V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostOpts - Optional Parameters: - * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. - * @param "Max" (int32) - Maximum number of requests permitted in during the interval. -@return VerifyV2ServiceRateLimitBucket -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost(serviceSid string, rateLimitSid string, params *V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"RateLimitSid"+"}", rateLimitSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Interval != nil { - data["Interval"] = *params.Interval - } - if params.Max != nil { - data["Max"] = *params.Max - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete Method for V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete -Delete a specific Bucket. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. - * @param sid A 34 character string that uniquely identifies this Bucket. -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete(serviceSid string, rateLimitSid string, sid string) (error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"RateLimitSid"+"}", rateLimitSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -/* -V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet Method for V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet -Fetch a specific Bucket. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. - * @param sid A 34 character string that uniquely identifies this Bucket. -@return VerifyV2ServiceRateLimitBucket -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet(serviceSid string, rateLimitSid string, sid string) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"RateLimitSid"+"}", rateLimitSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost' -type V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostParams struct { - Interval *int32 `json:"Interval,omitempty"` - Max *int32 `json:"Max,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost Method for V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost -Update a specific Bucket. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource. - * @param sid A 34 character string that uniquely identifies this Bucket. - * @param optional nil or *V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostOpts - Optional Parameters: - * @param "Interval" (int32) - Number of seconds that the rate limit will be enforced over. - * @param "Max" (int32) - Maximum number of requests permitted in during the interval. -@return VerifyV2ServiceRateLimitBucket -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost(serviceSid string, rateLimitSid string, sid string, params *V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostParams) (*VerifyV2ServiceRateLimitBucket, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"RateLimitSid"+"}", rateLimitSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Interval != nil { - data["Interval"] = *params.Interval - } - if params.Max != nil { - data["Max"] = *params.Max - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimitBucket{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesServiceSidRateLimitsSidDelete Method for V2ServicesServiceSidRateLimitsSidDelete -Delete a specific Rate Limit. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsSidDelete(serviceSid string, sid string) (error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -/* -V2ServicesServiceSidRateLimitsSidGet Method for V2ServicesServiceSidRateLimitsSidGet -Fetch a specific Rate Limit. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. -@return VerifyV2ServiceRateLimit -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsSidGet(serviceSid string, sid string) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidRateLimitsSidPostParams Optional parameters for the method 'V2ServicesServiceSidRateLimitsSidPost' -type V2ServicesServiceSidRateLimitsSidPostParams struct { - Description *string `json:"Description,omitempty"` -} - -/* -V2ServicesServiceSidRateLimitsSidPost Method for V2ServicesServiceSidRateLimitsSidPost -Update a specific Rate Limit. - * @param serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. - * @param sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. - * @param optional nil or *V2ServicesServiceSidRateLimitsSidPostOpts - Optional Parameters: - * @param "Description" (string) - Description of this Rate Limit -@return VerifyV2ServiceRateLimit -*/ -func (c *GAApiService) V2ServicesServiceSidRateLimitsSidPost(serviceSid string, sid string, params *V2ServicesServiceSidRateLimitsSidPostParams) (*VerifyV2ServiceRateLimit, error) { - path := "/v2/Services/{ServiceSid}/RateLimits/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Description != nil { - data["Description"] = *params.Description - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceRateLimit{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidVerificationCheckPostParams Optional parameters for the method 'V2ServicesServiceSidVerificationCheckPost' -type V2ServicesServiceSidVerificationCheckPostParams struct { - Amount *string `json:"Amount,omitempty"` - Code *string `json:"Code,omitempty"` - Payee *string `json:"Payee,omitempty"` - To *string `json:"To,omitempty"` - VerificationSid *string `json:"VerificationSid,omitempty"` -} - -/* -V2ServicesServiceSidVerificationCheckPost Method for V2ServicesServiceSidVerificationCheckPost -challenge a specific Verification Check. - * @param serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. - * @param optional nil or *V2ServicesServiceSidVerificationCheckPostOpts - Optional Parameters: - * @param "Amount" (string) - The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - * @param "Code" (string) - The 4-10 character string being verified. - * @param "Payee" (string) - The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). - * @param "VerificationSid" (string) - A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. -@return VerifyV2ServiceVerificationCheck -*/ -func (c *GAApiService) V2ServicesServiceSidVerificationCheckPost(serviceSid string, params *V2ServicesServiceSidVerificationCheckPostParams) (*VerifyV2ServiceVerificationCheck, error) { - path := "/v2/Services/{ServiceSid}/VerificationCheck" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Amount != nil { - data["Amount"] = *params.Amount - } - if params.Code != nil { - data["Code"] = *params.Code - } - if params.Payee != nil { - data["Payee"] = *params.Payee - } - if params.To != nil { - data["To"] = *params.To - } - if params.VerificationSid != nil { - data["VerificationSid"] = *params.VerificationSid - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceVerificationCheck{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidVerificationsPostParams Optional parameters for the method 'V2ServicesServiceSidVerificationsPost' -type V2ServicesServiceSidVerificationsPostParams struct { - Amount *string `json:"Amount,omitempty"` - AppHash *string `json:"AppHash,omitempty"` - Channel *string `json:"Channel,omitempty"` - ChannelConfiguration *map[string]interface{} `json:"ChannelConfiguration,omitempty"` - CustomCode *string `json:"CustomCode,omitempty"` - CustomFriendlyName *string `json:"CustomFriendlyName,omitempty"` - CustomMessage *string `json:"CustomMessage,omitempty"` - Locale *string `json:"Locale,omitempty"` - Payee *string `json:"Payee,omitempty"` - RateLimits *map[string]interface{} `json:"RateLimits,omitempty"` - SendDigits *string `json:"SendDigits,omitempty"` - To *string `json:"To,omitempty"` -} - -/* -V2ServicesServiceSidVerificationsPost Method for V2ServicesServiceSidVerificationsPost -Create a new Verification using a Service - * @param serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. - * @param optional nil or *V2ServicesServiceSidVerificationsPostOpts - Optional Parameters: - * @param "Amount" (string) - The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - * @param "AppHash" (string) - Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. - * @param "Channel" (string) - The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. - * @param "ChannelConfiguration" (map[string]interface{}) - [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. - * @param "CustomCode" (string) - A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. - * @param "CustomFriendlyName" (string) - A custom user defined friendly name that overwrites the existing one in the verification message - * @param "CustomMessage" (string) - The text of a custom message to use for the verification. - * @param "Locale" (string) - The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` - * @param "Payee" (string) - The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - * @param "RateLimits" (map[string]interface{}) - The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. - * @param "SendDigits" (string) - The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). - * @param "To" (string) - The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). -@return VerifyV2ServiceVerification -*/ -func (c *GAApiService) V2ServicesServiceSidVerificationsPost(serviceSid string, params *V2ServicesServiceSidVerificationsPostParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Amount != nil { - data["Amount"] = *params.Amount - } - if params.AppHash != nil { - data["AppHash"] = *params.AppHash - } - if params.Channel != nil { - data["Channel"] = *params.Channel - } - if params.ChannelConfiguration != nil { - data["ChannelConfiguration"] = *params.ChannelConfiguration - } - if params.CustomCode != nil { - data["CustomCode"] = *params.CustomCode - } - if params.CustomFriendlyName != nil { - data["CustomFriendlyName"] = *params.CustomFriendlyName - } - if params.CustomMessage != nil { - data["CustomMessage"] = *params.CustomMessage - } - if params.Locale != nil { - data["Locale"] = *params.Locale - } - if params.Payee != nil { - data["Payee"] = *params.Payee - } - if params.RateLimits != nil { - data["RateLimits"] = *params.RateLimits - } - if params.SendDigits != nil { - data["SendDigits"] = *params.SendDigits - } - if params.To != nil { - data["To"] = *params.To - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesServiceSidVerificationsSidGet Method for V2ServicesServiceSidVerificationsSidGet -Fetch a specific Verification - * @param serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. - * @param sid The Twilio-provided string that uniquely identifies the Verification resource to fetch. -@return VerifyV2ServiceVerification -*/ -func (c *GAApiService) V2ServicesServiceSidVerificationsSidGet(serviceSid string, sid string) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesServiceSidVerificationsSidPostParams Optional parameters for the method 'V2ServicesServiceSidVerificationsSidPost' -type V2ServicesServiceSidVerificationsSidPostParams struct { - Status *string `json:"Status,omitempty"` -} - -/* -V2ServicesServiceSidVerificationsSidPost Method for V2ServicesServiceSidVerificationsSidPost -Update a Verification status - * @param serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to update the resource from. - * @param sid The Twilio-provided string that uniquely identifies the Verification resource to update. - * @param optional nil or *V2ServicesServiceSidVerificationsSidPostOpts - Optional Parameters: - * @param "Status" (string) - The new status of the resource. Can be: `canceled` or `approved`. -@return VerifyV2ServiceVerification -*/ -func (c *GAApiService) V2ServicesServiceSidVerificationsSidPost(serviceSid string, sid string, params *V2ServicesServiceSidVerificationsSidPostParams) (*VerifyV2ServiceVerification, error) { - path := "/v2/Services/{ServiceSid}/Verifications/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.Status != nil { - data["Status"] = *params.Status - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceVerification{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesSidDelete Method for V2ServicesSidDelete -Delete a specific Verification Service Instance. - * @param sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete. -*/ -func (c *GAApiService) V2ServicesSidDelete(sid string) (error) { - path := "/v2/Services/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -/* -V2ServicesSidGet Method for V2ServicesSidGet -Fetch specific Verification Service Instance. - * @param sid The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. -@return VerifyV2Service -*/ -func (c *GAApiService) V2ServicesSidGet(sid string) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} -// V2ServicesSidPostParams Optional parameters for the method 'V2ServicesSidPost' -type V2ServicesSidPostParams struct { - CodeLength *int32 `json:"CodeLength,omitempty"` - CustomCodeEnabled *bool `json:"CustomCodeEnabled,omitempty"` - DoNotShareWarningEnabled *bool `json:"DoNotShareWarningEnabled,omitempty"` - DtmfInputRequired *bool `json:"DtmfInputRequired,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - LookupEnabled *bool `json:"LookupEnabled,omitempty"` - Psd2Enabled *bool `json:"Psd2Enabled,omitempty"` - Push *map[string]interface{} `json:"Push,omitempty"` - SkipSmsToLandlines *bool `json:"SkipSmsToLandlines,omitempty"` - TtsName *string `json:"TtsName,omitempty"` -} - -/* -V2ServicesSidPost Method for V2ServicesSidPost -Update a specific Verification Service. - * @param sid The Twilio-provided string that uniquely identifies the Service resource to update. - * @param optional nil or *V2ServicesSidPostOpts - Optional Parameters: - * @param "CodeLength" (int32) - The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. - * @param "CustomCodeEnabled" (bool) - Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. - * @param "DoNotShareWarningEnabled" (bool) - Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** - * @param "DtmfInputRequired" (bool) - Whether to ask the user to press a number before delivering the verify code in a phone call. - * @param "FriendlyName" (string) - A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** - * @param "LookupEnabled" (bool) - Whether to perform a lookup with each verification started and return info about the phone number. - * @param "Psd2Enabled" (bool) - Whether to pass PSD2 transaction parameters when starting a verification. - * @param "Push" (map[string]interface{}) - Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\\\"notify_service_sid\\\": \\\"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\\", \\\"include_date\\\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info - * @param "SkipSmsToLandlines" (bool) - Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. - * @param "TtsName" (string) - The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. -@return VerifyV2Service -*/ -func (c *GAApiService) V2ServicesSidPost(sid string, params *V2ServicesSidPostParams) (*VerifyV2Service, error) { - path := "/v2/Services/{Sid}" - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.CodeLength != nil { - data["CodeLength"] = *params.CodeLength - } - if params.CustomCodeEnabled != nil { - data["CustomCodeEnabled"] = *params.CustomCodeEnabled - } - if params.DoNotShareWarningEnabled != nil { - data["DoNotShareWarningEnabled"] = *params.DoNotShareWarningEnabled - } - if params.DtmfInputRequired != nil { - data["DtmfInputRequired"] = *params.DtmfInputRequired - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - if params.LookupEnabled != nil { - data["LookupEnabled"] = *params.LookupEnabled - } - if params.Psd2Enabled != nil { - data["Psd2Enabled"] = *params.Psd2Enabled - } - if params.Push != nil { - data["Push"] = *params.Push - } - if params.SkipSmsToLandlines != nil { - data["SkipSmsToLandlines"] = *params.SkipSmsToLandlines - } - if params.TtsName != nil { - data["TtsName"] = *params.TtsName - } - - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2Service{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} diff --git a/verify/api_preview.go b/verify/api_preview.go deleted file mode 100644 index 9de098c48..000000000 --- a/verify/api_preview.go +++ /dev/null @@ -1,930 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio - -import ( - "encoding/json" - "fmt" - "github.com/twilio/twilio-go/client" - "strings" - "time" -) - -type PreviewApiService struct { - baseURL string - client *twilio.Client -} - -func NewPreviewApiService(client *twilio.Client) *PreviewApiService { - return &PreviewApiService{ - client: client, - baseURL: fmt.Sprintf("https://studio.%s", client.BaseURL), - } -} - -/* -V2FormsFormTypeGet Method for V2FormsFormTypeGet -Fetch the forms for a specific Form Type. - * @param formType The Type of this Form. Currently only `form-push` is supported. -@return VerifyV2Form -*/ -func (c *PreviewApiService) V2FormsFormTypeGet(formType string) (*VerifyV2Form, error) { - path := "/v2/Forms/{FormType}" - path = strings.Replace(path, "{"+"FormType"+"}", formType, -1) - - data := 0 - headers := 0 - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2Form{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidAccessTokensPostParams Optional parameters for the method 'V2ServicesServiceSidAccessTokensPost' -type V2ServicesServiceSidAccessTokensPostParams struct { - FactorType *string `json:"FactorType,omitempty"` - Identity *string `json:"Identity,omitempty"` -} - -/* -V2ServicesServiceSidAccessTokensPost Method for V2ServicesServiceSidAccessTokensPost -Create a new enrollment Access Token for the Entity - * @param serviceSid - * @param optional nil or *V2ServicesServiceSidAccessTokensPostOpts - Optional Parameters: - * @param "FactorType" (string) - The Type of this Factor. Eg. `push` - * @param "Identity" (string) - The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. -@return VerifyV2ServiceAccessToken -*/ -func (c *PreviewApiService) V2ServicesServiceSidAccessTokensPost(serviceSid string, params *V2ServicesServiceSidAccessTokensPostParams) (*VerifyV2ServiceAccessToken, error) { - path := "/v2/Services/{ServiceSid}/AccessTokens" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.FactorType != nil { - data["FactorType"] = *params.FactorType - } - if params.Identity != nil { - data["Identity"] = *params.Identity - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceAccessToken{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesGet' -type V2ServicesServiceSidEntitiesGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesGet Method for V2ServicesServiceSidEntitiesGet -Retrieve a list of all Entities for a Service. - * @param serviceSid The unique SID identifier of the Service. - * @param optional nil or *V2ServicesServiceSidEntitiesGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2001 -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesGet(serviceSid string, params *V2ServicesServiceSidEntitiesGetParams) (*InlineResponse2001, error) { - path := "/v2/Services/{ServiceSid}/Entities" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2001{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityChallengesGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityChallengesGet' -type V2ServicesServiceSidEntitiesIdentityChallengesGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - FactorSid *string `json:"FactorSid,omitempty"` - Status *string `json:"Status,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityChallengesGet Method for V2ServicesServiceSidEntitiesIdentityChallengesGet -Retrieve a list of all Challenges for a Factor. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Challenge - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityChallengesGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "FactorSid" (string) - The unique SID identifier of the Factor. - * @param "Status" (string) - The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2002 -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityChallengesGet(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityChallengesGetParams) (*InlineResponse2002, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.FactorSid != nil { - data["FactorSid"] = *params.FactorSid - } - if params.Status != nil { - data["Status"] = *params.Status - } - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2002{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityChallengesPostParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityChallengesPost' -type V2ServicesServiceSidEntitiesIdentityChallengesPostParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - Details *string `json:"Details,omitempty"` - ExpirationDate *time.Time `json:"ExpirationDate,omitempty"` - FactorSid *string `json:"FactorSid,omitempty"` - HiddenDetails *string `json:"HiddenDetails,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityChallengesPost Method for V2ServicesServiceSidEntitiesIdentityChallengesPost -Create a new Challenge for the Factor - * @param serviceSid The unique SID identifier of the Service. - * @param identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityChallengesPostOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "Details" (string) - Details provided to give context about the Challenge. Shown to the end user. It must be a stringified JSON with the following structure: {\\\"message\\\": \\\"string\\\", \\\"fields\\\": [ { \\\"label\\\": \\\"string\\\", \\\"value\\\": \\\"string\\\"}]}. `message` is required. If you send the `fields` property, each field has to include `label` and `value` properties. If you had set `include_date=true` in the `push` configuration of the [service](https://www.twilio.com/docs/verify/api/service), the response will also include the challenge's date created value as an additional field called `date` - * @param "ExpirationDate" (time.Time) - The future date in which this Challenge will expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - * @param "FactorSid" (string) - The unique SID identifier of the Factor. - * @param "HiddenDetails" (string) - Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` -@return VerifyV2ServiceEntityChallenge -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityChallengesPost(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityChallengesPostParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.Details != nil { - data["Details"] = *params.Details - } - if params.ExpirationDate != nil { - data["ExpirationDate"] = *params.ExpirationDate - } - if params.FactorSid != nil { - data["FactorSid"] = *params.FactorSid - } - if params.HiddenDetails != nil { - data["HiddenDetails"] = *params.HiddenDetails - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityChallengesSidGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityChallengesSidGet' -type V2ServicesServiceSidEntitiesIdentityChallengesSidGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityChallengesSidGet Method for V2ServicesServiceSidEntitiesIdentityChallengesSidGet -Fetch a specific Challenge. - * @param serviceSid The unique SID identifier of the Service. - * @param identity The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. - * @param sid A 34 character string that uniquely identifies this Challenge. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityChallengesSidGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header -@return VerifyV2ServiceEntityChallenge -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityChallengesSidGet(serviceSid string, identity string, sid string, params *V2ServicesServiceSidEntitiesIdentityChallengesSidGetParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityChallengesSidPostParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityChallengesSidPost' -type V2ServicesServiceSidEntitiesIdentityChallengesSidPostParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - AuthPayload *string `json:"AuthPayload,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityChallengesSidPost Method for V2ServicesServiceSidEntitiesIdentityChallengesSidPost -Verify a specific Challenge. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Challenge - * @param sid A 34 character string that uniquely identifies this Challenge. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityChallengesSidPostOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "AuthPayload" (string) - The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. -@return VerifyV2ServiceEntityChallenge -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityChallengesSidPost(serviceSid string, identity string, sid string, params *V2ServicesServiceSidEntitiesIdentityChallengesSidPostParams) (*VerifyV2ServiceEntityChallenge, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.AuthPayload != nil { - data["AuthPayload"] = *params.AuthPayload - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityChallenge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityDeleteParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityDelete' -type V2ServicesServiceSidEntitiesIdentityDeleteParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityDelete Method for V2ServicesServiceSidEntitiesIdentityDelete -Delete a specific Entity. - * @param serviceSid The unique SID identifier of the Service. - * @param identity The unique external identifier for the Entity of the Service - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityDeleteOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityDelete(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityDeleteParams) error { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -// V2ServicesServiceSidEntitiesIdentityFactorsGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityFactorsGet' -type V2ServicesServiceSidEntitiesIdentityFactorsGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityFactorsGet Method for V2ServicesServiceSidEntitiesIdentityFactorsGet -Retrieve a list of all Factors for an Entity. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Factor - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityFactorsGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2003 -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityFactorsGet(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityFactorsGetParams) (*InlineResponse2003, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2003{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityFactorsPostParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityFactorsPost' -type V2ServicesServiceSidEntitiesIdentityFactorsPostParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - Binding *string `json:"Binding,omitempty"` - Config *string `json:"Config,omitempty"` - FactorType *string `json:"FactorType,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityFactorsPost Method for V2ServicesServiceSidEntitiesIdentityFactorsPost -Create a new Factor for the Entity - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Factor - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityFactorsPostOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "Binding" (string) - A unique binding for this Factor that identifies it. E.g. the algorithm and public key for `push` factors. It must be a json string with the required properties for the given factor type. Required when creating a new Factor. This value is never returned because it can contain customer secrets. - * @param "Config" (string) - The config required for this Factor. It must be a json string with the required properties for the given factor type - * @param "FactorType" (string) - The Type of this Factor. Currently only `push` is supported - * @param "FriendlyName" (string) - The friendly name of this Factor -@return VerifyV2ServiceEntityFactor -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityFactorsPost(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityFactorsPostParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.Binding != nil { - data["Binding"] = *params.Binding - } - if params.Config != nil { - data["Config"] = *params.Config - } - if params.FactorType != nil { - data["FactorType"] = *params.FactorType - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityFactorsSidDelete' -type V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityFactorsSidDelete Method for V2ServicesServiceSidEntitiesIdentityFactorsSidDelete -Delete a specific Factor. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Factor - * @param sid A 34 character string that uniquely identifies this Factor. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityFactorsSidDelete(serviceSid string, identity string, sid string, params *V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteParams) error { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -// V2ServicesServiceSidEntitiesIdentityFactorsSidGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityFactorsSidGet' -type V2ServicesServiceSidEntitiesIdentityFactorsSidGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityFactorsSidGet Method for V2ServicesServiceSidEntitiesIdentityFactorsSidGet -Fetch a specific Factor. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Factor - * @param sid A 34 character string that uniquely identifies this Factor. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityFactorsSidGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header -@return VerifyV2ServiceEntityFactor -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityFactorsSidGet(serviceSid string, identity string, sid string, params *V2ServicesServiceSidEntitiesIdentityFactorsSidGetParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityFactorsSidPostParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityFactorsSidPost' -type V2ServicesServiceSidEntitiesIdentityFactorsSidPostParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - AuthPayload *string `json:"AuthPayload,omitempty"` - Config *string `json:"Config,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityFactorsSidPost Method for V2ServicesServiceSidEntitiesIdentityFactorsSidPost -Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. - * @param serviceSid The unique SID identifier of the Service. - * @param identity Customer unique identity for the Entity owner of the Factor - * @param sid A 34 character string that uniquely identifies this Factor. - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityFactorsSidPostOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "AuthPayload" (string) - The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. - * @param "Config" (string) - The new config for this Factor. It must be a json string with the required properties for the given factor type - * @param "FriendlyName" (string) - The new friendly name of this Factor -@return VerifyV2ServiceEntityFactor -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityFactorsSidPost(serviceSid string, identity string, sid string, params *V2ServicesServiceSidEntitiesIdentityFactorsSidPostParams) (*VerifyV2ServiceEntityFactor, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.AuthPayload != nil { - data["AuthPayload"] = *params.AuthPayload - } - if params.Config != nil { - data["Config"] = *params.Config - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntityFactor{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesIdentityGetParams Optional parameters for the method 'V2ServicesServiceSidEntitiesIdentityGet' -type V2ServicesServiceSidEntitiesIdentityGetParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesIdentityGet Method for V2ServicesServiceSidEntitiesIdentityGet -Fetch a specific Entity. - * @param serviceSid The unique SID identifier of the Service. - * @param identity The unique external identifier for the Entity of the Service - * @param optional nil or *V2ServicesServiceSidEntitiesIdentityGetOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header -@return VerifyV2ServiceEntity -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesIdentityGet(serviceSid string, identity string, params *V2ServicesServiceSidEntitiesIdentityGetParams) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities/{Identity}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Identity"+"}", identity, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidEntitiesPostParams Optional parameters for the method 'V2ServicesServiceSidEntitiesPost' -type V2ServicesServiceSidEntitiesPostParams struct { - TwilioSandboxMode *string `json:"Twilio-Sandbox-Mode,omitempty"` - Identity *string `json:"Identity,omitempty"` -} - -/* -V2ServicesServiceSidEntitiesPost Method for V2ServicesServiceSidEntitiesPost -Create a new Entity for the Service - * @param serviceSid The unique SID identifier of the Service. - * @param optional nil or *V2ServicesServiceSidEntitiesPostOpts - Optional Parameters: - * @param "TwilioSandboxMode" (string) - The Twilio-Sandbox-Mode HTTP request header - * @param "Identity" (string) - The unique external identifier for the Entity of the Service -@return VerifyV2ServiceEntity -*/ -func (c *PreviewApiService) V2ServicesServiceSidEntitiesPost(serviceSid string, params *V2ServicesServiceSidEntitiesPostParams) (*VerifyV2ServiceEntity, error) { - path := "/v2/Services/{ServiceSid}/Entities" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := make(map[string]interface{}) - - if params.Identity != nil { - data["Identity"] = *params.Identity - } - - if params.TwilioSandboxMode != nil { - headers["Twilio-Sandbox-Mode"] = *params.TwilioSandboxMode - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceEntity{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidWebhooksGetParams Optional parameters for the method 'V2ServicesServiceSidWebhooksGet' -type V2ServicesServiceSidWebhooksGetParams struct { - PageSize *int32 `json:"PageSize,omitempty"` -} - -/* -V2ServicesServiceSidWebhooksGet Method for V2ServicesServiceSidWebhooksGet -Retrieve a list of all Webhooks for a Service. - * @param serviceSid The unique SID identifier of the Service. - * @param optional nil or *V2ServicesServiceSidWebhooksGetOpts - Optional Parameters: - * @param "PageSize" (int32) - How many resources to return in each list page. The default is 50, and the maximum is 1000. -@return InlineResponse2007 -*/ -func (c *PreviewApiService) V2ServicesServiceSidWebhooksGet(serviceSid string, params *V2ServicesServiceSidWebhooksGetParams) (*InlineResponse2007, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.PageSize != nil { - data["PageSize"] = *params.PageSize - } - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &InlineResponse2007{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidWebhooksPostParams Optional parameters for the method 'V2ServicesServiceSidWebhooksPost' -type V2ServicesServiceSidWebhooksPostParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` -} - -/* -V2ServicesServiceSidWebhooksPost Method for V2ServicesServiceSidWebhooksPost -Create a new Webhook for the Service - * @param serviceSid The unique SID identifier of the Service. - * @param optional nil or *V2ServicesServiceSidWebhooksPostOpts - Optional Parameters: - * @param "EventTypes" ([]string) - The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` - * @param "FriendlyName" (string) - The string that you assigned to describe the webhook. **This value should not contain PII.** - * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` - * @param "WebhookUrl" (string) - The URL associated with this Webhook. -@return VerifyV2ServiceWebhook -*/ -func (c *PreviewApiService) V2ServicesServiceSidWebhooksPost(serviceSid string, params *V2ServicesServiceSidWebhooksPostParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.EventTypes != nil { - data["EventTypes"] = *params.EventTypes - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - if params.Status != nil { - data["Status"] = *params.Status - } - if params.WebhookUrl != nil { - data["WebhookUrl"] = *params.WebhookUrl - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -/* -V2ServicesServiceSidWebhooksSidDelete Method for V2ServicesServiceSidWebhooksSidDelete -Delete a specific Webhook. - * @param serviceSid The unique SID identifier of the Service. - * @param sid The Twilio-provided string that uniquely identifies the Webhook resource to delete. -*/ -func (c *PreviewApiService) V2ServicesServiceSidWebhooksSidDelete(serviceSid string, sid string) error { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - resp, err := c.client.Delete(c.baseURL+path, data, headers) - if err != nil { - return err - } - - defer resp.Body.Close() - - return nil -} - -/* -V2ServicesServiceSidWebhooksSidGet Method for V2ServicesServiceSidWebhooksSidGet -Fetch a specific Webhook. - * @param serviceSid The unique SID identifier of the Service. - * @param sid The Twilio-provided string that uniquely identifies the Webhook resource to fetch. -@return VerifyV2ServiceWebhook -*/ -func (c *PreviewApiService) V2ServicesServiceSidWebhooksSidGet(serviceSid string, sid string) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := 0 - headers := 0 - - resp, err := c.client.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} - -// V2ServicesServiceSidWebhooksSidPostParams Optional parameters for the method 'V2ServicesServiceSidWebhooksSidPost' -type V2ServicesServiceSidWebhooksSidPostParams struct { - EventTypes *[]string `json:"EventTypes,omitempty"` - FriendlyName *string `json:"FriendlyName,omitempty"` - Status *string `json:"Status,omitempty"` - WebhookUrl *string `json:"WebhookUrl,omitempty"` -} - -/* -V2ServicesServiceSidWebhooksSidPost Method for V2ServicesServiceSidWebhooksSidPost - * @param serviceSid The unique SID identifier of the Service. - * @param sid The Twilio-provided string that uniquely identifies the Webhook resource to update. - * @param optional nil or *V2ServicesServiceSidWebhooksSidPostOpts - Optional Parameters: - * @param "EventTypes" ([]string) - The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` - * @param "FriendlyName" (string) - The string that you assigned to describe the webhook. **This value should not contain PII.** - * @param "Status" (string) - The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` - * @param "WebhookUrl" (string) - The URL associated with this Webhook. -@return VerifyV2ServiceWebhook -*/ -func (c *PreviewApiService) V2ServicesServiceSidWebhooksSidPost(serviceSid string, sid string, params *V2ServicesServiceSidWebhooksSidPostParams) (*VerifyV2ServiceWebhook, error) { - path := "/v2/Services/{ServiceSid}/Webhooks/{Sid}" - path = strings.Replace(path, "{"+"ServiceSid"+"}", serviceSid, -1) - path = strings.Replace(path, "{"+"Sid"+"}", sid, -1) - - data := make(map[string]interface{}) - headers := 0 - - if params.EventTypes != nil { - data["EventTypes"] = *params.EventTypes - } - if params.FriendlyName != nil { - data["FriendlyName"] = *params.FriendlyName - } - if params.Status != nil { - data["Status"] = *params.Status - } - if params.WebhookUrl != nil { - data["WebhookUrl"] = *params.WebhookUrl - } - - resp, err := c.client.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - ps := &VerifyV2ServiceWebhook{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err -} diff --git a/verify/api_service.go b/verify/api_service.go deleted file mode 100644 index 7f1106e43..000000000 --- a/verify/api_service.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio - -import ( - twilio "github.com/twilio/twilio-go/client" -) - -type ApiService struct { - GAApi *GAApiService - PreviewApi *PreviewApiService - -} - -func NewApiService(client *twilio.Client) *ApiService { - return &ApiService{ - GAApi: NewGAApiService(client), - PreviewApi: NewPreviewApiService(client), - - } -} diff --git a/verify/docs/GAApi.md b/verify/docs/GAApi.md deleted file mode 100644 index f333281af..000000000 --- a/verify/docs/GAApi.md +++ /dev/null @@ -1,1069 +0,0 @@ -# \GAApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**V2ServicesGet**](GAApi.md#V2ServicesGet) | **Get** /v2/Services | -[**V2ServicesPost**](GAApi.md#V2ServicesPost) | **Post** /v2/Services | -[**V2ServicesServiceSidMessagingConfigurationsCountryDelete**](GAApi.md#V2ServicesServiceSidMessagingConfigurationsCountryDelete) | **Delete** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -[**V2ServicesServiceSidMessagingConfigurationsCountryGet**](GAApi.md#V2ServicesServiceSidMessagingConfigurationsCountryGet) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -[**V2ServicesServiceSidMessagingConfigurationsCountryPost**](GAApi.md#V2ServicesServiceSidMessagingConfigurationsCountryPost) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations/{Country} | -[**V2ServicesServiceSidMessagingConfigurationsGet**](GAApi.md#V2ServicesServiceSidMessagingConfigurationsGet) | **Get** /v2/Services/{ServiceSid}/MessagingConfigurations | -[**V2ServicesServiceSidMessagingConfigurationsPost**](GAApi.md#V2ServicesServiceSidMessagingConfigurationsPost) | **Post** /v2/Services/{ServiceSid}/MessagingConfigurations | -[**V2ServicesServiceSidRateLimitsGet**](GAApi.md#V2ServicesServiceSidRateLimitsGet) | **Get** /v2/Services/{ServiceSid}/RateLimits | -[**V2ServicesServiceSidRateLimitsPost**](GAApi.md#V2ServicesServiceSidRateLimitsPost) | **Post** /v2/Services/{ServiceSid}/RateLimits | -[**V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet**](GAApi.md#V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | -[**V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost**](GAApi.md#V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets | -[**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete**](GAApi.md#V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -[**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet**](GAApi.md#V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet) | **Get** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -[**V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost**](GAApi.md#V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{RateLimitSid}/Buckets/{Sid} | -[**V2ServicesServiceSidRateLimitsSidDelete**](GAApi.md#V2ServicesServiceSidRateLimitsSidDelete) | **Delete** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -[**V2ServicesServiceSidRateLimitsSidGet**](GAApi.md#V2ServicesServiceSidRateLimitsSidGet) | **Get** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -[**V2ServicesServiceSidRateLimitsSidPost**](GAApi.md#V2ServicesServiceSidRateLimitsSidPost) | **Post** /v2/Services/{ServiceSid}/RateLimits/{Sid} | -[**V2ServicesServiceSidVerificationCheckPost**](GAApi.md#V2ServicesServiceSidVerificationCheckPost) | **Post** /v2/Services/{ServiceSid}/VerificationCheck | -[**V2ServicesServiceSidVerificationsPost**](GAApi.md#V2ServicesServiceSidVerificationsPost) | **Post** /v2/Services/{ServiceSid}/Verifications | -[**V2ServicesServiceSidVerificationsSidGet**](GAApi.md#V2ServicesServiceSidVerificationsSidGet) | **Get** /v2/Services/{ServiceSid}/Verifications/{Sid} | -[**V2ServicesServiceSidVerificationsSidPost**](GAApi.md#V2ServicesServiceSidVerificationsSidPost) | **Post** /v2/Services/{ServiceSid}/Verifications/{Sid} | -[**V2ServicesSidDelete**](GAApi.md#V2ServicesSidDelete) | **Delete** /v2/Services/{Sid} | -[**V2ServicesSidGet**](GAApi.md#V2ServicesSidGet) | **Get** /v2/Services/{Sid} | -[**V2ServicesSidPost**](GAApi.md#V2ServicesSidPost) | **Post** /v2/Services/{Sid} | - - - -## V2ServicesGet - -> InlineResponse200 V2ServicesGet(ctx, optional) - - - -Retrieve a list of all Verification Services for an account. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***V2ServicesGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse200**](inline_response_200.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesPost - -> VerifyV2Service V2ServicesPost(ctx, optional) - - - -Create a new Verification Service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***V2ServicesPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **codeLength** | **optional.**| The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | - **customCodeEnabled** | **optional.**| Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | - **doNotShareWarningEnabled** | **optional.**| Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` | - **dtmfInputRequired** | **optional.**| Whether to ask the user to press a number before delivering the verify code in a phone call. | - **friendlyName** | **optional.**| A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** | - **lookupEnabled** | **optional.**| Whether to perform a lookup with each verification started and return info about the phone number. | - **psd2Enabled** | **optional.**| Whether to pass PSD2 transaction parameters when starting a verification. | - **push** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\\\"notify_service_sid\\\": \\\"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\\", \\\"include_date\\\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info | - **skipSmsToLandlines** | **optional.**| Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | - **ttsName** | **optional.**| The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | - -### Return type - -[**VerifyV2Service**](verify.v2.service.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidMessagingConfigurationsCountryDelete - -> V2ServicesServiceSidMessagingConfigurationsCountryDelete(ctx, serviceSid, country) - - - -Delete a specific MessagingConfiguration. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | -**country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidMessagingConfigurationsCountryGet - -> VerifyV2ServiceMessagingConfiguration V2ServicesServiceSidMessagingConfigurationsCountryGet(ctx, serviceSid, country) - - - -Fetch a specific MessagingConfiguration. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | -**country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | - -### Return type - -[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidMessagingConfigurationsCountryPost - -> VerifyV2ServiceMessagingConfiguration V2ServicesServiceSidMessagingConfigurationsCountryPost(ctx, serviceSid, country, optional) - - - -Update a specific MessagingConfiguration - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | -**country** | **string**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | - **optional** | ***V2ServicesServiceSidMessagingConfigurationsCountryPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidMessagingConfigurationsCountryPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **messagingServiceSid** | **optional.**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | - -### Return type - -[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidMessagingConfigurationsGet - -> InlineResponse2004 V2ServicesServiceSidMessagingConfigurationsGet(ctx, serviceSid, optional) - - - -Retrieve a list of all Messaging Configurations for a Service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | - **optional** | ***V2ServicesServiceSidMessagingConfigurationsGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidMessagingConfigurationsGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2004**](inline_response_200_4.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidMessagingConfigurationsPost - -> VerifyV2ServiceMessagingConfiguration V2ServicesServiceSidMessagingConfigurationsPost(ctx, serviceSid, optional) - - - -Create a new MessagingConfiguration for a service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with. | - **optional** | ***V2ServicesServiceSidMessagingConfigurationsPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidMessagingConfigurationsPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **country** | **optional.**| The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | - **messagingServiceSid** | **optional.**| The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | - -### Return type - -[**VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsGet - -> InlineResponse2005 V2ServicesServiceSidRateLimitsGet(ctx, serviceSid, optional) - - - -Retrieve a list of all Rate Limits for a service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | - **optional** | ***V2ServicesServiceSidRateLimitsGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2005**](inline_response_200_5.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsPost - -> VerifyV2ServiceRateLimit V2ServicesServiceSidRateLimitsPost(ctx, serviceSid, optional) - - - -Create a new Rate Limit for a Service - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | - **optional** | ***V2ServicesServiceSidRateLimitsPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **description** | **optional.**| Description of this Rate Limit | - **uniqueName** | **optional.**| Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** | - -### Return type - -[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet - -> InlineResponse2006 V2ServicesServiceSidRateLimitsRateLimitSidBucketsGet(ctx, serviceSid, rateLimitSid, optional) - - - -Retrieve a list of all Buckets for a Rate Limit. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**rateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | - **optional** | ***V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsRateLimitSidBucketsGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2006**](inline_response_200_6.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost - -> VerifyV2ServiceRateLimitBucket V2ServicesServiceSidRateLimitsRateLimitSidBucketsPost(ctx, serviceSid, rateLimitSid, optional) - - - -Create a new Bucket for a Rate Limit - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**rateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | - **optional** | ***V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsRateLimitSidBucketsPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **interval** | **optional.**| Number of seconds that the rate limit will be enforced over. | - **max** | **optional.**| Maximum number of requests permitted in during the interval. | - -### Return type - -[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete - -> V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidDelete(ctx, serviceSid, rateLimitSid, sid) - - - -Delete a specific Bucket. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**rateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | -**sid** | **string**| A 34 character string that uniquely identifies this Bucket. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet - -> VerifyV2ServiceRateLimitBucket V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidGet(ctx, serviceSid, rateLimitSid, sid) - - - -Fetch a specific Bucket. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**rateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | -**sid** | **string**| A 34 character string that uniquely identifies this Bucket. | - -### Return type - -[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost - -> VerifyV2ServiceRateLimitBucket V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPost(ctx, serviceSid, rateLimitSid, sid, optional) - - - -Update a specific Bucket. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**rateLimitSid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource. | -**sid** | **string**| A 34 character string that uniquely identifies this Bucket. | - **optional** | ***V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsRateLimitSidBucketsSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **interval** | **optional.**| Number of seconds that the rate limit will be enforced over. | - **max** | **optional.**| Maximum number of requests permitted in during the interval. | - -### Return type - -[**VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsSidDelete - -> V2ServicesServiceSidRateLimitsSidDelete(ctx, serviceSid, sid) - - - -Delete a specific Rate Limit. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsSidGet - -> VerifyV2ServiceRateLimit V2ServicesServiceSidRateLimitsSidGet(ctx, serviceSid, sid) - - - -Fetch a specific Rate Limit. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | - -### Return type - -[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidRateLimitsSidPost - -> VerifyV2ServiceRateLimit V2ServicesServiceSidRateLimitsSidPost(ctx, serviceSid, sid, optional) - - - -Update a specific Rate Limit. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch. | - **optional** | ***V2ServicesServiceSidRateLimitsSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidRateLimitsSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **description** | **optional.**| Description of this Rate Limit | - -### Return type - -[**VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidVerificationCheckPost - -> VerifyV2ServiceVerificationCheck V2ServicesServiceSidVerificationCheckPost(ctx, serviceSid, optional) - - - -challenge a specific Verification Check. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. | - **optional** | ***V2ServicesServiceSidVerificationCheckPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidVerificationCheckPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **amount** | **optional.**| The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | - **code** | **optional.**| The 4-10 character string being verified. | - **payee** | **optional.**| The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | - **to** | **optional.**| The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | - **verificationSid** | **optional.**| A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. | - -### Return type - -[**VerifyV2ServiceVerificationCheck**](verify.v2.service.verification_check.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidVerificationsPost - -> VerifyV2ServiceVerification V2ServicesServiceSidVerificationsPost(ctx, serviceSid, optional) - - - -Create a new Verification using a Service - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under. | - **optional** | ***V2ServicesServiceSidVerificationsPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidVerificationsPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **amount** | **optional.**| The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | - **appHash** | **optional.**| Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. | - **channel** | **optional.**| The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. | - **channelConfiguration** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. | - **customCode** | **optional.**| A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. | - **customFriendlyName** | **optional.**| A custom user defined friendly name that overwrites the existing one in the verification message | - **customMessage** | **optional.**| The text of a custom message to use for the verification. | - **locale** | **optional.**| The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` | - **payee** | **optional.**| The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | - **rateLimits** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. | - **sendDigits** | **optional.**| The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). | - **to** | **optional.**| The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | - -### Return type - -[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidVerificationsSidGet - -> VerifyV2ServiceVerification V2ServicesServiceSidVerificationsSidGet(ctx, serviceSid, sid) - - - -Fetch a specific Verification - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to fetch the resource from. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Verification resource to fetch. | - -### Return type - -[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidVerificationsSidPost - -> VerifyV2ServiceVerification V2ServicesServiceSidVerificationsSidPost(ctx, serviceSid, sid, optional) - - - -Update a Verification status - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to update the resource from. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Verification resource to update. | - **optional** | ***V2ServicesServiceSidVerificationsSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidVerificationsSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **status** | **optional.**| The new status of the resource. Can be: `canceled` or `approved`. | - -### Return type - -[**VerifyV2ServiceVerification**](verify.v2.service.verification.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesSidDelete - -> V2ServicesSidDelete(ctx, sid) - - - -Delete a specific Verification Service Instance. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The Twilio-provided string that uniquely identifies the Verification Service resource to delete. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesSidGet - -> VerifyV2Service V2ServicesSidGet(ctx, sid) - - - -Fetch specific Verification Service Instance. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The Twilio-provided string that uniquely identifies the Verification Service resource to fetch. | - -### Return type - -[**VerifyV2Service**](verify.v2.service.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesSidPost - -> VerifyV2Service V2ServicesSidPost(ctx, sid, optional) - - - -Update a specific Verification Service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sid** | **string**| The Twilio-provided string that uniquely identifies the Service resource to update. | - **optional** | ***V2ServicesSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **codeLength** | **optional.**| The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | - **customCodeEnabled** | **optional.**| Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | - **doNotShareWarningEnabled** | **optional.**| Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** | - **dtmfInputRequired** | **optional.**| Whether to ask the user to press a number before delivering the verify code in a phone call. | - **friendlyName** | **optional.**| A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** | - **lookupEnabled** | **optional.**| Whether to perform a lookup with each verification started and return info about the phone number. | - **psd2Enabled** | **optional.**| Whether to pass PSD2 transaction parameters when starting a verification. | - **push** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\\\"notify_service_sid\\\": \\\"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\\", \\\"include_date\\\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info | - **skipSmsToLandlines** | **optional.**| Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | - **ttsName** | **optional.**| The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | - -### Return type - -[**VerifyV2Service**](verify.v2.service.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/verify/docs/InlineObject.md b/verify/docs/InlineObject.md deleted file mode 100644 index a1c123e8f..000000000 --- a/verify/docs/InlineObject.md +++ /dev/null @@ -1,20 +0,0 @@ -# InlineObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CodeLength** | **int32** | The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | [optional] -**CustomCodeEnabled** | **bool** | Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | [optional] -**DoNotShareWarningEnabled** | **bool** | Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` | [optional] -**DtmfInputRequired** | **bool** | Whether to ask the user to press a number before delivering the verify code in a phone call. | [optional] -**FriendlyName** | **string** | A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** | -**LookupEnabled** | **bool** | Whether to perform a lookup with each verification started and return info about the phone number. | [optional] -**Psd2Enabled** | **bool** | Whether to pass PSD2 transaction parameters when starting a verification. | [optional] -**Push** | **map[string]interface{}** | Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\"notify_service_sid\": \"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", \"include_date\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info | [optional] -**SkipSmsToLandlines** | **bool** | Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | [optional] -**TtsName** | **string** | The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject1.md b/verify/docs/InlineObject1.md deleted file mode 100644 index d63dc50dd..000000000 --- a/verify/docs/InlineObject1.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FactorType** | **string** | The Type of this Factor. Eg. `push` | -**Identity** | **string** | The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject10.md b/verify/docs/InlineObject10.md deleted file mode 100644 index 8afa2501e..000000000 --- a/verify/docs/InlineObject10.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject10 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Interval** | **int32** | Number of seconds that the rate limit will be enforced over. | -**Max** | **int32** | Maximum number of requests permitted in during the interval. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject11.md b/verify/docs/InlineObject11.md deleted file mode 100644 index 89e253832..000000000 --- a/verify/docs/InlineObject11.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject11 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Interval** | **int32** | Number of seconds that the rate limit will be enforced over. | [optional] -**Max** | **int32** | Maximum number of requests permitted in during the interval. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject12.md b/verify/docs/InlineObject12.md deleted file mode 100644 index 532953c25..000000000 --- a/verify/docs/InlineObject12.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject12 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | Description of this Rate Limit | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject13.md b/verify/docs/InlineObject13.md deleted file mode 100644 index 92049f7de..000000000 --- a/verify/docs/InlineObject13.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineObject13 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Amount** | **string** | The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] -**Code** | **string** | The 4-10 character string being verified. | -**Payee** | **string** | The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] -**To** | **string** | The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | [optional] -**VerificationSid** | **string** | A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject14.md b/verify/docs/InlineObject14.md deleted file mode 100644 index aefebeb18..000000000 --- a/verify/docs/InlineObject14.md +++ /dev/null @@ -1,22 +0,0 @@ -# InlineObject14 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Amount** | **string** | The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] -**AppHash** | **string** | Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. | [optional] -**Channel** | **string** | The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. | -**ChannelConfiguration** | **map[string]interface{}** | [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. | [optional] -**CustomCode** | **string** | A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. | [optional] -**CustomFriendlyName** | **string** | A custom user defined friendly name that overwrites the existing one in the verification message | [optional] -**CustomMessage** | **string** | The text of a custom message to use for the verification. | [optional] -**Locale** | **string** | The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` | [optional] -**Payee** | **string** | The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. | [optional] -**RateLimits** | **map[string]interface{}** | The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. | [optional] -**SendDigits** | **string** | The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). | [optional] -**To** | **string** | The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject15.md b/verify/docs/InlineObject15.md deleted file mode 100644 index 4199b1424..000000000 --- a/verify/docs/InlineObject15.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject15 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | **string** | The new status of the resource. Can be: `canceled` or `approved`. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject16.md b/verify/docs/InlineObject16.md deleted file mode 100644 index 97c55081e..000000000 --- a/verify/docs/InlineObject16.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject16 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EventTypes** | **[]string** | The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | -**FriendlyName** | **string** | The string that you assigned to describe the webhook. **This value should not contain PII.** | -**Status** | **string** | The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | [optional] -**WebhookUrl** | **string** | The URL associated with this Webhook. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject17.md b/verify/docs/InlineObject17.md deleted file mode 100644 index 4ef9ff7f5..000000000 --- a/verify/docs/InlineObject17.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject17 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EventTypes** | **[]string** | The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | [optional] -**FriendlyName** | **string** | The string that you assigned to describe the webhook. **This value should not contain PII.** | [optional] -**Status** | **string** | The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | [optional] -**WebhookUrl** | **string** | The URL associated with this Webhook. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject18.md b/verify/docs/InlineObject18.md deleted file mode 100644 index d876ade62..000000000 --- a/verify/docs/InlineObject18.md +++ /dev/null @@ -1,20 +0,0 @@ -# InlineObject18 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CodeLength** | **int32** | The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. | [optional] -**CustomCodeEnabled** | **bool** | Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. | [optional] -**DoNotShareWarningEnabled** | **bool** | Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** | [optional] -**DtmfInputRequired** | **bool** | Whether to ask the user to press a number before delivering the verify code in a phone call. | [optional] -**FriendlyName** | **string** | A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** | [optional] -**LookupEnabled** | **bool** | Whether to perform a lookup with each verification started and return info about the phone number. | [optional] -**Psd2Enabled** | **bool** | Whether to pass PSD2 transaction parameters when starting a verification. | [optional] -**Push** | **map[string]interface{}** | Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\"notify_service_sid\": \"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", \"include_date\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info | [optional] -**SkipSmsToLandlines** | **bool** | Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. | [optional] -**TtsName** | **string** | The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject2.md b/verify/docs/InlineObject2.md deleted file mode 100644 index 2ef7fd03f..000000000 --- a/verify/docs/InlineObject2.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identity** | **string** | The unique external identifier for the Entity of the Service | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject3.md b/verify/docs/InlineObject3.md deleted file mode 100644 index 8e7d4200f..000000000 --- a/verify/docs/InlineObject3.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Details** | **string** | Details provided to give context about the Challenge. Shown to the end user. It must be a stringified JSON with the following structure: {\"message\": \"string\", \"fields\": [ { \"label\": \"string\", \"value\": \"string\"}]}. `message` is required. If you send the `fields` property, each field has to include `label` and `value` properties. If you had set `include_date=true` in the `push` configuration of the [service](https://www.twilio.com/docs/verify/api/service), the response will also include the challenge's date created value as an additional field called `date` | [optional] -**ExpirationDate** | [**time.Time**](time.Time.md) | The future date in which this Challenge will expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | [optional] -**FactorSid** | **string** | The unique SID identifier of the Factor. | -**HiddenDetails** | **string** | Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\"ip\": \"172.168.1.234\"}` | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject4.md b/verify/docs/InlineObject4.md deleted file mode 100644 index 93e111aa5..000000000 --- a/verify/docs/InlineObject4.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject4 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthPayload** | **string** | The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject5.md b/verify/docs/InlineObject5.md deleted file mode 100644 index 3343361c8..000000000 --- a/verify/docs/InlineObject5.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineObject5 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Binding** | **string** | A unique binding for this Factor that identifies it. E.g. the algorithm and public key for `push` factors. It must be a json string with the required properties for the given factor type. Required when creating a new Factor. This value is never returned because it can contain customer secrets. | -**Config** | **string** | The config required for this Factor. It must be a json string with the required properties for the given factor type | -**FactorType** | **string** | The Type of this Factor. Currently only `push` is supported | -**FriendlyName** | **string** | The friendly name of this Factor | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject6.md b/verify/docs/InlineObject6.md deleted file mode 100644 index c5a8f0c6d..000000000 --- a/verify/docs/InlineObject6.md +++ /dev/null @@ -1,13 +0,0 @@ -# InlineObject6 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthPayload** | **string** | The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. | [optional] -**Config** | **string** | The new config for this Factor. It must be a json string with the required properties for the given factor type | [optional] -**FriendlyName** | **string** | The new friendly name of this Factor | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject7.md b/verify/docs/InlineObject7.md deleted file mode 100644 index 0d87e3920..000000000 --- a/verify/docs/InlineObject7.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject7 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Country** | **string** | The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. | -**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject8.md b/verify/docs/InlineObject8.md deleted file mode 100644 index 3861605fb..000000000 --- a/verify/docs/InlineObject8.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineObject8 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessagingServiceSid** | **string** | The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineObject9.md b/verify/docs/InlineObject9.md deleted file mode 100644 index cf1096789..000000000 --- a/verify/docs/InlineObject9.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineObject9 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | Description of this Rate Limit | [optional] -**UniqueName** | **string** | Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse200.md b/verify/docs/InlineResponse200.md deleted file mode 100644 index 2eaa3a161..000000000 --- a/verify/docs/InlineResponse200.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] -**Services** | [**[]VerifyV2Service**](verify.v2.service.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2001.md b/verify/docs/InlineResponse2001.md deleted file mode 100644 index c46b2001b..000000000 --- a/verify/docs/InlineResponse2001.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2001 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Entities** | [**[]VerifyV2ServiceEntity**](verify.v2.service.entity.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2002.md b/verify/docs/InlineResponse2002.md deleted file mode 100644 index 4282cc6b7..000000000 --- a/verify/docs/InlineResponse2002.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2002 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Challenges** | [**[]VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2003.md b/verify/docs/InlineResponse2003.md deleted file mode 100644 index ee7485dc6..000000000 --- a/verify/docs/InlineResponse2003.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2003 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Factors** | [**[]VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2004.md b/verify/docs/InlineResponse2004.md deleted file mode 100644 index 5a8cfb75d..000000000 --- a/verify/docs/InlineResponse2004.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2004 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessagingConfigurations** | [**[]VerifyV2ServiceMessagingConfiguration**](verify.v2.service.messaging_configuration.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2005.md b/verify/docs/InlineResponse2005.md deleted file mode 100644 index 13ecbd221..000000000 --- a/verify/docs/InlineResponse2005.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2005 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] -**RateLimits** | [**[]VerifyV2ServiceRateLimit**](verify.v2.service.rate_limit.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2006.md b/verify/docs/InlineResponse2006.md deleted file mode 100644 index e0c004e6b..000000000 --- a/verify/docs/InlineResponse2006.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2006 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Buckets** | [**[]VerifyV2ServiceRateLimitBucket**](verify.v2.service.rate_limit.bucket.md) | | [optional] -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse2007.md b/verify/docs/InlineResponse2007.md deleted file mode 100644 index c82c05d12..000000000 --- a/verify/docs/InlineResponse2007.md +++ /dev/null @@ -1,12 +0,0 @@ -# InlineResponse2007 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Meta** | [**InlineResponse200Meta**](inline_response_200_meta.md) | | [optional] -**Webhooks** | [**[]VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/InlineResponse200Meta.md b/verify/docs/InlineResponse200Meta.md deleted file mode 100644 index cfde5a387..000000000 --- a/verify/docs/InlineResponse200Meta.md +++ /dev/null @@ -1,17 +0,0 @@ -# InlineResponse200Meta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstPageUrl** | **string** | | [optional] -**Key** | **string** | | [optional] -**NextPageUrl** | **string** | | [optional] -**Page** | **int32** | | [optional] -**PageSize** | **int32** | | [optional] -**PreviousPageUrl** | **string** | | [optional] -**Url** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/docs/PreviewApi.md b/verify/docs/PreviewApi.md deleted file mode 100644 index 2cb6f8684..000000000 --- a/verify/docs/PreviewApi.md +++ /dev/null @@ -1,954 +0,0 @@ -# \PreviewApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**V2FormsFormTypeGet**](PreviewApi.md#V2FormsFormTypeGet) | **Get** /v2/Forms/{FormType} | -[**V2ServicesServiceSidAccessTokensPost**](PreviewApi.md#V2ServicesServiceSidAccessTokensPost) | **Post** /v2/Services/{ServiceSid}/AccessTokens | -[**V2ServicesServiceSidEntitiesGet**](PreviewApi.md#V2ServicesServiceSidEntitiesGet) | **Get** /v2/Services/{ServiceSid}/Entities | -[**V2ServicesServiceSidEntitiesIdentityChallengesGet**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityChallengesGet) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | -[**V2ServicesServiceSidEntitiesIdentityChallengesPost**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityChallengesPost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges | -[**V2ServicesServiceSidEntitiesIdentityChallengesSidGet**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityChallengesSidGet) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | -[**V2ServicesServiceSidEntitiesIdentityChallengesSidPost**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityChallengesSidPost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Challenges/{Sid} | -[**V2ServicesServiceSidEntitiesIdentityDelete**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityDelete) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity} | -[**V2ServicesServiceSidEntitiesIdentityFactorsGet**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityFactorsGet) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | -[**V2ServicesServiceSidEntitiesIdentityFactorsPost**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityFactorsPost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors | -[**V2ServicesServiceSidEntitiesIdentityFactorsSidDelete**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityFactorsSidDelete) | **Delete** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -[**V2ServicesServiceSidEntitiesIdentityFactorsSidGet**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityFactorsSidGet) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -[**V2ServicesServiceSidEntitiesIdentityFactorsSidPost**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityFactorsSidPost) | **Post** /v2/Services/{ServiceSid}/Entities/{Identity}/Factors/{Sid} | -[**V2ServicesServiceSidEntitiesIdentityGet**](PreviewApi.md#V2ServicesServiceSidEntitiesIdentityGet) | **Get** /v2/Services/{ServiceSid}/Entities/{Identity} | -[**V2ServicesServiceSidEntitiesPost**](PreviewApi.md#V2ServicesServiceSidEntitiesPost) | **Post** /v2/Services/{ServiceSid}/Entities | -[**V2ServicesServiceSidWebhooksGet**](PreviewApi.md#V2ServicesServiceSidWebhooksGet) | **Get** /v2/Services/{ServiceSid}/Webhooks | -[**V2ServicesServiceSidWebhooksPost**](PreviewApi.md#V2ServicesServiceSidWebhooksPost) | **Post** /v2/Services/{ServiceSid}/Webhooks | -[**V2ServicesServiceSidWebhooksSidDelete**](PreviewApi.md#V2ServicesServiceSidWebhooksSidDelete) | **Delete** /v2/Services/{ServiceSid}/Webhooks/{Sid} | -[**V2ServicesServiceSidWebhooksSidGet**](PreviewApi.md#V2ServicesServiceSidWebhooksSidGet) | **Get** /v2/Services/{ServiceSid}/Webhooks/{Sid} | -[**V2ServicesServiceSidWebhooksSidPost**](PreviewApi.md#V2ServicesServiceSidWebhooksSidPost) | **Post** /v2/Services/{ServiceSid}/Webhooks/{Sid} | - - - -## V2FormsFormTypeGet - -> VerifyV2Form V2FormsFormTypeGet(ctx, formType) - - - -Fetch the forms for a specific Form Type. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**formType** | **string**| The Type of this Form. Currently only `form-push` is supported. | - -### Return type - -[**VerifyV2Form**](verify.v2.form.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidAccessTokensPost - -> VerifyV2ServiceAccessToken V2ServicesServiceSidAccessTokensPost(ctx, serviceSid, optional) - - - -Create a new enrollment Access Token for the Entity - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| | - **optional** | ***V2ServicesServiceSidAccessTokensPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidAccessTokensPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **factorType** | **optional.**| The Type of this Factor. Eg. `push` | - **identity** | **optional.**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | - -### Return type - -[**VerifyV2ServiceAccessToken**](verify.v2.service.access_token.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesGet - -> InlineResponse2001 V2ServicesServiceSidEntitiesGet(ctx, serviceSid, optional) - - - -Retrieve a list of all Entities for a Service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | - **optional** | ***V2ServicesServiceSidEntitiesGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2001**](inline_response_200_1.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityChallengesGet - -> InlineResponse2002 V2ServicesServiceSidEntitiesIdentityChallengesGet(ctx, serviceSid, identity, optional) - - - -Retrieve a list of all Challenges for a Factor. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Challenge | - **optional** | ***V2ServicesServiceSidEntitiesIdentityChallengesGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityChallengesGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **factorSid** | **optional.**| The unique SID identifier of the Factor. | - **status** | **optional.**| The Status of the Challenges to fetch. One of `pending`, `expired`, `approved` or `denied`. | - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2002**](inline_response_200_2.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityChallengesPost - -> VerifyV2ServiceEntityChallenge V2ServicesServiceSidEntitiesIdentityChallengesPost(ctx, serviceSid, identity, optional) - - - -Create a new Challenge for the Factor - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityChallengesPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityChallengesPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **details** | **optional.**| Details provided to give context about the Challenge. Shown to the end user. It must be a stringified JSON with the following structure: {\\\"message\\\": \\\"string\\\", \\\"fields\\\": [ { \\\"label\\\": \\\"string\\\", \\\"value\\\": \\\"string\\\"}]}. `message` is required. If you send the `fields` property, each field has to include `label` and `value` properties. If you had set `include_date=true` in the `push` configuration of the [service](https://www.twilio.com/docs/verify/api/service), the response will also include the challenge's date created value as an additional field called `date` | - **expirationDate** | **optional.**| The future date in which this Challenge will expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. | - **factorSid** | **optional.**| The unique SID identifier of the Factor. | - **hiddenDetails** | **optional.**| Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\\\"ip\\\": \\\"172.168.1.234\\\"}` | - -### Return type - -[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityChallengesSidGet - -> VerifyV2ServiceEntityChallenge V2ServicesServiceSidEntitiesIdentityChallengesSidGet(ctx, serviceSid, identity, sid, optional) - - - -Fetch a specific Challenge. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. | -**sid** | **string**| A 34 character string that uniquely identifies this Challenge. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityChallengesSidGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityChallengesSidGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - -### Return type - -[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityChallengesSidPost - -> VerifyV2ServiceEntityChallenge V2ServicesServiceSidEntitiesIdentityChallengesSidPost(ctx, serviceSid, identity, sid, optional) - - - -Verify a specific Challenge. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Challenge | -**sid** | **string**| A 34 character string that uniquely identifies this Challenge. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityChallengesSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityChallengesSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **authPayload** | **optional.**| The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. | - -### Return type - -[**VerifyV2ServiceEntityChallenge**](verify.v2.service.entity.challenge.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityDelete - -> V2ServicesServiceSidEntitiesIdentityDelete(ctx, serviceSid, identity, optional) - - - -Delete a specific Entity. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| The unique external identifier for the Entity of the Service | - **optional** | ***V2ServicesServiceSidEntitiesIdentityDeleteOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityDeleteOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityFactorsGet - -> InlineResponse2003 V2ServicesServiceSidEntitiesIdentityFactorsGet(ctx, serviceSid, identity, optional) - - - -Retrieve a list of all Factors for an Entity. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Factor | - **optional** | ***V2ServicesServiceSidEntitiesIdentityFactorsGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityFactorsGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2003**](inline_response_200_3.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityFactorsPost - -> VerifyV2ServiceEntityFactor V2ServicesServiceSidEntitiesIdentityFactorsPost(ctx, serviceSid, identity, optional) - - - -Create a new Factor for the Entity - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Factor | - **optional** | ***V2ServicesServiceSidEntitiesIdentityFactorsPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityFactorsPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **binding** | **optional.**| A unique binding for this Factor that identifies it. E.g. the algorithm and public key for `push` factors. It must be a json string with the required properties for the given factor type. Required when creating a new Factor. This value is never returned because it can contain customer secrets. | - **config** | **optional.**| The config required for this Factor. It must be a json string with the required properties for the given factor type | - **factorType** | **optional.**| The Type of this Factor. Currently only `push` is supported | - **friendlyName** | **optional.**| The friendly name of this Factor | - -### Return type - -[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityFactorsSidDelete - -> V2ServicesServiceSidEntitiesIdentityFactorsSidDelete(ctx, serviceSid, identity, sid, optional) - - - -Delete a specific Factor. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Factor | -**sid** | **string**| A 34 character string that uniquely identifies this Factor. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityFactorsSidDeleteOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityFactorsSidGet - -> VerifyV2ServiceEntityFactor V2ServicesServiceSidEntitiesIdentityFactorsSidGet(ctx, serviceSid, identity, sid, optional) - - - -Fetch a specific Factor. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Factor | -**sid** | **string**| A 34 character string that uniquely identifies this Factor. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityFactorsSidGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityFactorsSidGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - -### Return type - -[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityFactorsSidPost - -> VerifyV2ServiceEntityFactor V2ServicesServiceSidEntitiesIdentityFactorsSidPost(ctx, serviceSid, identity, sid, optional) - - - -Update a specific Factor. This endpoint can be used to Verify a Factor if passed an `AuthPayload` param. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| Customer unique identity for the Entity owner of the Factor | -**sid** | **string**| A 34 character string that uniquely identifies this Factor. | - **optional** | ***V2ServicesServiceSidEntitiesIdentityFactorsSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityFactorsSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **authPayload** | **optional.**| The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. | - **config** | **optional.**| The new config for this Factor. It must be a json string with the required properties for the given factor type | - **friendlyName** | **optional.**| The new friendly name of this Factor | - -### Return type - -[**VerifyV2ServiceEntityFactor**](verify.v2.service.entity.factor.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesIdentityGet - -> VerifyV2ServiceEntity V2ServicesServiceSidEntitiesIdentityGet(ctx, serviceSid, identity, optional) - - - -Fetch a specific Entity. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**identity** | **string**| The unique external identifier for the Entity of the Service | - **optional** | ***V2ServicesServiceSidEntitiesIdentityGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesIdentityGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - -### Return type - -[**VerifyV2ServiceEntity**](verify.v2.service.entity.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidEntitiesPost - -> VerifyV2ServiceEntity V2ServicesServiceSidEntitiesPost(ctx, serviceSid, optional) - - - -Create a new Entity for the Service - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | - **optional** | ***V2ServicesServiceSidEntitiesPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidEntitiesPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **twilioSandboxMode** | **optional.**| The Twilio-Sandbox-Mode HTTP request header | - **identity** | **optional.**| The unique external identifier for the Entity of the Service | - -### Return type - -[**VerifyV2ServiceEntity**](verify.v2.service.entity.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidWebhooksGet - -> InlineResponse2007 V2ServicesServiceSidWebhooksGet(ctx, serviceSid, optional) - - - -Retrieve a list of all Webhooks for a Service. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | - **optional** | ***V2ServicesServiceSidWebhooksGetOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidWebhooksGetOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **pageSize** | **optional.**| How many resources to return in each list page. The default is 50, and the maximum is 1000. | - -### Return type - -[**InlineResponse2007**](inline_response_200_7.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidWebhooksPost - -> VerifyV2ServiceWebhook V2ServicesServiceSidWebhooksPost(ctx, serviceSid, optional) - - - -Create a new Webhook for the Service - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | - **optional** | ***V2ServicesServiceSidWebhooksPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidWebhooksPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **eventTypes** | [**optional.Interface of []string**](string.md)| The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | - **friendlyName** | **optional.**| The string that you assigned to describe the webhook. **This value should not contain PII.** | - **status** | **optional.**| The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | - **webhookUrl** | **optional.**| The URL associated with this Webhook. | - -### Return type - -[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidWebhooksSidDelete - -> V2ServicesServiceSidWebhooksSidDelete(ctx, serviceSid, sid) - - - -Delete a specific Webhook. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to delete. | - -### Return type - - (empty response body) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidWebhooksSidGet - -> VerifyV2ServiceWebhook V2ServicesServiceSidWebhooksSidGet(ctx, serviceSid, sid) - - - -Fetch a specific Webhook. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to fetch. | - -### Return type - -[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## V2ServicesServiceSidWebhooksSidPost - -> VerifyV2ServiceWebhook V2ServicesServiceSidWebhooksSidPost(ctx, serviceSid, sid, optional) - - - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**serviceSid** | **string**| The unique SID identifier of the Service. | -**sid** | **string**| The Twilio-provided string that uniquely identifies the Webhook resource to update. | - **optional** | ***V2ServicesServiceSidWebhooksSidPostOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a V2ServicesServiceSidWebhooksSidPostOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **eventTypes** | [**optional.Interface of []string**](string.md)| The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` | - **friendlyName** | **optional.**| The string that you assigned to describe the webhook. **This value should not contain PII.** | - **status** | **optional.**| The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` | - **webhookUrl** | **optional.**| The URL associated with this Webhook. | - -### Return type - -[**VerifyV2ServiceWebhook**](verify.v2.service.webhook.md) - -### Authorization - -[accountSid_authToken](../README.md#accountSid_authToken) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/verify/docs/VerifyV2Form.md b/verify/docs/VerifyV2Form.md deleted file mode 100644 index 988d9d5de..000000000 --- a/verify/docs/VerifyV2Form.md +++ /dev/null @@ -1,14 +0,0 @@ -# VerifyV2Form - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FormMeta** | **map[string]interface{}** | | [optional] -**FormType** | **string** | | [optional] -**Forms** | **map[string]interface{}** | | [optional] -**Url** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/verify/go.mod b/verify/go.mod deleted file mode 100644 index 271091e1a..000000000 --- a/verify/go.mod +++ /dev/null @@ -1,4 +0,0 @@ -module github.com/GIT_USER_ID/GIT_REPO_ID/twilio - -require ( -) diff --git a/verify/go.sum b/verify/go.sum deleted file mode 100644 index c966c8ddf..000000000 --- a/verify/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/verify/model_inline_object.go b/verify/model_inline_object.go deleted file mode 100644 index 73c3b91ab..000000000 --- a/verify/model_inline_object.go +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject struct for InlineObject -type InlineObject struct { - // The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. - CodeLength int32 `json:"CodeLength,omitempty"` - // Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. - CustomCodeEnabled bool `json:"CustomCodeEnabled,omitempty"` - // Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code` - DoNotShareWarningEnabled bool `json:"DoNotShareWarningEnabled,omitempty"` - // Whether to ask the user to press a number before delivering the verify code in a phone call. - DtmfInputRequired bool `json:"DtmfInputRequired,omitempty"` - // A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** - FriendlyName string `json:"FriendlyName"` - // Whether to perform a lookup with each verification started and return info about the phone number. - LookupEnabled bool `json:"LookupEnabled,omitempty"` - // Whether to pass PSD2 transaction parameters when starting a verification. - Psd2Enabled bool `json:"Psd2Enabled,omitempty"` - // Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\"notify_service_sid\": \"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", \"include_date\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info - Push map[string]interface{} `json:"Push,omitempty"` - // Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. - SkipSmsToLandlines bool `json:"SkipSmsToLandlines,omitempty"` - // The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. - TtsName string `json:"TtsName,omitempty"` -} diff --git a/verify/model_inline_object_1.go b/verify/model_inline_object_1.go deleted file mode 100644 index 1e907f116..000000000 --- a/verify/model_inline_object_1.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject1 struct for InlineObject1 -type InlineObject1 struct { - // The Type of this Factor. Eg. `push` - FactorType string `json:"FactorType"` - // The unique external identifier for the Entity of the Service. This identifier should be immutable, not PII, and generated by your external system, such as your user's UUID, GUID, or SID. - Identity string `json:"Identity"` -} diff --git a/verify/model_inline_object_10.go b/verify/model_inline_object_10.go deleted file mode 100644 index 25551e00c..000000000 --- a/verify/model_inline_object_10.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject10 struct for InlineObject10 -type InlineObject10 struct { - // Number of seconds that the rate limit will be enforced over. - Interval int32 `json:"Interval"` - // Maximum number of requests permitted in during the interval. - Max int32 `json:"Max"` -} diff --git a/verify/model_inline_object_11.go b/verify/model_inline_object_11.go deleted file mode 100644 index 00a9e9658..000000000 --- a/verify/model_inline_object_11.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject11 struct for InlineObject11 -type InlineObject11 struct { - // Number of seconds that the rate limit will be enforced over. - Interval int32 `json:"Interval,omitempty"` - // Maximum number of requests permitted in during the interval. - Max int32 `json:"Max,omitempty"` -} diff --git a/verify/model_inline_object_12.go b/verify/model_inline_object_12.go deleted file mode 100644 index 634436499..000000000 --- a/verify/model_inline_object_12.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject12 struct for InlineObject12 -type InlineObject12 struct { - // Description of this Rate Limit - Description string `json:"Description,omitempty"` -} diff --git a/verify/model_inline_object_13.go b/verify/model_inline_object_13.go deleted file mode 100644 index 92b7659fa..000000000 --- a/verify/model_inline_object_13.go +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject13 struct for InlineObject13 -type InlineObject13 struct { - // The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - Amount string `json:"Amount,omitempty"` - // The 4-10 character string being verified. - Code string `json:"Code"` - // The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - Payee string `json:"Payee,omitempty"` - // The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). - To string `json:"To,omitempty"` - // A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified. - VerificationSid string `json:"VerificationSid,omitempty"` -} diff --git a/verify/model_inline_object_14.go b/verify/model_inline_object_14.go deleted file mode 100644 index f9cf3ee7a..000000000 --- a/verify/model_inline_object_14.go +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject14 struct for InlineObject14 -type InlineObject14 struct { - // The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - Amount string `json:"Amount,omitempty"` - // Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`. - AppHash string `json:"AppHash,omitempty"` - // The verification method to use. Can be: [`email`](https://www.twilio.com/docs/verify/email), `sms` or `call`. - Channel string `json:"Channel"` - // [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'. - ChannelConfiguration map[string]interface{} `json:"ChannelConfiguration,omitempty"` - // A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive. - CustomCode string `json:"CustomCode,omitempty"` - // A custom user defined friendly name that overwrites the existing one in the verification message - CustomFriendlyName string `json:"CustomFriendlyName,omitempty"` - // The text of a custom message to use for the verification. - CustomMessage string `json:"CustomMessage,omitempty"` - // The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `en-GB`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.` - Locale string `json:"Locale,omitempty"` - // The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. - Payee string `json:"Payee,omitempty"` - // The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request. - RateLimits map[string]interface{} `json:"RateLimits,omitempty"` - // The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits). - SendDigits string `json:"SendDigits,omitempty"` - // The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). - To string `json:"To"` -} diff --git a/verify/model_inline_object_15.go b/verify/model_inline_object_15.go deleted file mode 100644 index 01fefe3a0..000000000 --- a/verify/model_inline_object_15.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject15 struct for InlineObject15 -type InlineObject15 struct { - // The new status of the resource. Can be: `canceled` or `approved`. - Status string `json:"Status"` -} diff --git a/verify/model_inline_object_16.go b/verify/model_inline_object_16.go deleted file mode 100644 index 7d284d72f..000000000 --- a/verify/model_inline_object_16.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject16 struct for InlineObject16 -type InlineObject16 struct { - // The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` - EventTypes []string `json:"EventTypes"` - // The string that you assigned to describe the webhook. **This value should not contain PII.** - FriendlyName string `json:"FriendlyName"` - // The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` - Status string `json:"Status,omitempty"` - // The URL associated with this Webhook. - WebhookUrl string `json:"WebhookUrl"` -} diff --git a/verify/model_inline_object_17.go b/verify/model_inline_object_17.go deleted file mode 100644 index 62ebb5563..000000000 --- a/verify/model_inline_object_17.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject17 struct for InlineObject17 -type InlineObject17 struct { - // The array of events that this Webhook is subscribed to. Possible event types: `*, factor.deleted, factor.created, factor.verified, challenge.approved, challenge.denied` - EventTypes []string `json:"EventTypes,omitempty"` - // The string that you assigned to describe the webhook. **This value should not contain PII.** - FriendlyName string `json:"FriendlyName,omitempty"` - // The webhook status. Default value is `enabled`. One of: `enabled` or `disabled` - Status string `json:"Status,omitempty"` - // The URL associated with this Webhook. - WebhookUrl string `json:"WebhookUrl,omitempty"` -} diff --git a/verify/model_inline_object_18.go b/verify/model_inline_object_18.go deleted file mode 100644 index e0866533d..000000000 --- a/verify/model_inline_object_18.go +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject18 struct for InlineObject18 -type InlineObject18 struct { - // The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive. - CodeLength int32 `json:"CodeLength,omitempty"` - // Whether to allow sending verifications with a custom code instead of a randomly generated one. Not available for all customers. - CustomCodeEnabled bool `json:"CustomCodeEnabled,omitempty"` - // Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.** - DoNotShareWarningEnabled bool `json:"DoNotShareWarningEnabled,omitempty"` - // Whether to ask the user to press a number before delivering the verify code in a phone call. - DtmfInputRequired bool `json:"DtmfInputRequired,omitempty"` - // A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.** - FriendlyName string `json:"FriendlyName,omitempty"` - // Whether to perform a lookup with each verification started and return info about the phone number. - LookupEnabled bool `json:"LookupEnabled,omitempty"` - // Whether to pass PSD2 transaction parameters when starting a verification. - Psd2Enabled bool `json:"Psd2Enabled,omitempty"` - // Configurations for the Push factors (channel) created under this Service. If present, it must be a json string with the following format: {\"notify_service_sid\": \"ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", \"include_date\": true}. If `include_date` is set to `true`, which is the default, that means that the push challenge’s response will include the date created value. If `include_date` is set to `false`, then the date created value will not be included. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info - Push map[string]interface{} `json:"Push,omitempty"` - // Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`. - SkipSmsToLandlines bool `json:"SkipSmsToLandlines,omitempty"` - // The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages. - TtsName string `json:"TtsName,omitempty"` -} diff --git a/verify/model_inline_object_2.go b/verify/model_inline_object_2.go deleted file mode 100644 index 6a39940f9..000000000 --- a/verify/model_inline_object_2.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject2 struct for InlineObject2 -type InlineObject2 struct { - // The unique external identifier for the Entity of the Service - Identity string `json:"Identity"` -} diff --git a/verify/model_inline_object_3.go b/verify/model_inline_object_3.go deleted file mode 100644 index fce8c560d..000000000 --- a/verify/model_inline_object_3.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// InlineObject3 struct for InlineObject3 -type InlineObject3 struct { - // Details provided to give context about the Challenge. Shown to the end user. It must be a stringified JSON with the following structure: {\"message\": \"string\", \"fields\": [ { \"label\": \"string\", \"value\": \"string\"}]}. `message` is required. If you send the `fields` property, each field has to include `label` and `value` properties. If you had set `include_date=true` in the `push` configuration of the [service](https://www.twilio.com/docs/verify/api/service), the response will also include the challenge's date created value as an additional field called `date` - Details string `json:"Details,omitempty"` - // The future date in which this Challenge will expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - ExpirationDate time.Time `json:"ExpirationDate,omitempty"` - // The unique SID identifier of the Factor. - FactorSid string `json:"FactorSid"` - // Details provided to give context about the Challenge. Not shown to the end user. It must be a stringified JSON with only strings values eg. `{\"ip\": \"172.168.1.234\"}` - HiddenDetails string `json:"HiddenDetails,omitempty"` -} diff --git a/verify/model_inline_object_4.go b/verify/model_inline_object_4.go deleted file mode 100644 index 53d0adebf..000000000 --- a/verify/model_inline_object_4.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject4 struct for InlineObject4 -type InlineObject4 struct { - // The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code. - AuthPayload string `json:"AuthPayload,omitempty"` -} diff --git a/verify/model_inline_object_5.go b/verify/model_inline_object_5.go deleted file mode 100644 index 708497442..000000000 --- a/verify/model_inline_object_5.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject5 struct for InlineObject5 -type InlineObject5 struct { - // A unique binding for this Factor that identifies it. E.g. the algorithm and public key for `push` factors. It must be a json string with the required properties for the given factor type. Required when creating a new Factor. This value is never returned because it can contain customer secrets. - Binding string `json:"Binding"` - // The config required for this Factor. It must be a json string with the required properties for the given factor type - Config string `json:"Config"` - // The Type of this Factor. Currently only `push` is supported - FactorType string `json:"FactorType"` - // The friendly name of this Factor - FriendlyName string `json:"FriendlyName"` -} diff --git a/verify/model_inline_object_6.go b/verify/model_inline_object_6.go deleted file mode 100644 index f63ab4966..000000000 --- a/verify/model_inline_object_6.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject6 struct for InlineObject6 -type InlineObject6 struct { - // The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code. - AuthPayload string `json:"AuthPayload,omitempty"` - // The new config for this Factor. It must be a json string with the required properties for the given factor type - Config string `json:"Config,omitempty"` - // The new friendly name of this Factor - FriendlyName string `json:"FriendlyName,omitempty"` -} diff --git a/verify/model_inline_object_7.go b/verify/model_inline_object_7.go deleted file mode 100644 index 59e3270d6..000000000 --- a/verify/model_inline_object_7.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject7 struct for InlineObject7 -type InlineObject7 struct { - // The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`. - Country string `json:"Country"` - // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. - MessagingServiceSid string `json:"MessagingServiceSid"` -} diff --git a/verify/model_inline_object_8.go b/verify/model_inline_object_8.go deleted file mode 100644 index b97ee6ade..000000000 --- a/verify/model_inline_object_8.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject8 struct for InlineObject8 -type InlineObject8 struct { - // The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) to be used to send SMS to the country of this configuration. - MessagingServiceSid string `json:"MessagingServiceSid"` -} diff --git a/verify/model_inline_object_9.go b/verify/model_inline_object_9.go deleted file mode 100644 index 199bf342a..000000000 --- a/verify/model_inline_object_9.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineObject9 struct for InlineObject9 -type InlineObject9 struct { - // Description of this Rate Limit - Description string `json:"Description,omitempty"` - // Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.** - UniqueName string `json:"UniqueName"` -} diff --git a/verify/model_inline_response_200.go b/verify/model_inline_response_200.go deleted file mode 100644 index 6b1722201..000000000 --- a/verify/model_inline_response_200.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse200 struct for InlineResponse200 -type InlineResponse200 struct { - Meta InlineResponse200Meta `json:"meta,omitempty"` - Services []VerifyV2Service `json:"services,omitempty"` -} diff --git a/verify/model_inline_response_200_1.go b/verify/model_inline_response_200_1.go deleted file mode 100644 index a612f86e2..000000000 --- a/verify/model_inline_response_200_1.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2001 struct for InlineResponse2001 -type InlineResponse2001 struct { - Entities []VerifyV2ServiceEntity `json:"entities,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/verify/model_inline_response_200_2.go b/verify/model_inline_response_200_2.go deleted file mode 100644 index c4a0efb26..000000000 --- a/verify/model_inline_response_200_2.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2002 struct for InlineResponse2002 -type InlineResponse2002 struct { - Challenges []VerifyV2ServiceEntityChallenge `json:"challenges,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/verify/model_inline_response_200_3.go b/verify/model_inline_response_200_3.go deleted file mode 100644 index 1ca01fef9..000000000 --- a/verify/model_inline_response_200_3.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2003 struct for InlineResponse2003 -type InlineResponse2003 struct { - Factors []VerifyV2ServiceEntityFactor `json:"factors,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/verify/model_inline_response_200_4.go b/verify/model_inline_response_200_4.go deleted file mode 100644 index 682d105c0..000000000 --- a/verify/model_inline_response_200_4.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2004 struct for InlineResponse2004 -type InlineResponse2004 struct { - MessagingConfigurations []VerifyV2ServiceMessagingConfiguration `json:"messaging_configurations,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/verify/model_inline_response_200_5.go b/verify/model_inline_response_200_5.go deleted file mode 100644 index 6f02abeaf..000000000 --- a/verify/model_inline_response_200_5.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2005 struct for InlineResponse2005 -type InlineResponse2005 struct { - Meta InlineResponse200Meta `json:"meta,omitempty"` - RateLimits []VerifyV2ServiceRateLimit `json:"rate_limits,omitempty"` -} diff --git a/verify/model_inline_response_200_6.go b/verify/model_inline_response_200_6.go deleted file mode 100644 index 231725c1c..000000000 --- a/verify/model_inline_response_200_6.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2006 struct for InlineResponse2006 -type InlineResponse2006 struct { - Buckets []VerifyV2ServiceRateLimitBucket `json:"buckets,omitempty"` - Meta InlineResponse200Meta `json:"meta,omitempty"` -} diff --git a/verify/model_inline_response_200_7.go b/verify/model_inline_response_200_7.go deleted file mode 100644 index e1b1a0c71..000000000 --- a/verify/model_inline_response_200_7.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse2007 struct for InlineResponse2007 -type InlineResponse2007 struct { - Meta InlineResponse200Meta `json:"meta,omitempty"` - Webhooks []VerifyV2ServiceWebhook `json:"webhooks,omitempty"` -} diff --git a/verify/model_inline_response_200_meta.go b/verify/model_inline_response_200_meta.go deleted file mode 100644 index 13a32d2cb..000000000 --- a/verify/model_inline_response_200_meta.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// InlineResponse200Meta struct for InlineResponse200Meta -type InlineResponse200Meta struct { - FirstPageUrl string `json:"first_page_url,omitempty"` - Key string `json:"key,omitempty"` - NextPageUrl string `json:"next_page_url,omitempty"` - Page int32 `json:"page,omitempty"` - PageSize int32 `json:"page_size,omitempty"` - PreviousPageUrl string `json:"previous_page_url,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_form.go b/verify/model_verify_v2_form.go deleted file mode 100644 index 35d3f1b66..000000000 --- a/verify/model_verify_v2_form.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -// VerifyV2Form struct for VerifyV2Form -type VerifyV2Form struct { - FormMeta map[string]interface{} `json:"form_meta,omitempty"` - FormType string `json:"form_type,omitempty"` - Forms map[string]interface{} `json:"forms,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service.go b/verify/model_verify_v2_service.go deleted file mode 100644 index 370ff75c0..000000000 --- a/verify/model_verify_v2_service.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2Service struct for VerifyV2Service -type VerifyV2Service struct { - AccountSid string `json:"account_sid,omitempty"` - CodeLength int32 `json:"code_length,omitempty"` - CustomCodeEnabled bool `json:"custom_code_enabled,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - DoNotShareWarningEnabled bool `json:"do_not_share_warning_enabled,omitempty"` - DtmfInputRequired bool `json:"dtmf_input_required,omitempty"` - FriendlyName string `json:"friendly_name,omitempty"` - Links map[string]interface{} `json:"links,omitempty"` - LookupEnabled bool `json:"lookup_enabled,omitempty"` - Psd2Enabled bool `json:"psd2_enabled,omitempty"` - Push map[string]interface{} `json:"push,omitempty"` - Sid string `json:"sid,omitempty"` - SkipSmsToLandlines bool `json:"skip_sms_to_landlines,omitempty"` - TtsName string `json:"tts_name,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_entity.go b/verify/model_verify_v2_service_entity.go deleted file mode 100644 index 2b48e5c40..000000000 --- a/verify/model_verify_v2_service_entity.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceEntity struct for VerifyV2ServiceEntity -type VerifyV2ServiceEntity struct { - AccountSid string `json:"account_sid,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Identity string `json:"identity,omitempty"` - Links map[string]interface{} `json:"links,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_entity_challenge.go b/verify/model_verify_v2_service_entity_challenge.go deleted file mode 100644 index f7449fcd7..000000000 --- a/verify/model_verify_v2_service_entity_challenge.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceEntityChallenge struct for VerifyV2ServiceEntityChallenge -type VerifyV2ServiceEntityChallenge struct { - AccountSid string `json:"account_sid,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateResponded time.Time `json:"date_responded,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Details string `json:"details,omitempty"` - EntitySid string `json:"entity_sid,omitempty"` - ExpirationDate time.Time `json:"expiration_date,omitempty"` - FactorSid string `json:"factor_sid,omitempty"` - FactorType string `json:"factor_type,omitempty"` - HiddenDetails string `json:"hidden_details,omitempty"` - Identity string `json:"identity,omitempty"` - RespondedReason string `json:"responded_reason,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_entity_factor.go b/verify/model_verify_v2_service_entity_factor.go deleted file mode 100644 index 5d8b2ad27..000000000 --- a/verify/model_verify_v2_service_entity_factor.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceEntityFactor struct for VerifyV2ServiceEntityFactor -type VerifyV2ServiceEntityFactor struct { - AccountSid string `json:"account_sid,omitempty"` - Config map[string]interface{} `json:"config,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - EntitySid string `json:"entity_sid,omitempty"` - FactorType string `json:"factor_type,omitempty"` - FriendlyName string `json:"friendly_name,omitempty"` - Identity string `json:"identity,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_messaging_configuration.go b/verify/model_verify_v2_service_messaging_configuration.go deleted file mode 100644 index 64920c4fb..000000000 --- a/verify/model_verify_v2_service_messaging_configuration.go +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceMessagingConfiguration struct for VerifyV2ServiceMessagingConfiguration -type VerifyV2ServiceMessagingConfiguration struct { - AccountSid string `json:"account_sid,omitempty"` - Country string `json:"country,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - MessagingServiceSid string `json:"messaging_service_sid,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_rate_limit.go b/verify/model_verify_v2_service_rate_limit.go deleted file mode 100644 index ad267268d..000000000 --- a/verify/model_verify_v2_service_rate_limit.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceRateLimit struct for VerifyV2ServiceRateLimit -type VerifyV2ServiceRateLimit struct { - AccountSid string `json:"account_sid,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Description string `json:"description,omitempty"` - Links map[string]interface{} `json:"links,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - UniqueName string `json:"unique_name,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_rate_limit_bucket.go b/verify/model_verify_v2_service_rate_limit_bucket.go deleted file mode 100644 index 2b1182bc1..000000000 --- a/verify/model_verify_v2_service_rate_limit_bucket.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceRateLimitBucket struct for VerifyV2ServiceRateLimitBucket -type VerifyV2ServiceRateLimitBucket struct { - AccountSid string `json:"account_sid,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Interval int32 `json:"interval,omitempty"` - Max int32 `json:"max,omitempty"` - RateLimitSid string `json:"rate_limit_sid,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Url string `json:"url,omitempty"` -} diff --git a/verify/model_verify_v2_service_verification.go b/verify/model_verify_v2_service_verification.go deleted file mode 100644 index 064d38311..000000000 --- a/verify/model_verify_v2_service_verification.go +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceVerification struct for VerifyV2ServiceVerification -type VerifyV2ServiceVerification struct { - AccountSid string `json:"account_sid,omitempty"` - Amount string `json:"amount,omitempty"` - Channel string `json:"channel,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Lookup map[string]interface{} `json:"lookup,omitempty"` - Payee string `json:"payee,omitempty"` - SendCodeAttempts []map[string]interface{} `json:"send_code_attempts,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - To string `json:"to,omitempty"` - Url string `json:"url,omitempty"` - Valid bool `json:"valid,omitempty"` -} diff --git a/verify/model_verify_v2_service_verification_check.go b/verify/model_verify_v2_service_verification_check.go deleted file mode 100644 index 40fe5d4a5..000000000 --- a/verify/model_verify_v2_service_verification_check.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceVerificationCheck struct for VerifyV2ServiceVerificationCheck -type VerifyV2ServiceVerificationCheck struct { - AccountSid string `json:"account_sid,omitempty"` - Amount string `json:"amount,omitempty"` - Channel string `json:"channel,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - Payee string `json:"payee,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - To string `json:"to,omitempty"` - Valid bool `json:"valid,omitempty"` -} diff --git a/verify/model_verify_v2_service_webhook.go b/verify/model_verify_v2_service_webhook.go deleted file mode 100644 index 93fe9d7e3..000000000 --- a/verify/model_verify_v2_service_webhook.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio -import ( - "time" -) -// VerifyV2ServiceWebhook struct for VerifyV2ServiceWebhook -type VerifyV2ServiceWebhook struct { - AccountSid string `json:"account_sid,omitempty"` - DateCreated time.Time `json:"date_created,omitempty"` - DateUpdated time.Time `json:"date_updated,omitempty"` - EventTypes []string `json:"event_types,omitempty"` - FriendlyName string `json:"friendly_name,omitempty"` - ServiceSid string `json:"service_sid,omitempty"` - Sid string `json:"sid,omitempty"` - Status string `json:"status,omitempty"` - Url string `json:"url,omitempty"` - WebhookMethod string `json:"webhook_method,omitempty"` - WebhookUrl string `json:"webhook_url,omitempty"` -} diff --git a/verify/response.go b/verify/response.go deleted file mode 100644 index 8b0baf750..000000000 --- a/verify/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Twilio - Verify - * - * This is the public Twilio REST API. - * - * API version: 1.0.1 - * Contact: support@twilio.com - * Generated by: OpenAPI Generator (https://openapi-generator.tech) - */ - -package twilio - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -}